tag | line | file | source code |
mtc | 2466 | drivers/scsi/st.c | struct mtop mtc; |
mtc | 2487 | drivers/scsi/st.c | if (_IOC_SIZE(cmd_in) != sizeof(mtc)) |
mtc | 2490 | drivers/scsi/st.c | i = verify_area(VERIFY_READ, (void *)arg, sizeof(mtc)); |
mtc | 2494 | drivers/scsi/st.c | memcpy_fromfs((char *) &mtc, (char *)arg, sizeof(struct mtop)); |
mtc | 2496 | drivers/scsi/st.c | if (mtc.mt_op == MTSETDRVBUFFER && !suser()) { |
mtc | 2501 | drivers/scsi/st.c | (mtc.mt_op != MTSETDRVBUFFER && (mtc.mt_count & MT_ST_OPTIONS) == 0)) |
mtc | 2507 | drivers/scsi/st.c | if (mtc.mt_op == MTFSF || mtc.mt_op == MTEOM) { |
mtc | 2508 | drivers/scsi/st.c | mtc.mt_count -= 1; |
mtc | 2511 | drivers/scsi/st.c | else if (mtc.mt_op == MTBSF) { |
mtc | 2512 | drivers/scsi/st.c | mtc.mt_count += 1; |
mtc | 2517 | drivers/scsi/st.c | i = flush_buffer(inode, file, mtc.mt_op == MTSEEK || |
mtc | 2518 | drivers/scsi/st.c | mtc.mt_op == MTREW || mtc.mt_op == MTOFFL || |
mtc | 2519 | drivers/scsi/st.c | mtc.mt_op == MTRETEN || mtc.mt_op == MTEOM || |
mtc | 2520 | drivers/scsi/st.c | mtc.mt_op == MTLOCK || mtc.mt_op == MTLOAD || |
mtc | 2521 | drivers/scsi/st.c | mtc.mt_op == MTCOMPRESSION); |
mtc | 2531 | drivers/scsi/st.c | if(mtc.mt_op != MTREW && |
mtc | 2532 | drivers/scsi/st.c | mtc.mt_op != MTOFFL && |
mtc | 2533 | drivers/scsi/st.c | mtc.mt_op != MTRETEN && |
mtc | 2534 | drivers/scsi/st.c | mtc.mt_op != MTERASE && |
mtc | 2535 | drivers/scsi/st.c | mtc.mt_op != MTSEEK && |
mtc | 2536 | drivers/scsi/st.c | mtc.mt_op != MTEOM) |
mtc | 2549 | drivers/scsi/st.c | if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK && |
mtc | 2550 | drivers/scsi/st.c | mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTWSM && |
mtc | 2551 | drivers/scsi/st.c | mtc.mt_op != MTSETDRVBUFFER && mtc.mt_op != MTSEEK && |
mtc | 2552 | drivers/scsi/st.c | mtc.mt_op != MTSETPART) |
mtc | 2555 | drivers/scsi/st.c | if (mtc.mt_op == MTOFFL && STp->door_locked != ST_UNLOCKED) |
mtc | 2558 | drivers/scsi/st.c | if (mtc.mt_op == MTSETDRVBUFFER && |
mtc | 2559 | drivers/scsi/st.c | (mtc.mt_count & MT_ST_OPTIONS) != 0) |
mtc | 2560 | drivers/scsi/st.c | return st_set_options(inode, mtc.mt_count); |
mtc | 2561 | drivers/scsi/st.c | if (mtc.mt_op == MTSETPART) { |
mtc | 2563 | drivers/scsi/st.c | mtc.mt_count < 0 || mtc.mt_count >= ST_NBR_PARTITIONS) |
mtc | 2565 | drivers/scsi/st.c | if (mtc.mt_count >= STp->nbr_partitions && |
mtc | 2568 | drivers/scsi/st.c | if (mtc.mt_count >= STp->nbr_partitions) |
mtc | 2570 | drivers/scsi/st.c | STp->new_partition = mtc.mt_count; |
mtc | 2573 | drivers/scsi/st.c | if (mtc.mt_op == MTMKPART) { |
mtc | 2577 | drivers/scsi/st.c | (i = partition_tape(inode, mtc.mt_count)) < 0) |
mtc | 2590 | drivers/scsi/st.c | if (mtc.mt_op == MTSEEK) { |
mtc | 2591 | drivers/scsi/st.c | i = set_location(inode, mtc.mt_count, STp->new_partition, 0); |
mtc | 2599 | drivers/scsi/st.c | if (mtc.mt_op == MTCOMPRESSION) |
mtc | 2600 | drivers/scsi/st.c | return st_compression(STp, (mtc.mt_count & 1)); |
mtc | 2602 | drivers/scsi/st.c | return st_int_ioctl(inode, mtc.mt_op, mtc.mt_count); |