Lines Matching refs:mtc

3535 		struct mtop mtc;  in st_ioctl()  local
3537 if (_IOC_SIZE(cmd_in) != sizeof(mtc)) { in st_ioctl()
3542 i = copy_from_user(&mtc, p, sizeof(struct mtop)); in st_ioctl()
3548 if (mtc.mt_op == MTSETDRVBUFFER && !capable(CAP_SYS_ADMIN)) { in st_ioctl()
3555 (mtc.mt_op != MTSETDRVBUFFER && in st_ioctl()
3556 (mtc.mt_count & MT_ST_OPTIONS) == 0)) { in st_ioctl()
3564 if (mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3565 mtc.mt_op == MTEOM) { in st_ioctl()
3566 mtc.mt_count -= 1; in st_ioctl()
3569 } else if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) { in st_ioctl()
3570 mtc.mt_count += 1; in st_ioctl()
3576 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3582 i = mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3583 mtc.mt_op == MTRETEN || mtc.mt_op == MTEOM || in st_ioctl()
3584 mtc.mt_op == MTLOCK || mtc.mt_op == MTLOAD || in st_ioctl()
3585 mtc.mt_op == MTFSF || mtc.mt_op == MTFSFM || in st_ioctl()
3586 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM || in st_ioctl()
3587 mtc.mt_op == MTCOMPRESSION; in st_ioctl()
3595 (mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || in st_ioctl()
3596 mtc.mt_op == MTSEEK || in st_ioctl()
3597 mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM)) { in st_ioctl()
3603 if (mtc.mt_op == MTBSF || mtc.mt_op == MTBSFM) in st_ioctl()
3604 mtc.mt_count++; in st_ioctl()
3614 if (mtc.mt_op != MTREW && in st_ioctl()
3615 mtc.mt_op != MTOFFL && in st_ioctl()
3616 mtc.mt_op != MTRETEN && in st_ioctl()
3617 mtc.mt_op != MTERASE && in st_ioctl()
3618 mtc.mt_op != MTSEEK && in st_ioctl()
3619 mtc.mt_op != MTEOM) { in st_ioctl()
3628 if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK && in st_ioctl()
3629 mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTWSM && in st_ioctl()
3630 mtc.mt_op != MTSETDRVBUFFER && mtc.mt_op != MTSETPART) in st_ioctl()
3633 if (mtc.mt_op == MTOFFL && STp->door_locked != ST_UNLOCKED) in st_ioctl()
3636 if (mtc.mt_op == MTSETDRVBUFFER && in st_ioctl()
3637 (mtc.mt_count & MT_ST_OPTIONS) != 0) { in st_ioctl()
3638 retval = st_set_options(STp, mtc.mt_count); in st_ioctl()
3642 if (mtc.mt_op == MTSETPART) { in st_ioctl()
3644 mtc.mt_count < 0 || mtc.mt_count >= ST_NBR_PARTITIONS) { in st_ioctl()
3648 if (mtc.mt_count >= STp->nbr_partitions && in st_ioctl()
3653 if (mtc.mt_count >= STp->nbr_partitions) { in st_ioctl()
3657 STp->new_partition = mtc.mt_count; in st_ioctl()
3662 if (mtc.mt_op == MTMKPART) { in st_ioctl()
3672 i = partition_tape(STp, mtc.mt_count); in st_ioctl()
3683 STp->nbr_partitions = mtc.mt_count != 0 ? 2 : 1; in st_ioctl()
3689 if (mtc.mt_op == MTSEEK) { in st_ioctl()
3690 i = set_location(STp, mtc.mt_count, STp->new_partition, 0); in st_ioctl()
3697 if (mtc.mt_op == MTUNLOAD || mtc.mt_op == MTOFFL) { in st_ioctl()
3702 if (mtc.mt_op == MTLOAD) { in st_ioctl()
3703 retval = do_load_unload(STp, file, max(1, mtc.mt_count)); in st_ioctl()
3707 if (mtc.mt_op == MTLOCK || mtc.mt_op == MTUNLOCK) { in st_ioctl()
3708 retval = do_door_lock(STp, (mtc.mt_op == MTLOCK)); in st_ioctl()
3718 if (mtc.mt_op == MTCOMPRESSION) in st_ioctl()
3719 retval = st_compression(STp, (mtc.mt_count & 1)); in st_ioctl()
3721 retval = st_int_ioctl(STp, mtc.mt_op, mtc.mt_count); in st_ioctl()