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 g/c code not used by NetBSD



details:   https://anonhg.NetBSD.org/src/rev/b5e25a41bc2a
branches:  trunk
changeset: 543144:b5e25a41bc2a
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Feb 18 09:53:55 2003 +0000

description:
g/c code not used by NetBSD
constify mopts[]

diffstat:

 dist/smbfs/mount_smbfs/mount_smbfs.c |  28 ++++------------------------
 1 files changed, 4 insertions(+), 24 deletions(-)

diffs (67 lines):

diff -r 606e12c0d463 -r b5e25a41bc2a dist/smbfs/mount_smbfs/mount_smbfs.c
--- a/dist/smbfs/mount_smbfs/mount_smbfs.c      Tue Feb 18 09:52:03 2003 +0000
+++ b/dist/smbfs/mount_smbfs/mount_smbfs.c      Tue Feb 18 09:53:55 2003 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: mount_smbfs.c,v 1.2 2003/02/18 09:53:55 jdolecek Exp $ */
+
 /*
  * Copyright (c) 2000-2002, Boris Popov
  * All rights reserved.
@@ -45,6 +47,7 @@
 #include <stdlib.h>
 #include <err.h>
 #include <sysexits.h>
+#include <errno.h>
 
 #include <cflib.h>
 
@@ -59,7 +62,7 @@
 static char mount_point[MAXPATHLEN + 1];
 static void usage(void);
 
-static struct mntopt mopts[] = {
+const static struct mntopt mopts[] = {
        MOPT_STDOPTS,
        { NULL, 0, 0, 0 }
 };
@@ -71,19 +74,10 @@
        struct smb_ctx sctx, *ctx = &sctx;
        struct smbfs_args mdata;
        struct stat st;
-#ifdef APPLE
-       extern void dropsuid();
-       extern int loadsmbvfs();
-#else
-       struct vfsconf vfc;
-#endif /* APPLE */
        char *next;
        int opt, error, mntflags, caseopt;
 
 
-#ifdef APPLE
-       dropsuid();
-#endif /* APPLE */
        if (argc == 2) {
                if (strcmp(argv[1], "-h") == 0) {
                        usage();
@@ -96,20 +90,6 @@
        if (argc < 3)
                usage();
 
-#ifdef APPLE
-       error = loadsmbvfs();
-#else
-       error = getvfsbyname(SMBFS_VFSNAME, &vfc);
-       if (error && vfsisloadable(SMBFS_VFSNAME)) {
-               if(vfsload(SMBFS_VFSNAME))
-                       err(EX_OSERR, "vfsload("SMBFS_VFSNAME")");
-               endvfsent();
-               error = getvfsbyname(SMBFS_VFSNAME, &vfc);
-       }
-#endif /* APPLE */
-       if (error)
-               errx(EX_OSERR, "SMB filesystem is not available");
-
        if (smb_lib_init() != 0)
                exit(1);
 



Home | Main Index | Thread Index | Old Index