Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
---
disk-io.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index e49c220..9e0cfe8 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -530,7 +530,7 @@ struct btrfs_root *open_ctree(const char *filename, u64
sb_bytenr, int writes)
fp = open(filename, flags, 0600);
if (fp < 0) {
- fprintf (stderr, "Coult not open %s\n", filename);
+ fprintf (stderr, "Could not open %s\n", filename);
return NULL;
}
root = open_ctree_fd(fp, filename, sb_bytenr, writes);
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thadeu Lima de Souza Cascardo
2009-Jan-23 21:14 UTC
[PATCH] Add error message explaining why opening a device failed
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
---
disk-io.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index 9e0cfe8..5986709 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -530,7 +530,8 @@ struct btrfs_root *open_ctree(const char *filename, u64
sb_bytenr, int writes)
fp = open(filename, flags, 0600);
if (fp < 0) {
- fprintf (stderr, "Could not open %s\n", filename);
+ fprintf (stderr, "Could not open %s: %s\n", filename,
+ strerror (errno));
return NULL;
}
root = open_ctree_fd(fp, filename, sb_bytenr, writes);
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ashford@whisperpc.com
2009-Jan-24 03:39 UTC
[PATCH] btrfs_progs/mkfs.c more input data verification cleanup
Yet another patch for mkfs input data verification.
# diff -u mkfs.c- mkfs.c
--- mkfs.c- 2009-01-23 19:26:33.000000000 -0800
+++ mkfs.c 2009-01-23 19:33:07.000000000 -0800
@@ -406,13 +406,23 @@
exit(1);
}
- if (leafsize < sectorsize || (leafsize & (sectorsize - 1))) {
- fprintf(stderr, "Illegal leafsize %u\n", leafsize);
+ if (leafsize < sectorsize) {
+ printf("Leafsize %u smaller than sectorsize %u -
corrected\n",
+ leafsize, (u32)getpagesize());
+ leafsize = sectorsize;
+ } else if ((leafsize & (sectorsize - 1))) {
+ fprintf(stderr, "Leafsize %u not a multiple of sectorsize
%u\n",
+ leafsize, sectorsize);
exit(1);
}
- if (nodesize < sectorsize || (nodesize & (sectorsize - 1))) {
- fprintf(stderr, "Illegal nodesize %u\n", nodesize);
+ if (nodesize < sectorsize) {
+ printf("Nodesize %u smaller than sectorsize %u -
corrected\n",
+ nodesize, (u32)getpagesize());
+ nodesize = sectorsize;
+ } else if ((nodesize & (sectorsize - 1))) {
+ fprintf(stderr, "Nodesize %u not a multiple of sectorsize
%u\n",
+ nodesize, sectorsize);
exit(1);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html