On Tue, Jan 15, 2008 at 10:52:38AM -0500, Chris Mason wrote:
> http://oss.oracle.com/projects/btrfs/
> 
> Btrfs is still in an early alpha state, and the disk format is not finalized.
> v0.10 introduces a new disk format, and is not compatible with v0.9.
> 

Looks like fun. btrfsck fails to check if it actually received a
dev argument though, so if you don't pass a device, we get a nice
segfault.

Signed-off-by: Kyle McMartin <[EMAIL PROTECTED]>

---
diff -Nur btrfs-progs-0.10/btrfsck.c btrfs-progs-0.10-kyle/btrfsck.c
--- btrfs-progs-0.10/btrfsck.c  2008-01-15 10:33:32.000000000 -0500
+++ btrfs-progs-0.10-kyle/btrfsck.c     2008-01-15 11:49:24.000000000 -0500
@@ -709,6 +709,11 @@
        return err;
 }
 
+void print_usage(void) {
+       fprintf(stderr, "usage: btrfsck dev\n");
+       exit(1);
+}
+
 int main(int ac, char **av) {
        struct btrfs_root *root;
        struct cache_tree extent_cache;
@@ -727,6 +732,9 @@
        int slot;
        struct btrfs_root_item ri;
 
+       if (ac < 2)
+               print_usage();
+
        radix_tree_init();
        cache_tree_init(&extent_cache);
        cache_tree_init(&seen);
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to