Lines Matching refs:mtc

3441 		struct mtop mtc;  in st_ioctl()  local
3443 if (_IOC_SIZE(cmd_in) != sizeof(mtc)) { in st_ioctl()
3448 i = copy_from_user(&mtc, p, sizeof(struct mtop)); in st_ioctl()
3454 if (mtc.mt_op == MTSETDRVBUFFER && !capable(CAP_SYS_ADMIN)) { in st_ioctl()
3461 (mtc.mt_op != MTSETDRVBUFFER && in st_ioctl()
3462 (mtc.mt_count & MT_ST_OPTIONS) == 0)) { in st_ioctl()
3470 if (mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3471 mtc.mt_op == MTEOM) { in st_ioctl()
3472 mtc.mt_count -= 1; in st_ioctl()
3475 } else if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) { in st_ioctl()
3476 mtc.mt_count += 1; in st_ioctl()
3482 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3488 i = mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3489 mtc.mt_op == MTRETEN || mtc.mt_op == MTEOM || in st_ioctl()
3490 mtc.mt_op == MTLOCK || mtc.mt_op == MTLOAD || in st_ioctl()
3491 mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3492 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM || in st_ioctl()
3493 mtc.mt_op == MTCOMPRESSION; in st_ioctl()
3501 (mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3502 mtc.mt_op == MTSEEK || in st_ioctl()
3503 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM)) { in st_ioctl()
3509 if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) in st_ioctl()
3510 mtc.mt_count++; in st_ioctl()
3520 if (mtc.mt_op != MTREW && in st_ioctl()
3521 mtc.mt_op != MTOFFL && in st_ioctl()
3522 mtc.mt_op != MTRETEN && in st_ioctl()
3523 mtc.mt_op != MTERASE && in st_ioctl()
3524 mtc.mt_op != MTSEEK && in st_ioctl()
3525 mtc.mt_op != MTEOM) { in st_ioctl()
3534 if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK && in st_ioctl()
3535 mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTWSM && in st_ioctl()
3536 mtc.mt_op != MTSETDRVBUFFER && mtc.mt_op != MTSETPART) in st_ioctl()
3539 if (mtc.mt_op == MTOFFL && STp->door_locked != ST_UNLOCKED) in st_ioctl()
3542 if (mtc.mt_op == MTSETDRVBUFFER && in st_ioctl()
3543 (mtc.mt_count & MT_ST_OPTIONS) != 0) { in st_ioctl()
3544 retval = st_set_options(STp, mtc.mt_count); in st_ioctl()
3548 if (mtc.mt_op == MTSETPART) { in st_ioctl()
3550 mtc.mt_count < 0 || mtc.mt_count >= ST_NBR_PARTITIONS) { in st_ioctl()
3554 if (mtc.mt_count >= STp->nbr_partitions && in st_ioctl()
3559 if (mtc.mt_count >= STp->nbr_partitions) { in st_ioctl()
3563 STp->new_partition = mtc.mt_count; in st_ioctl()
3568 if (mtc.mt_op == MTMKPART) { in st_ioctl()
3574 (i = partition_tape(STp, mtc.mt_count)) < 0) { in st_ioctl()
3590 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3591 i = set_location(STp, mtc.mt_count, STp->new_partition, 0); in st_ioctl()
3598 if (mtc.mt_op == MTUNLOAD || mtc.mt_op == MTOFFL) { in st_ioctl()
3603 if (mtc.mt_op == MTLOAD) { in st_ioctl()
3604 retval = do_load_unload(STp, file, max(1, mtc.mt_count)); in st_ioctl()
3608 if (mtc.mt_op == MTLOCK || mtc.mt_op == MTUNLOCK) { in st_ioctl()
3609 retval = do_door_lock(STp, (mtc.mt_op == MTLOCK)); in st_ioctl()
3619 if (mtc.mt_op == MTCOMPRESSION) in st_ioctl()
3620 retval = st_compression(STp, (mtc.mt_count & 1)); in st_ioctl()
3622 retval = st_int_ioctl(STp, mtc.mt_op, mtc.mt_count); in st_ioctl()