qemu-nbd.c (3d861a01093f8eedfac9889746ccafcfd32039b7) | qemu-nbd.c (7fb1cf1606c78c9d5b538f29176fd5a101726a9d) |
---|---|
1/* 2 * Copyright (C) 2005 Anthony Liguori <anthony@codemonkey.ws> 3 * 4 * Network Block Device 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; under version 2 of the License. --- 473 unchanged lines hidden (view full) --- 482 if (bdrv_parse_discard_flags(optarg, &flags) == -1) { 483 errx(EXIT_FAILURE, "Invalid discard mode `%s'", optarg); 484 } 485 break; 486 case QEMU_NBD_OPT_DETECT_ZEROES: 487 detect_zeroes = 488 qapi_enum_parse(BlockdevDetectZeroesOptions_lookup, 489 optarg, | 1/* 2 * Copyright (C) 2005 Anthony Liguori <anthony@codemonkey.ws> 3 * 4 * Network Block Device 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; under version 2 of the License. --- 473 unchanged lines hidden (view full) --- 482 if (bdrv_parse_discard_flags(optarg, &flags) == -1) { 483 errx(EXIT_FAILURE, "Invalid discard mode `%s'", optarg); 484 } 485 break; 486 case QEMU_NBD_OPT_DETECT_ZEROES: 487 detect_zeroes = 488 qapi_enum_parse(BlockdevDetectZeroesOptions_lookup, 489 optarg, |
490 BLOCKDEV_DETECT_ZEROES_OPTIONS_MAX, | 490 BLOCKDEV_DETECT_ZEROES_OPTIONS__MAX, |
491 BLOCKDEV_DETECT_ZEROES_OPTIONS_OFF, 492 &local_err); 493 if (local_err) { 494 errx(EXIT_FAILURE, "Failed to parse detect_zeroes mode: %s", 495 error_get_pretty(local_err)); 496 } 497 if (detect_zeroes == BLOCKDEV_DETECT_ZEROES_OPTIONS_UNMAP && 498 !(flags & BDRV_O_UNMAP)) { --- 280 unchanged lines hidden --- | 491 BLOCKDEV_DETECT_ZEROES_OPTIONS_OFF, 492 &local_err); 493 if (local_err) { 494 errx(EXIT_FAILURE, "Failed to parse detect_zeroes mode: %s", 495 error_get_pretty(local_err)); 496 } 497 if (detect_zeroes == BLOCKDEV_DETECT_ZEROES_OPTIONS_UNMAP && 498 !(flags & BDRV_O_UNMAP)) { --- 280 unchanged lines hidden --- |