summaryrefslogtreecommitdiff
path: root/btrfstune.c
diff options
context:
space:
mode:
Diffstat (limited to 'btrfstune.c')
-rw-r--r--btrfstune.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/btrfstune.c b/btrfstune.c
index 855427f..2c26fe9 100644
--- a/btrfstune.c
+++ b/btrfstune.c
@@ -151,7 +151,12 @@ int main(int argc, char *argv[])
return 1;
}
- if (check_mounted(device)) {
+ ret = check_mounted(device);
+ if (ret < 0) {
+ fprintf(stderr, "Could not check mount status: %s\n",
+ strerror(-ret));
+ return 1;
+ } else if (ret) {
fprintf(stderr, "%s is mounted\n", device);
return 1;
}