On Tue, Jan 15, 2008 at 10:52:38AM -0500, Chris Mason wrote: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 <kmcmartin@redhat.com> --- 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Glauber de Oliveira Costa | [PATCH 0/19] desc_struct integration |
| Paolo Ornati | Re: [patch 00/69] -stable review |
| Ingo Molnar | [patch] CFS scheduler, -v6 |
git: | |
| Denis Bueno | git-instaweb portability issue (maybe?) |
| Jon Smirl | Re: Inconsistencies with git log |
| Johannes Schindelin | Re: [PATCH] Fix premature call to git_config() causing t1020-subdirectory to fail |
| Dan Farina | backup or mirror a repository |
| Marc Espie | Re: That whole "Linux stealing our code" thing |
| Ray Percival | Re: Real men don't attack straw men |
| askthelist | Packets Per Second Limit? |
| Didier Wiroth | how can I "find xyz | xargs tar" ... like gtar |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Giacomo A. Catenazzi | Re: [BUG] New Kernel Bugs |
| Tilman Schmidt | Re: 2.6.25-rc8: FTP transfer errors |
| Ingo Oeser | Re: [PATCH]: Third (final?) release of Sun Neptune driver |
| high memory | 10 hours ago | Linux kernel |
| semaphore access speed | 13 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 14 hours ago | Linux kernel |
| Easter Eggs in windows XP | 16 hours ago | Windows |
| Shared swap partition | 17 hours ago | Linux general |
| Root password | 18 hours ago | Linux general |
| Where/when DNOTIFY is used? | 19 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 22 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 22 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
