Skip to contentSkip to conversation

btrfs-progs: correct error message in btrfs_scan_one_dir

PATCH New Andi Drebes 1 participant 1 message Oct 31, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: correct error message in btrfs_scan_one_dir

When opendir() fails on the directory to be scanned, the error message should mention the correct directory name instead of "/sys/block".

---

utils.c +1 -1
index 2f4c6e1..5c58071 100644
@@ -694,7 +694,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) {