Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Remove the portalfs kernel file system driver. Replace moun...
details: https://anonhg.NetBSD.org/src/rev/aced273c9041
branches: trunk
changeset: 749678:aced273c9041
user: pooka <pooka%NetBSD.org@localhost>
date: Sat Dec 05 20:11:01 2009 +0000
description:
Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
diffstat:
distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf | 4 +-
distrib/sets/lists/base/mi | 8 +-
distrib/sets/lists/base/rescue.mi | 4 +-
distrib/sets/lists/comp/mi | 6 +-
distrib/sets/lists/modules/mi | 6 +-
etc/mtree/NetBSD.dist.base | 3 +-
rescue/list | 3 +-
sbin/mount_portal/Makefile | 10 +-
sbin/mount_portal/mount_portal.c | 315 ---------
sbin/mount_portal/portald.h | 11 +-
share/man/man4/netintro.4 | 4 +-
share/man/man4/options.4 | 14 +-
share/man/man7/hier.7 | 5 +-
share/man/man9/vnode.9 | 6 +-
sys/arch/acorn26/conf/FOURMEG | 3 +-
sys/arch/acorn26/conf/GENERIC | 5 +-
sys/arch/acorn26/conf/INSTALL | 3 +-
sys/arch/acorn32/conf/EB7500ATX | 7 +-
sys/arch/acorn32/conf/GENERIC | 7 +-
sys/arch/acorn32/conf/INSTALL | 5 +-
sys/arch/acorn32/conf/LOWMEM_WSCONS | 3 +-
sys/arch/acorn32/conf/NC | 3 +-
sys/arch/alpha/conf/GENERIC | 7 +-
sys/arch/alpha/conf/RAWHIDE | 5 +-
sys/arch/amd64/conf/GENERIC | 7 +-
sys/arch/amd64/conf/XEN3_DOM0 | 5 +-
sys/arch/amd64/conf/XEN3_DOMU | 5 +-
sys/arch/amiga/conf/DRACO | 5 +-
sys/arch/amiga/conf/GENERIC | 5 +-
sys/arch/amiga/conf/GENERIC.in | 5 +-
sys/arch/amigappc/conf/GENERIC | 5 +-
sys/arch/amigappc/conf/NULL | 5 +-
sys/arch/arc/conf/ARCTIC | 3 +-
sys/arch/arc/conf/GENERIC | 7 +-
sys/arch/arc/conf/M403 | 3 +-
sys/arch/arc/conf/MIMORI | 3 +-
sys/arch/arc/conf/PICA | 3 +-
sys/arch/arc/conf/RPC44 | 7 +-
sys/arch/atari/conf/ATARITT | 7 +-
sys/arch/atari/conf/FALCON | 7 +-
sys/arch/atari/conf/GENERIC.in | 5 +-
sys/arch/atari/conf/HADES | 7 +-
sys/arch/atari/conf/MILAN-ISAIDE | 7 +-
sys/arch/atari/conf/MILAN-PCIIDE | 7 +-
sys/arch/atari/conf/SMALL030 | 5 +-
sys/arch/bebox/conf/GENERIC | 5 +-
sys/arch/bebox/conf/INSTALL | 3 +-
sys/arch/cats/conf/GENERIC | 5 +-
sys/arch/cats/conf/INSTALL | 3 +-
sys/arch/cobalt/conf/GENERIC | 5 +-
sys/arch/cobalt/conf/INSTALL | 5 +-
sys/arch/dreamcast/conf/GENERIC | 3 +-
sys/arch/evbarm/conf/ADI_BRH | 3 +-
sys/arch/evbarm/conf/ARMADILLO210 | 3 +-
sys/arch/evbarm/conf/ARMADILLO9 | 3 +-
sys/arch/evbarm/conf/BEAGLEBOARD | 3 +-
sys/arch/evbarm/conf/CP3100 | 3 +-
sys/arch/evbarm/conf/GEMINI | 1 -
sys/arch/evbarm/conf/GEMINI_MASTER | 1 -
sys/arch/evbarm/conf/GEMINI_SLAVE | 1 -
sys/arch/evbarm/conf/GUMSTIX | 5 +-
sys/arch/evbarm/conf/HDL_G | 3 +-
sys/arch/evbarm/conf/IMX31LITE | 3 +-
sys/arch/evbarm/conf/INTEGRATOR | 3 +-
sys/arch/evbarm/conf/IQ31244 | 3 +-
sys/arch/evbarm/conf/IQ80310 | 3 +-
sys/arch/evbarm/conf/IQ80321 | 3 +-
sys/arch/evbarm/conf/IXDP425 | 3 +-
sys/arch/evbarm/conf/IXM1200 | 3 +-
sys/arch/evbarm/conf/LUBBOCK | 1 -
sys/arch/evbarm/conf/MPCSA_GENERIC | 5 +-
sys/arch/evbarm/conf/NAPPI | 3 +-
sys/arch/evbarm/conf/NSLU2 | 3 +-
sys/arch/evbarm/conf/OSK5912 | 1 -
sys/arch/evbarm/conf/SMDK2410 | 3 +-
sys/arch/evbarm/conf/SMDK2800 | 3 +-
sys/arch/evbarm/conf/TEAMASA_NPWR | 3 +-
sys/arch/evbarm/conf/TEAMASA_NPWR_FC | 3 +-
sys/arch/evbarm/conf/TISDP2420 | 3 +-
sys/arch/evbarm/conf/TISDP2430 | 3 +-
sys/arch/evbarm/conf/TS7200 | 3 +-
sys/arch/evbarm/conf/TWINTAIL | 5 +-
sys/arch/evbarm/conf/VIPER | 3 +-
sys/arch/evbarm/conf/ZAO425 | 3 +-
sys/arch/evbmips/conf/ADM5120 | 5 +-
sys/arch/evbmips/conf/ADM5120-NB | 5 +-
sys/arch/evbmips/conf/ADM5120-USB | 5 +-
sys/arch/evbmips/conf/ALCHEMY | 5 +-
sys/arch/evbmips/conf/AP30 | 5 +-
sys/arch/evbmips/conf/GDIUM | 5 +-
sys/arch/evbmips/conf/MALTA | 5 +-
sys/arch/evbmips/conf/MERAKI | 5 +-
sys/arch/evbmips/conf/RB153 | 7 +-
sys/arch/evbmips/conf/WGT624V3 | 5 +-
sys/arch/evbppc/conf/EV64260 | 3 +-
sys/arch/evbppc/conf/EXPLORA451 | 5 +-
sys/arch/evbppc/conf/OPENBLOCKS200 | 5 +-
sys/arch/evbppc/conf/OPENBLOCKS266 | 7 +-
sys/arch/evbppc/conf/PMPPC | 5 +-
sys/arch/evbppc/conf/VIRTEX_DFC | 3 +-
sys/arch/evbppc/conf/VIRTEX_GSRD1 | 3 +-
sys/arch/evbppc/conf/VIRTEX_GSRD2 | 3 +-
sys/arch/evbppc/conf/WALNUT | 5 +-
sys/arch/ews4800mips/conf/GENERIC | 7 +-
sys/arch/hp300/conf/GENERIC | 7 +-
sys/arch/hp700/conf/GENERIC | 7 +-
sys/arch/hpcarm/conf/IPAQ | 3 +-
sys/arch/hpcarm/conf/JORNADA720 | 5 +-
sys/arch/hpcarm/conf/JORNADA820 | 5 +-
sys/arch/hpcmips/conf/GENERIC | 5 +-
sys/arch/hpcmips/conf/LROUTER | 3 +-
sys/arch/hpcmips/conf/MPC303 | 5 +-
sys/arch/hpcmips/conf/TX3912 | 3 +-
sys/arch/hpcmips/conf/TX3922 | 3 +-
sys/arch/hpcmips/conf/VR41XX | 5 +-
sys/arch/hpcsh/conf/GENERIC | 3 +-
sys/arch/i386/conf/ALL | 7 +-
sys/arch/i386/conf/GENERIC | 5 +-
sys/arch/i386/conf/GENERIC_PS2TINY | 3 +-
sys/arch/i386/conf/GENERIC_TINY | 3 +-
sys/arch/i386/conf/INSTALL_FLOPPY | 3 +-
sys/arch/i386/conf/INSTALL_TINY | 3 +-
sys/arch/i386/conf/MONOLITHIC | 1 -
sys/arch/i386/conf/NET4501 | 5 +-
sys/arch/i386/conf/XEN3_DOM0 | 5 +-
sys/arch/i386/conf/XEN3_DOMU | 5 +-
sys/arch/iyonix/conf/GENERIC | 5 +-
sys/arch/landisk/conf/GENERIC | 7 +-
sys/arch/luna68k/conf/GENERIC | 5 +-
sys/arch/mac68k/conf/GENERIC | 7 +-
sys/arch/macppc/conf/GENERIC | 7 +-
sys/arch/mipsco/conf/GENERIC | 3 +-
sys/arch/mipsco/conf/RC3230 | 3 +-
sys/arch/mmeye/conf/GENERIC | 7 +-
sys/arch/mmeye/conf/MMTA | 3 +-
sys/arch/mmeye/conf/MMTAICE | 3 +-
sys/arch/mmeye/conf/MMTAROMNEW | 3 +-
sys/arch/mvmeppc/conf/GENERIC | 5 +-
sys/arch/netwinder/conf/GENERIC | 3 +-
sys/arch/news68k/conf/GENERIC | 7 +-
sys/arch/news68k/conf/GENERIC_TINY | 5 +-
sys/arch/news68k/conf/NEWS1200 | 3 +-
sys/arch/newsmips/conf/GENERIC | 7 +-
sys/arch/next68k/conf/GENERIC | 7 +-
sys/arch/next68k/conf/SLAB | 3 +-
sys/arch/ofppc/conf/GENERIC | 7 +-
sys/arch/ofppc/conf/GENERIC.MP | 7 +-
sys/arch/pmax/conf/GENERIC | 7 +-
sys/arch/prep/conf/GENERIC | 5 +-
sys/arch/rs6000/conf/GENERIC | 5 +-
sys/arch/sandpoint/conf/ENCPP1 | 5 +-
sys/arch/sandpoint/conf/GENERIC | 5 +-
sys/arch/sandpoint/conf/GENERIC.NAS | 5 +-
sys/arch/sandpoint/conf/SANDPOINT | 5 +-
sys/arch/sbmips/conf/GENERIC | 5 +-
sys/arch/sgimips/conf/GENERIC32_IP12 | 5 +-
sys/arch/sgimips/conf/GENERIC32_IP2x | 7 +-
sys/arch/sgimips/conf/GENERIC32_IP3x | 7 +-
sys/arch/shark/conf/GENERIC | 5 +-
sys/arch/shark/conf/INSTALL | 3 +-
sys/arch/shark/conf/OFWGENCFG | 3 +-
sys/arch/sparc/conf/BILL-THE-CAT | 3 +-
sys/arch/sparc/conf/GENERIC | 7 +-
sys/arch/sparc/conf/INSTALL | 3 +-
sys/arch/sparc/conf/KRUPS | 7 +-
sys/arch/sparc/conf/MRCOFFEE | 7 +-
sys/arch/sparc/conf/TADPOLE3GX | 3 +-
sys/arch/sparc64/conf/GENERIC | 7 +-
sys/arch/sparc64/conf/NONPLUS64 | 7 +-
sys/arch/x68k/conf/GENERIC | 5 +-
sys/arch/x68k/conf/INSTALL | 5 +-
sys/arch/zaurus/conf/GENERIC | 3 +-
sys/compat/linux/common/linux_misc.c | 5 +-
sys/conf/files | 3 +-
sys/miscfs/Makefile | 4 +-
sys/miscfs/portal/Makefile | 7 -
sys/miscfs/portal/files.portal | 6 -
sys/miscfs/portal/portal.h | 71 --
sys/miscfs/portal/portal_vfsops.c | 340 ---------
sys/miscfs/portal/portal_vnops.c | 702 --------------------
sys/modules/Makefile | 3 +-
sys/modules/portal/Makefile | 10 -
sys/sys/mount.h | 4 +-
sys/sys/socket.h | 4 +-
usr.bin/crunch/examples/really-big.conf | 4 +-
usr.sbin/pstat/pstat.8 | 6 +-
usr.sbin/puffs/Makefile | 4 +-
usr.sbin/puffs/mount_portal/Makefile | 19 -
usr.sbin/puffs/mount_portal/puffs_portal.c | 783 -----------------------
189 files changed, 374 insertions(+), 2710 deletions(-)
diffs (truncated from 6498 to 300 lines):
diff -r 1725003b8183 -r aced273c9041 distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf
--- a/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf Sat Dec 05 19:14:39 2009 +0000
+++ b/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf Sat Dec 05 20:11:01 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ramdiskbin.conf,v 1.4 2009/11/29 20:56:01 abs Exp $
+# $NetBSD: ramdiskbin.conf,v 1.5 2009/12/05 20:11:01 pooka Exp $
srcdirs bin sbin libexec usr.bin usr.sbin gnu/usr.bin
@@ -16,7 +16,7 @@
#progs fastboot fsck fsck_ext3fs fsck_ffs fsck_lfs fsck_msdos fsdb
#progs fsirand ldconfig lmcctl modload modunload mount_cd9660 mount_ext2fs
#progs mount_fdesc mount_filecore mount_lfs mount_msdos
-#progs mount_nfs mount_ntfs mount_nullfs mount_overlay mount_portal
+#progs mount_nfs mount_ntfs mount_nullfs mount_overlay
#progs mount_umap mount_union newbtconf newfs_lfs newfs_msdos
#progs nologin raidctl restore rndctl routed rtsold savecore scsictl setkey
#progs slattach tunefs wsconsctl
diff -r 1725003b8183 -r aced273c9041 distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi Sat Dec 05 19:14:39 2009 +0000
+++ b/distrib/sets/lists/base/mi Sat Dec 05 20:11:01 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.846 2009/12/05 19:14:39 pooka Exp $
+# $NetBSD: mi,v 1.847 2009/12/05 20:11:01 pooka Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@@ -246,7 +246,7 @@
./sbin/mount_ntfs base-ntfs-root
./sbin/mount_null base-miscfs-root
./sbin/mount_overlay base-miscfs-root
-./sbin/mount_portal base-miscfs-root
+./sbin/mount_portal base-puffs-bin
./sbin/mount_procfs base-sysutil-root
./sbin/mount_ptyfs base-miscfs-root
./sbin/mount_smbfs base-smbfs-root
@@ -759,7 +759,7 @@
./usr/include/miscfs/kernfs base-c-usr
./usr/include/miscfs/nullfs base-c-usr
./usr/include/miscfs/overlay base-c-usr
-./usr/include/miscfs/portal base-c-usr
+./usr/include/miscfs/portal base-obsolete obsolete
./usr/include/miscfs/procfs base-c-usr
./usr/include/miscfs/ptyfs base-obsolete obsolete
./usr/include/miscfs/specfs base-c-usr
@@ -1150,7 +1150,7 @@
./usr/sbin/moptrace base-bootserver-bin
./usr/sbin/mount_9p base-puffs-bin
./usr/sbin/mount_psshfs base-puffs-bin
-./usr/sbin/mount_puffsportal base-puffs-bin
+./usr/sbin/mount_puffsportal base-obsolete obsolete
./usr/sbin/mount_sysctlfs base-puffs-bin
./usr/sbin/mountd base-nfsserver-bin
./usr/sbin/moused base-sysutil-bin
diff -r 1725003b8183 -r aced273c9041 distrib/sets/lists/base/rescue.mi
--- a/distrib/sets/lists/base/rescue.mi Sat Dec 05 19:14:39 2009 +0000
+++ b/distrib/sets/lists/base/rescue.mi Sat Dec 05 20:11:01 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rescue.mi,v 1.28 2008/11/12 12:35:50 ad Exp $
+# $NetBSD: rescue.mi,v 1.29 2009/12/05 20:11:01 pooka Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -92,7 +92,7 @@
./rescue/mount_ntfs base-rescue-root
./rescue/mount_null base-rescue-root
./rescue/mount_overlay base-rescue-root
-./rescue/mount_portal base-rescue-root
+./rescue/mount_portal base-obsolete obsolete
./rescue/mount_procfs base-rescue-root
./rescue/mount_smbfs base-rescue-root
./rescue/mount_tmpfs base-rescue-root
diff -r 1725003b8183 -r aced273c9041 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Sat Dec 05 19:14:39 2009 +0000
+++ b/distrib/sets/lists/comp/mi Sat Dec 05 20:11:01 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1342 2009/12/05 12:14:32 pooka Exp $
+# $NetBSD: mi,v 1.1343 2009/12/05 20:11:01 pooka Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -1401,7 +1401,7 @@
./usr/include/miscfs/kernfs/kernfs.h comp-c-include
./usr/include/miscfs/nullfs/null.h comp-c-include
./usr/include/miscfs/overlay/overlay.h comp-c-include
-./usr/include/miscfs/portal/portal.h comp-c-include
+./usr/include/miscfs/portal/portal.h comp-obsolete obsolete
./usr/include/miscfs/procfs/procfs.h comp-c-include
./usr/include/miscfs/specfs/specdev.h comp-c-include
./usr/include/miscfs/syncfs/syncfs.h comp-c-include
@@ -3463,7 +3463,7 @@
./usr/libdata/debug/usr/sbin/moptrace.debug comp-bootserver-debug debug
./usr/libdata/debug/usr/sbin/mount_9p.debug comp-puffs-debug debug
./usr/libdata/debug/usr/sbin/mount_psshfs.debug comp-puffs-debug debug
-./usr/libdata/debug/usr/sbin/mount_puffsportal.debug comp-puffs-debug debug
+./usr/libdata/debug/usr/sbin/mount_puffsportal.debug comp-obsolete obsolete
./usr/libdata/debug/usr/sbin/mount_sysctlfs.debug comp-puffs-debug debug
./usr/libdata/debug/usr/sbin/mountd.debug comp-nfsserver-debug debug
./usr/libdata/debug/usr/sbin/moused.debug comp-sysutil-debug debug
diff -r 1725003b8183 -r aced273c9041 distrib/sets/lists/modules/mi
--- a/distrib/sets/lists/modules/mi Sat Dec 05 19:14:39 2009 +0000
+++ b/distrib/sets/lists/modules/mi Sat Dec 05 20:11:01 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.4 2009/10/05 22:32:58 haad Exp $
+# $NetBSD: mi,v 1.5 2009/12/05 20:11:02 pooka Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -74,8 +74,8 @@
./@MODULEDIR@/null/null.kmod base-kernel-modules kmod
./@MODULEDIR@/overlay base-kernel-modules kmod
./@MODULEDIR@/overlay/overlay.kmod base-kernel-modules kmod
-./@MODULEDIR@/portal base-kernel-modules kmod
-./@MODULEDIR@/portal/portal.kmod base-kernel-modules kmod
+./@MODULEDIR@/portal base-obsolete obsolete
+./@MODULEDIR@/portal/portal.kmod base-obsolete obsolete
./@MODULEDIR@/ppp_bsdcomp base-kernel-modules kmod
./@MODULEDIR@/ppp_bsdcomp/ppp_bsdcomp.kmod base-kernel-modules kmod
./@MODULEDIR@/ppp_deflate base-kernel-modules kmod
diff -r 1725003b8183 -r aced273c9041 etc/mtree/NetBSD.dist.base
--- a/etc/mtree/NetBSD.dist.base Sat Dec 05 19:14:39 2009 +0000
+++ b/etc/mtree/NetBSD.dist.base Sat Dec 05 20:11:01 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.dist.base,v 1.7 2009/12/05 16:29:11 pooka Exp $
+# $NetBSD: NetBSD.dist.base,v 1.8 2009/12/05 20:11:02 pooka Exp $
# @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
# Do not customize this file as it may be overwritten on upgrades.
@@ -131,7 +131,6 @@
./usr/include/miscfs/kernfs
./usr/include/miscfs/nullfs
./usr/include/miscfs/overlay
-./usr/include/miscfs/portal
./usr/include/miscfs/procfs
./usr/include/miscfs/specfs
./usr/include/miscfs/syncfs
diff -r 1725003b8183 -r aced273c9041 rescue/list
--- a/rescue/list Sat Dec 05 19:14:39 2009 +0000
+++ b/rescue/list Sat Dec 05 20:11:01 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: list,v 1.35 2009/01/07 00:39:24 mrg Exp $
+# $NetBSD: list,v 1.36 2009/12/05 20:11:02 pooka Exp $
SRCDIRS bin
@@ -82,7 +82,6 @@
PROG mount_ntfs
PROG mount_null
PROG mount_overlay
-PROG mount_portal
PROG mount_procfs
PROG mount_smbfs
PROG mount_tmpfs
diff -r 1725003b8183 -r aced273c9041 sbin/mount_portal/Makefile
--- a/sbin/mount_portal/Makefile Sat Dec 05 19:14:39 2009 +0000
+++ b/sbin/mount_portal/Makefile Sat Dec 05 20:11:01 2009 +0000
@@ -1,19 +1,17 @@
-# $NetBSD: Makefile,v 1.23 2005/06/27 01:00:06 christos Exp $
+# $NetBSD: Makefile,v 1.24 2009/12/05 20:11:02 pooka Exp $
# @(#)Makefile 8.3 (Berkeley) 3/27/94
.include <bsd.own.mk>
PROG= mount_portal
-SRCS= mount_portal.c activate.c conf.c pt_conf.c \
+SRCS= puffs_portal.c activate.c conf.c pt_conf.c \
pt_exec.c pt_file.c pt_tcp.c pt_filter.c
SUBDIR= examples
MAN= mount_portal.8
-CPPFLAGS+= -I${NETBSDSRCDIR}/sys
-
-DPADD+=${LIBUTIL}
-LDADD+=-lutil
+DPADD+=${LIBUTIL} ${LIBPUFFS}
+LDADD+=-lutil -lpuffs
.include <bsd.prog.mk>
.include <bsd.subdir.mk>
diff -r 1725003b8183 -r aced273c9041 sbin/mount_portal/mount_portal.c
--- a/sbin/mount_portal/mount_portal.c Sat Dec 05 19:14:39 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,315 +0,0 @@
-/* $NetBSD: mount_portal.c,v 1.33 2008/07/20 01:20:22 lukem Exp $ */
-
-/*
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software donated to Berkeley by
- * Jan-Simon Pendry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1992, 1993, 1994\
- The Regents of the University of California. All rights reserved.");
-#endif /* not lint */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
-#else
-__RCSID("$NetBSD: mount_portal.c,v 1.33 2008/07/20 01:20:22 lukem Exp $");
-#endif
-#endif /* not lint */
-
-#include <sys/param.h>
-#include <sys/wait.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/syslog.h>
-#include <sys/time.h>
-#include <sys/mount.h>
-
-#include <err.h>
-#include <errno.h>
-#include <poll.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <mntopts.h>
-#include "pathnames.h"
-#include "portald.h"
-
-static const struct mntopt mopts[] = {
- MOPT_STDOPTS,
- MOPT_GETARGS,
- MOPT_NULL,
-};
-
-static char mountpt[MAXPATHLEN]; /* made available to signal handler */
-
-static void sigchld(int);
-static void sighup(int);
-static void sigterm(int);
-static void usage(void);
-
-static sig_atomic_t readcf; /* Set when SIGHUP received */
-
-static void
-sigchld(int sig)
-{
- pid_t pid;
-
- while ((pid = waitpid((pid_t) -1, (int *) 0, WNOHANG)) > 0)
- ;
- if (pid < 0 && errno != ECHILD)
- syslog(LOG_WARNING, "waitpid: %m");
-}
-
-static void
-sighup(int sig)
-{
-
- readcf = 1;
-}
-
-static void
-sigterm(int sig)
-{
-
- if (unmount(mountpt, MNT_FORCE) < 0)
- syslog(LOG_WARNING, "sigterm: unmounting %s failed: %m",
- mountpt);
-}
-
-int
-main(int argc, char *argv[])
-{
- struct portal_args args;
- struct sockaddr_un un;
Home |
Main Index |
Thread Index |
Old Index