Module Name:    src
Committed By:   pooka
Date:           Mon Sep  7 13:52:06 UTC 2009

Modified Files:
        src/dist/smbfs/mount_smbfs: mount_smbfs.c

Log Message:
Fill canon_dev so that mntfromname gets properly set for p2k mounts.
Fixes problem pointed out by Nicolas Joly.

XXX: would probably be better to forget canon_dev from the parseargs
interface completely and do rump_sys_statvfs() in p2k after mounting
the fail system in the virtual kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/dist/smbfs/mount_smbfs/mount_smbfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/dist/smbfs/mount_smbfs/mount_smbfs.c
diff -u src/dist/smbfs/mount_smbfs/mount_smbfs.c:1.10 src/dist/smbfs/mount_smbfs/mount_smbfs.c:1.11
--- src/dist/smbfs/mount_smbfs/mount_smbfs.c:1.10	Fri Sep  4 18:22:37 2009
+++ src/dist/smbfs/mount_smbfs/mount_smbfs.c	Mon Sep  7 13:52:05 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_smbfs.c,v 1.10 2009/09/04 18:22:37 pooka Exp $ */
+/* $NetBSD: mount_smbfs.c,v 1.11 2009/09/07 13:52:05 pooka Exp $ */
 
 /*
  * Copyright (c) 2000-2002, Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mount_smbfs.c,v 1.10 2009/09/04 18:22:37 pooka Exp $");
+__RCSID("$NetBSD: mount_smbfs.c,v 1.11 2009/09/07 13:52:05 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -252,6 +252,10 @@
 	mdatap->version = SMBFS_VERSION;
 	mdatap->dev_fd = ctx->ct_fd;
 	mdatap->caseopt = caseopt;
+
+	snprintf(canon_dev, MAXPATHLEN, "//%...@%s/%s",
+	    ctx->ct_ssn.ioc_user[0] ? ctx->ct_ssn.ioc_user : "guest",
+	    ctx->ct_ssn.ioc_srvname, ctx->ct_sh.ioc_share);
 }
 
 int

Reply via email to