Lines Matching refs:mtc
3121 struct mtop mtc; in st_ioctl() local
3123 if (_IOC_SIZE(cmd_in) != sizeof(mtc)) { in st_ioctl()
3128 i = copy_from_user((char *) &mtc, (char *) arg, sizeof(struct mtop)); in st_ioctl()
3134 if (mtc.mt_op == MTSETDRVBUFFER && !capable(CAP_SYS_ADMIN)) { in st_ioctl()
3141 (mtc.mt_op != MTSETDRVBUFFER && in st_ioctl()
3142 (mtc.mt_count & MT_ST_OPTIONS) == 0)) { in st_ioctl()
3150 if (mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3151 mtc.mt_op == MTEOM) { in st_ioctl()
3152 mtc.mt_count -= 1; in st_ioctl()
3155 } else if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) { in st_ioctl()
3156 mtc.mt_count += 1; in st_ioctl()
3162 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3168 i = mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3169 mtc.mt_op == MTRETEN || mtc.mt_op == MTEOM || in st_ioctl()
3170 mtc.mt_op == MTLOCK || mtc.mt_op == MTLOAD || in st_ioctl()
3171 mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3172 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM || in st_ioctl()
3173 mtc.mt_op == MTCOMPRESSION; in st_ioctl()
3186 if (mtc.mt_op != MTREW && in st_ioctl()
3187 mtc.mt_op != MTOFFL && in st_ioctl()
3188 mtc.mt_op != MTRETEN && in st_ioctl()
3189 mtc.mt_op != MTERASE && in st_ioctl()
3190 mtc.mt_op != MTSEEK && in st_ioctl()
3191 mtc.mt_op != MTEOM) { in st_ioctl()
3207 if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK && in st_ioctl()
3208 mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTWSM && in st_ioctl()
3209 mtc.mt_op != MTSETDRVBUFFER && mtc.mt_op != MTSETPART) in st_ioctl()
3212 if (mtc.mt_op == MTOFFL && STp->door_locked != ST_UNLOCKED) in st_ioctl()
3215 if (mtc.mt_op == MTSETDRVBUFFER && in st_ioctl()
3216 (mtc.mt_count & MT_ST_OPTIONS) != 0) { in st_ioctl()
3217 retval = st_set_options(STp, mtc.mt_count); in st_ioctl()
3221 if (mtc.mt_op == MTSETPART) { in st_ioctl()
3223 mtc.mt_count < 0 || mtc.mt_count >= ST_NBR_PARTITIONS) { in st_ioctl()
3227 if (mtc.mt_count >= STp->nbr_partitions && in st_ioctl()
3232 if (mtc.mt_count >= STp->nbr_partitions) { in st_ioctl()
3236 STp->new_partition = mtc.mt_count; in st_ioctl()
3241 if (mtc.mt_op == MTMKPART) { in st_ioctl()
3247 (i = partition_tape(STp, mtc.mt_count)) < 0) { in st_ioctl()
3263 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3264 i = set_location(STp, mtc.mt_count, STp->new_partition, 0); in st_ioctl()
3271 if (mtc.mt_op == MTUNLOAD || mtc.mt_op == MTOFFL) { in st_ioctl()
3276 if (mtc.mt_op == MTLOAD) { in st_ioctl()
3277 retval = do_load_unload(STp, file, max(1, mtc.mt_count)); in st_ioctl()
3287 if (mtc.mt_op == MTCOMPRESSION) in st_ioctl()
3288 retval = st_compression(STp, (mtc.mt_count & 1)); in st_ioctl()
3290 retval = st_int_ioctl(STp, mtc.mt_op, mtc.mt_count); in st_ioctl()