Lines Matching refs:comp
129 static const char *comptostring(u_int32_t comp);
136 struct commands *comp; in main() local
162 for (comp = com;; comp++) { in main()
163 if (comp->c_name == NULL) in main()
165 if (strncmp(p, comp->c_name, len) == 0) in main()
169 if((comp->c_flags & NEED_2ARGS) && argc != 2) in main()
171 if(comp->c_flags & DISABLE_THIS) { in main()
175 if ((mtfd = open(tape, comp->c_ronly ? O_RDONLY : O_RDWR)) < 0) in main()
177 if (comp->c_code != MTNOP) { in main()
178 mt_com.mt_op = comp->c_code; in main()
182 (comp->c_flags & IS_DENSITY)) { in main()
194 (comp->c_flags & IS_COMP)) { in main()
209 ((comp->c_flags & ZERO_ALLOWED)? -1: 0) in main()
210 && ((comp->c_flags & IS_COMP) == 0) in main()
220 switch (comp->c_code) { in main()
227 if (ioctl(mtfd, comp->c_code, (caddr_t)&umn) < 0) in main()
263 if (ioctl(mtfd, comp->c_code, (caddr_t)&block) < 0) in main()
266 (comp->c_code == MTIOCRDHPOS)? "hardware" : in main()
275 if (ioctl(mtfd, comp->c_code, (caddr_t)&block) < 0) in main()
295 if (ioctl(mtfd, comp->c_code, (caddr_t)&nm) < 0) in main()
309 err(1, "%s: %s", tape, comp->c_name); in main()
559 comptostring(u_int32_t comp) in comptostring() argument
564 if (comp == MT_COMP_DISABLED) in comptostring()
566 else if (comp == MT_COMP_UNSUPP) in comptostring()
570 if (ct->comp_number == comp) in comptostring()
574 sprintf(buf, "0x%x", comp); in comptostring()