hammer utility - minor adjustment to snaprm
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 3 Dec 2009 23:04:25 +0000 (15:04 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 3 Dec 2009 23:04:25 +0000 (15:04 -0800)
* Allow the removal of snapshots with a transaction id of 0.  Such
  snapshots are a degenerate case which can occur only during testing.

sbin/hammer/cmd_snapshot.c

index 313e915..42779eb 100644 (file)
@@ -214,7 +214,7 @@ hammer_cmd_snaprm(char **av, int ac)
        for (i = 0; i < ac; ++i) {
                if (lstat(av[i], &st) < 0) {
                        tid = strtoull(av[i], &ptr, 16);
-                       if (tid == 0 || *ptr) {
+                       if (*ptr) {
                                err(2, "hammer snaprm: not a file or tid: %s",
                                    av[i]);
                                /* not reached */