diff options
author | Goldwyn Rodrigues <rgoldwyn@gmail.com> | 2011-02-07 07:34:36 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-10-25 09:18:31 -0400 |
commit | eb5418933f9729db0b7dbcf8eb0f40a4be01f273 (patch) | |
tree | 743651c4f78178a314ccd759aa149c6b90c2000a | |
parent | 16261f09c4cef8f88a902108d7b78a17d775028c (diff) |
Btrfs-progs utils Informative errors
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -867,7 +867,7 @@ again: } dirp = opendir(dirname); if (!dirp) { - fprintf(stderr, "Unable to open /sys/block for scanning\n"); + fprintf(stderr, "Unable to open %s for scanning\n", dirname); return -ENOENT; } while(1) { @@ -902,7 +902,8 @@ again: } fd = open(fullpath, O_RDONLY); if (fd < 0) { - fprintf(stderr, "failed to read %s\n", fullpath); + fprintf(stderr, "failed to read %s: %s\n", fullpath, + strerror(errno)); continue; } ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices, |