qemu-io.c (07f35073c6d6d1b2f42a6b3671b8af2f271986b9) | qemu-io.c (922453bca6a927bb527068ae8679d587cfa45dbc) |
---|---|
1/* 2 * Command line utility to exercise the QEMU I/O path. 3 * 4 * Copyright (C) 2009 Red Hat, Inc. 5 * Copyright (c) 2003-2005 Silicon Graphics, Inc. 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2 or later. 8 * See the COPYING file in the top-level directory. --- 431 unchanged lines hidden (view full) --- 440 return command_usage(&read_cmd); 441 } 442 443 if (!lflag) { 444 pattern_count = count - pattern_offset; 445 } 446 447 if ((pattern_count < 0) || (pattern_count + pattern_offset > count)) { | 1/* 2 * Command line utility to exercise the QEMU I/O path. 3 * 4 * Copyright (C) 2009 Red Hat, Inc. 5 * Copyright (c) 2003-2005 Silicon Graphics, Inc. 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2 or later. 8 * See the COPYING file in the top-level directory. --- 431 unchanged lines hidden (view full) --- 440 return command_usage(&read_cmd); 441 } 442 443 if (!lflag) { 444 pattern_count = count - pattern_offset; 445 } 446 447 if ((pattern_count < 0) || (pattern_count + pattern_offset > count)) { |
448 printf("pattern verification range exceeds end of read data\n"); | 448 printf("pattern verfication range exceeds end of read data\n"); |
449 return 0; 450 } 451 452 if (!pflag) { 453 if (offset & 0x1ff) { 454 printf("offset %" PRId64 " is not sector aligned\n", 455 offset); 456 return 0; --- 1391 unchanged lines hidden (view full) --- 1848 } 1849 1850 if ((argc - optind) == 1) { 1851 openfile(argv[optind], flags, growable); 1852 } 1853 command_loop(); 1854 1855 /* | 449 return 0; 450 } 451 452 if (!pflag) { 453 if (offset & 0x1ff) { 454 printf("offset %" PRId64 " is not sector aligned\n", 455 offset); 456 return 0; --- 1391 unchanged lines hidden (view full) --- 1848 } 1849 1850 if ((argc - optind) == 1) { 1851 openfile(argv[optind], flags, growable); 1852 } 1853 command_loop(); 1854 1855 /* |
1856 * Make sure all outstanding requests get flushed the program exits. | 1856 * Make sure all outstanding requests complete before the program exits. |
1857 */ | 1857 */ |
1858 qemu_aio_flush(); | 1858 bdrv_drain_all(); |
1859 1860 if (bs) { 1861 bdrv_delete(bs); 1862 } 1863 return 0; 1864} | 1859 1860 if (bs) { 1861 bdrv_delete(bs); 1862 } 1863 return 0; 1864} |