summaryrefslogtreecommitdiff
path: root/cmds-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 2bb6bcb1..5f2b952a 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -163,7 +163,7 @@ static int _cmd_device_remove(int argc, char **argv,
struct btrfs_ioctl_vol_args arg;
int res;
- if (!is_block_device(argv[i])) {
+ if (is_block_device(argv[i]) != 1) {
fprintf(stderr,
"ERROR: %s is not a block device\n", argv[i]);
ret++;
@@ -264,7 +264,7 @@ static int cmd_device_scan(int argc, char **argv)
for( i = devstart ; i < argc ; i++ ){
char *path;
- if (!is_block_device(argv[i])) {
+ if (is_block_device(argv[i]) != 1) {
fprintf(stderr,
"ERROR: %s is not a block device\n", argv[i]);
ret = 1;
@@ -323,7 +323,7 @@ static int cmd_device_ready(int argc, char **argv)
goto out;
}
- if (!is_block_device(path)) {
+ if (is_block_device(path) != 1) {
fprintf(stderr,
"ERROR: %s is not a block device\n", path);
ret = 1;