diff options
Diffstat (limited to 'cmds-device.c')
-rw-r--r-- | cmds-device.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds-device.c b/cmds-device.c index 59695feb..a939c56f 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -107,8 +107,9 @@ static int cmd_device_add(int argc, char **argv) continue; } - res = btrfs_prepare_device(devfd, argv[i], 1, &dev_block_count, - 0, discard); + res = btrfs_prepare_device(devfd, argv[i], &dev_block_count, 0, + PREP_DEVICE_ZERO_END | PREP_DEVICE_VERBOSE | + (discard ? PREP_DEVICE_DISCARD : 0)); close(devfd); if (res) { ret++; |