Home | History | Annotate | Download | only in misc

Lines Matching defs:try

351 static int do_read (int dev, unsigned char * buffer, int try, int block_size,
360 printf("do_read: block %d, try %d\n", current_block, try);
362 set_o_direct(dev, buffer, try * block_size,
373 /* Try the read */
376 got = read (dev, buffer, try * block_size);
384 if (d_flag && got == try) {
427 static int do_write(int dev, unsigned char * buffer, int try, int block_size,
433 printf("do_write: block %lu, try %d\n", current_block, try);
435 set_o_direct(dev, buffer, try * block_size,
446 /* Try the write */
447 got = write (dev, buffer, try * block_size);
477 int try;
518 try = blocks_at_once;
540 else if (currently_testing + try > next_bad)
541 try = next_bad - currently_testing;
543 if (currently_testing + try > last_block)
544 try = last_block - currently_testing;
545 got = do_read (dev, blkbuf, try, block_size, currently_testing);
556 if (got == 0 && try == 1)
559 if (got != try) {
560 try = 1;
566 try = blocks_at_once;
592 int i, try, got, nr_pattern, pat_idx;
632 try = blocks_at_once;
640 if (currently_testing + try > last_block)
641 try = last_block - currently_testing;
642 got = do_write(dev, buffer, try, block_size,
647 try == 1)
650 if (got != try) {
651 try = 1;
657 try = blocks_at_once;
674 try = blocks_at_once;
682 if (currently_testing + try > last_block)
683 try = last_block - currently_testing;
684 got = do_read (dev, read_buffer, try, block_size,
686 if (got == 0 && try == 1)
689 if (got != try) {
690 try = 1;
696 try = blocks_at_once;
731 int try, i;
829 got = try = granularity - buf_used;
837 else if (currently_testing + try > next_bad)
838 try = next_bad - currently_testing;
840 if (currently_testing + try > last_block)
841 try = last_block - currently_testing;
842 got = do_read (dev, save_ptr, try, block_size,
878 if (got != try) {
879 try = 1;
918 try = 0;
921 if (try == 0) {
925 try = test_record[used2].num;
929 got = do_read (dev, read_ptr, try,
938 if (got < try) {
951 try -= got;