aboutsummaryrefslogtreecommitdiffstats
path: root/disk-io.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-03-18 16:34:33 +0100
committerDavid Sterba <dsterba@suse.com>2016-03-18 16:38:14 +0100
commit274b1d912114db739e41af2960175f5e6a14463b (patch)
tree2c7d1724fb8281ab14c5fc33de9dd38aa62d0324 /disk-io.c
parentc921544bba7c49f0e7ea882bbff301a0d82e4f70 (diff)
downloadbtrfs-progs-274b1d912114db739e41af2960175f5e6a14463b.tar.gz
btrfs-progs-274b1d912114db739e41af2960175f5e6a14463b.tar.xz
btrfs-progs-274b1d912114db739e41af2960175f5e6a14463b.zip
btrfs-progs: switch to common message helpers in open_ctree_fs_info
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/disk-io.c b/disk-io.c
index c46f366..4302e80 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1334,7 +1334,7 @@ struct btrfs_fs_info *open_ctree_fs_info(const char *filename,
return NULL;
}
if (!(((st.st_mode & S_IFMT) == S_IFREG) || ((st.st_mode & S_IFMT) == S_IFBLK))) {
- fprintf (stderr, "%s is not a regular file or block device\n", filename);
+ error("not a regular file or block device: %s", filename);
return NULL;
}
@@ -1343,7 +1343,7 @@ struct btrfs_fs_info *open_ctree_fs_info(const char *filename,
fp = open(filename, oflags, 0600);
if (fp < 0) {
- fprintf (stderr, "Could not open %s\n", filename);
+ error("cannot open '%s': %s", filename, strerror(errno));
return NULL;
}
info = __open_ctree_fd(fp, filename, sb_bytenr, root_tree_bytenr,