From 2dd9a2a557ca1e20ed61f230f8e117a03d82ea03 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Tue, 27 Sep 2016 05:42:29 +0900 Subject: [PATCH] sbin/hammer: Partly revert 2c1d3cef in 2010 This is the same as d6c59c72, so read d6c59c72 for details. The code in 2c1d3cef in 2010 was later replaced by libhammer, so what this commit actually does is revert a part of those libhammer commits, but whatever it is, a certain directory being null mounted on somewhere else is beyond the scope of hammer or any other filesystems. This command originally had no such extra info, and that was better. It's also confusing in the sense that it silently changes the output depending on whether it's mounted or not. --- sbin/hammer/cmd_snapshot.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sbin/hammer/cmd_snapshot.c b/sbin/hammer/cmd_snapshot.c index e07d32e896..ed57e84d7d 100644 --- a/sbin/hammer/cmd_snapshot.c +++ b/sbin/hammer/cmd_snapshot.c @@ -34,8 +34,6 @@ * $DragonFly: src/sbin/hammer/cmd_snapshot.c,v 1.7 2008/07/10 18:47:22 mneumann Exp $ */ -#include - #include "hammer.h" #define DEFAULT_SNAPSHOT_NAME "snap-%Y%m%d-%H%M" @@ -487,7 +485,6 @@ snapshot_ls(const char *path) uint32_t i; int fd; char snapts[64]; - char *mntpoint; fd = open(path, O_RDONLY); if (fd < 0) { @@ -507,15 +504,9 @@ snapshot_ls(const char *path) /* not reached */ } - mntpoint = libhammer_find_pfs_mount(&pfs.ondisk->unique_uuid); - - printf("Snapshots on %s\tPFS #%d\n", - mntpoint ? mntpoint : path, pfs.pfs_id); + printf("Snapshots on %s\tPFS #%d\n", path, pfs.pfs_id); printf("Transaction ID\t\tTimestamp\t\tNote\n"); - if (mntpoint) - free(mntpoint); - bzero(&snapshot, sizeof(snapshot)); do { if (ioctl(fd, HAMMERIOC_GET_SNAPSHOT, &snapshot) < 0) { -- 2.11.4.GIT