Lines Matching refs:mtc

3541 		struct mtop mtc;  in st_ioctl()  local
3543 if (_IOC_SIZE(cmd_in) != sizeof(mtc)) { in st_ioctl()
3548 i = copy_from_user(&mtc, p, sizeof(struct mtop)); in st_ioctl()
3554 if (mtc.mt_op == MTSETDRVBUFFER && !capable(CAP_SYS_ADMIN)) { in st_ioctl()
3561 (mtc.mt_op != MTSETDRVBUFFER && in st_ioctl()
3562 (mtc.mt_count & MT_ST_OPTIONS) == 0)) { in st_ioctl()
3570 if (mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3571 mtc.mt_op == MTEOM) { in st_ioctl()
3572 mtc.mt_count -= 1; in st_ioctl()
3575 } else if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) { in st_ioctl()
3576 mtc.mt_count += 1; in st_ioctl()
3582 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3588 i = mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3589 mtc.mt_op == MTRETEN || mtc.mt_op == MTEOM || in st_ioctl()
3590 mtc.mt_op == MTLOCK || mtc.mt_op == MTLOAD || in st_ioctl()
3591 mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3592 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM || in st_ioctl()
3593 mtc.mt_op == MTCOMPRESSION; in st_ioctl()
3601 (mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3602 mtc.mt_op == MTSEEK || in st_ioctl()
3603 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM)) { in st_ioctl()
3609 if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) in st_ioctl()
3610 mtc.mt_count++; in st_ioctl()
3620 if (mtc.mt_op != MTREW && in st_ioctl()
3621 mtc.mt_op != MTOFFL && in st_ioctl()
3622 mtc.mt_op != MTRETEN && in st_ioctl()
3623 mtc.mt_op != MTERASE && in st_ioctl()
3624 mtc.mt_op != MTSEEK && in st_ioctl()
3625 mtc.mt_op != MTEOM) { in st_ioctl()
3634 if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK && in st_ioctl()
3635 mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTWSM && in st_ioctl()
3636 mtc.mt_op != MTSETDRVBUFFER && mtc.mt_op != MTSETPART) in st_ioctl()
3639 if (mtc.mt_op == MTOFFL && STp->door_locked != ST_UNLOCKED) in st_ioctl()
3642 if (mtc.mt_op == MTSETDRVBUFFER && in st_ioctl()
3643 (mtc.mt_count & MT_ST_OPTIONS) != 0) { in st_ioctl()
3644 retval = st_set_options(STp, mtc.mt_count); in st_ioctl()
3648 if (mtc.mt_op == MTSETPART) { in st_ioctl()
3650 mtc.mt_count < 0 || mtc.mt_count >= ST_NBR_PARTITIONS) { in st_ioctl()
3654 if (mtc.mt_count >= STp->nbr_partitions && in st_ioctl()
3659 if (mtc.mt_count >= STp->nbr_partitions) { in st_ioctl()
3663 STp->new_partition = mtc.mt_count; in st_ioctl()
3668 if (mtc.mt_op == MTMKPART) { in st_ioctl()
3678 i = partition_tape(STp, mtc.mt_count); in st_ioctl()
3689 STp->nbr_partitions = mtc.mt_count != 0 ? 2 : 1; in st_ioctl()
3695 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3696 i = set_location(STp, mtc.mt_count, STp->new_partition, 0); in st_ioctl()
3703 if (mtc.mt_op == MTUNLOAD || mtc.mt_op == MTOFFL) { in st_ioctl()
3708 if (mtc.mt_op == MTLOAD) { in st_ioctl()
3709 retval = do_load_unload(STp, file, max(1, mtc.mt_count)); in st_ioctl()
3713 if (mtc.mt_op == MTLOCK || mtc.mt_op == MTUNLOCK) { in st_ioctl()
3714 retval = do_door_lock(STp, (mtc.mt_op == MTLOCK)); in st_ioctl()
3724 if (mtc.mt_op == MTCOMPRESSION) in st_ioctl()
3725 retval = st_compression(STp, (mtc.mt_count & 1)); in st_ioctl()
3727 retval = st_int_ioctl(STp, mtc.mt_op, mtc.mt_count); in st_ioctl()