Lines Matching refs:err
60 int err; in vhd_print_header() local
76 err = vhd_header_decode_parent(vhd, h, &name); in vhd_print_header()
78 (err ? "failed to read name" : name)); in vhd_print_header()
190 int err; in vhd_print_parent() local
193 err = vhd_parent_locator_read(vhd, loc, &buf); in vhd_print_parent()
194 if (err) { in vhd_print_parent()
266 int err; in vhd_print_headers() local
277 err = vhd_get_batmap(vhd); in vhd_print_headers()
278 if (err) { in vhd_print_headers()
280 return err; in vhd_print_headers()
401 int i, err; in vhd_print_bitmap() local
415 err = vhd_read_bitmap(vhd, cur, &buf); in vhd_print_bitmap()
416 if (err) in vhd_print_bitmap()
424 err = 0; in vhd_print_bitmap()
426 return err; in vhd_print_bitmap()
434 int i, err, bit; in vhd_test_bitmap() local
456 err = vhd_read_bitmap(vhd, blk, &buf); in vhd_test_bitmap()
457 if (err) in vhd_test_bitmap()
472 err = 0; in vhd_test_bitmap()
475 return err; in vhd_test_bitmap()
481 int err; in vhd_print_batmap() local
484 err = vhd_get_batmap(vhd); in vhd_print_batmap()
485 if (err) { in vhd_print_batmap()
486 printf("failed to read batmap: %d\n", err); in vhd_print_batmap()
487 return err; in vhd_print_batmap()
499 int i, err; in vhd_test_batmap() local
505 err = vhd_get_batmap(vhd); in vhd_test_batmap()
506 if (err) { in vhd_test_batmap()
508 return err; in vhd_test_batmap()
524 int i, err; in vhd_print_data() local
527 err = 0; in vhd_print_data()
540 err = vhd_read_block(vhd, cur, &buf); in vhd_print_data()
541 if (err) in vhd_print_data()
548 return err; in vhd_print_data()
556 int err, max, secs; in vhd_read_data() local
562 err = posix_memalign((void **)&buf, VHD_SECTOR_SIZE, max); in vhd_read_data()
563 if (err) in vhd_read_data()
564 return -err; in vhd_read_data()
569 err = vhd_io_read(vhd, buf, cur, secs); in vhd_read_data()
570 if (err) in vhd_read_data()
580 return err; in vhd_read_data()
588 int c, err, headers, hex; in vhd_util_read() local
591 err = 0; in vhd_util_read()
656 err = vhd_open(&vhd, name, VHD_OPEN_RDONLY | VHD_OPEN_IGNORE_DISABLED); in vhd_util_read()
657 if (err) { in vhd_util_read()
658 printf("Failed to open %s: %d\n", name, err); in vhd_util_read()
660 return err; in vhd_util_read()
663 err = vhd_get_bat(&vhd); in vhd_util_read()
664 if (err) { in vhd_util_read()
665 printf("Failed to get bat for %s: %d\n", name, err); in vhd_util_read()
673 err = vhd_print_logical_to_physical(&vhd, lsec, count, hex); in vhd_util_read()
674 if (err) in vhd_util_read()
679 err = vhd_print_bat(&vhd, bat, count, hex); in vhd_util_read()
680 if (err) in vhd_util_read()
685 err = vhd_print_bitmap(&vhd, bitmap, count, hex); in vhd_util_read()
686 if (err) in vhd_util_read()
691 err = vhd_test_bitmap(&vhd, tbitmap, count, hex); in vhd_util_read()
692 if (err) in vhd_util_read()
697 err = vhd_print_batmap(&vhd); in vhd_util_read()
698 if (err) in vhd_util_read()
703 err = vhd_test_batmap(&vhd, tbatmap, count, hex); in vhd_util_read()
704 if (err) in vhd_util_read()
709 err = vhd_print_data(&vhd, data, count, hex); in vhd_util_read()
710 if (err) in vhd_util_read()
715 err = vhd_read_data(&vhd, read, count, hex); in vhd_util_read()
716 if (err) in vhd_util_read()
720 err = 0; in vhd_util_read()
724 return err; in vhd_util_read()