aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-device.c
diff options
context:
space:
mode:
authorAlexander Fougner <fougner89@gmail.com>2015-11-07 01:26:24 +0100
committerDavid Sterba <dsterba@suse.com>2015-11-16 14:23:44 +0100
commit56480048e4f9f3e79f835b531a4b03d7fe94100b (patch)
tree554d572b8c201017babdc95e6cd5a091d0bed89e /cmds-device.c
parentf4942228d25d7a63033d7db60a189f87cf08d71a (diff)
downloadbtrfs-progs-56480048e4f9f3e79f835b531a4b03d7fe94100b.tar.gz
btrfs-progs-56480048e4f9f3e79f835b531a4b03d7fe94100b.tar.xz
btrfs-progs-56480048e4f9f3e79f835b531a4b03d7fe94100b.zip
btrfs-progs: allow device deletion using 'missing' keyword again
Device deletion procedures ensures the device is a block device. This patch introduces 'missing' as keyword again, correctly passing it on to the kernel instead of complaining about 'missing' not being a block device. Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 2ed32a2..bea1a06 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -161,7 +161,7 @@ static int _cmd_device_remove(int argc, char **argv,
struct btrfs_ioctl_vol_args arg;
int res;
- if (is_block_device(argv[i]) != 1) {
+ if (is_block_device(argv[i]) != 1 && strcmp(argv[i], "missing")) {
fprintf(stderr,
"ERROR: %s is not a block device\n", argv[i]);
ret++;