summaryrefslogtreecommitdiff
path: root/btrfs-image.c
diff options
context:
space:
mode:
Diffstat (limited to 'btrfs-image.c')
-rw-r--r--btrfs-image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs-image.c b/btrfs-image.c
index 3684a05b..b2253252 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -894,7 +894,7 @@ static int read_data_extent(struct metadump_struct *md,
device = multi->stripes[0].dev;
- if (device->fd == 0) {
+ if (device->fd <= 0) {
fprintf(stderr,
"Device we need to read from is not open\n");
free(multi);