From 4d065447e4e4b0d4e3deab3d4205e30531b479b7 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 10 Mar 2017 09:19:50 -0800 Subject: [PATCH] hammer2 - Have mount assume that @LABEL refers to a hammer2 vfs * hammer2 will soon allow mount @LABEL for any LABEL that it already knows about. Make the base mount program aware of this and do not require the user to specify the vfs type. --- sbin/mount/mount.8 | 3 ++- sbin/mount/mount.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index 379344aa8b..8918051237 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -55,7 +55,8 @@ utility calls the .Xr mount 2 system call to prepare and graft a .Ar "special device" -or the remote node (rhost:path) on to the file system tree at the point +or the remote node (rhost:path) or a HAMMER2 label (@label) on to the +file system tree at the point .Ar node . If either .Ar special diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 9eba6cccb9..09c018ff33 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -278,6 +278,10 @@ main(int argc, char **argv) * If the spec is not a file and contains a ':' then assume * NFS. * + * If the spec is not a file and contains a '@' then assume + * HAMMER2. Note that there may not be a raw device + * specified in this situation. + * * If the spec is a cdev attempt to extract the fstype from * the label. * @@ -287,6 +291,9 @@ main(int argc, char **argv) if (strpbrk(argv[0], ":") != NULL && access(argv[0], 0) == -1) { vfstype = "nfs"; + } else if (strpbrk(argv[0], "@") != NULL && + access(argv[0], 0) == -1) { + vfstype = "hammer2"; } else { checkdisklabel(argv[0], &vfstype); } -- 2.11.4.GIT