Lines Matching refs:mtc

3537 		struct mtop mtc;  in st_ioctl()  local
3539 if (_IOC_SIZE(cmd_in) != sizeof(mtc)) { in st_ioctl()
3544 i = copy_from_user(&mtc, p, sizeof(struct mtop)); in st_ioctl()
3550 if (mtc.mt_op == MTSETDRVBUFFER && !capable(CAP_SYS_ADMIN)) { in st_ioctl()
3557 (mtc.mt_op != MTSETDRVBUFFER && in st_ioctl()
3558 (mtc.mt_count & MT_ST_OPTIONS) == 0)) { in st_ioctl()
3566 if (mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3567 mtc.mt_op == MTEOM) { in st_ioctl()
3568 mtc.mt_count -= 1; in st_ioctl()
3571 } else if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) { in st_ioctl()
3572 mtc.mt_count += 1; in st_ioctl()
3578 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3584 i = mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3585 mtc.mt_op == MTRETEN || mtc.mt_op == MTEOM || in st_ioctl()
3586 mtc.mt_op == MTLOCK || mtc.mt_op == MTLOAD || in st_ioctl()
3587 mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3588 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM || in st_ioctl()
3589 mtc.mt_op == MTCOMPRESSION; in st_ioctl()
3597 (mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3598 mtc.mt_op == MTSEEK || in st_ioctl()
3599 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM)) { in st_ioctl()
3605 if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) in st_ioctl()
3606 mtc.mt_count++; in st_ioctl()
3616 if (mtc.mt_op != MTREW && in st_ioctl()
3617 mtc.mt_op != MTOFFL && in st_ioctl()
3618 mtc.mt_op != MTRETEN && in st_ioctl()
3619 mtc.mt_op != MTERASE && in st_ioctl()
3620 mtc.mt_op != MTSEEK && in st_ioctl()
3621 mtc.mt_op != MTEOM) { in st_ioctl()
3630 if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK && in st_ioctl()
3631 mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTWSM && in st_ioctl()
3632 mtc.mt_op != MTSETDRVBUFFER && mtc.mt_op != MTSETPART) in st_ioctl()
3635 if (mtc.mt_op == MTOFFL && STp->door_locked != ST_UNLOCKED) in st_ioctl()
3638 if (mtc.mt_op == MTSETDRVBUFFER && in st_ioctl()
3639 (mtc.mt_count & MT_ST_OPTIONS) != 0) { in st_ioctl()
3640 retval = st_set_options(STp, mtc.mt_count); in st_ioctl()
3644 if (mtc.mt_op == MTSETPART) { in st_ioctl()
3646 mtc.mt_count < 0 || mtc.mt_count >= ST_NBR_PARTITIONS) { in st_ioctl()
3650 if (mtc.mt_count >= STp->nbr_partitions && in st_ioctl()
3655 if (mtc.mt_count >= STp->nbr_partitions) { in st_ioctl()
3659 STp->new_partition = mtc.mt_count; in st_ioctl()
3664 if (mtc.mt_op == MTMKPART) { in st_ioctl()
3674 i = partition_tape(STp, mtc.mt_count); in st_ioctl()
3685 STp->nbr_partitions = mtc.mt_count != 0 ? 2 : 1; in st_ioctl()
3691 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3692 i = set_location(STp, mtc.mt_count, STp->new_partition, 0); in st_ioctl()
3699 if (mtc.mt_op == MTUNLOAD || mtc.mt_op == MTOFFL) { in st_ioctl()
3704 if (mtc.mt_op == MTLOAD) { in st_ioctl()
3705 retval = do_load_unload(STp, file, max(1, mtc.mt_count)); in st_ioctl()
3709 if (mtc.mt_op == MTLOCK || mtc.mt_op == MTUNLOCK) { in st_ioctl()
3710 retval = do_door_lock(STp, (mtc.mt_op == MTLOCK)); in st_ioctl()
3720 if (mtc.mt_op == MTCOMPRESSION) in st_ioctl()
3721 retval = st_compression(STp, (mtc.mt_count & 1)); in st_ioctl()
3723 retval = st_int_ioctl(STp, mtc.mt_op, mtc.mt_count); in st_ioctl()