Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/smbfs/mount_smbfs Fill canon_dev so that mntfromname ge...



details:   https://anonhg.NetBSD.org/src/rev/4e85f080a802
branches:  trunk
changeset: 747258:4e85f080a802
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Sep 07 13:52:05 2009 +0000

description:
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.

diffstat:

 dist/smbfs/mount_smbfs/mount_smbfs.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 0bb88019ad1c -r 4e85f080a802 dist/smbfs/mount_smbfs/mount_smbfs.c
--- a/dist/smbfs/mount_smbfs/mount_smbfs.c      Mon Sep 07 13:39:19 2009 +0000
+++ b/dist/smbfs/mount_smbfs/mount_smbfs.c      Mon Sep 07 13:52:05 2009 +0000
@@ -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/%s",
+           ctx->ct_ssn.ioc_user[0] ? ctx->ct_ssn.ioc_user : "guest",
+           ctx->ct_ssn.ioc_srvname, ctx->ct_sh.ioc_share);
 }
 
 int



Home | Main Index | Thread Index | Old Index