Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/puffs Make r/w servers unmount themselves cleanly u...
details: https://anonhg.NetBSD.org/src/rev/5691ce556b47
branches: trunk
changeset: 750738:5691ce556b47
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jan 12 18:43:37 2010 +0000
description:
Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
diffstat:
usr.sbin/puffs/mount_psshfs/psshfs.c | 6 ++++--
usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c | 4 +++-
usr.sbin/puffs/rump_ffs/rump_ffs.c | 4 +++-
usr.sbin/puffs/rump_lfs/rump_lfs.c | 5 ++++-
usr.sbin/puffs/rump_msdos/rump_msdos.c | 4 +++-
usr.sbin/puffs/rump_nfs/rump_nfs.c | 5 ++++-
usr.sbin/puffs/rump_smbfs/rump_smbfs.c | 4 +++-
usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c | 5 ++++-
usr.sbin/puffs/rump_udf/rump_udf.c | 4 +++-
9 files changed, 31 insertions(+), 10 deletions(-)
diffs (188 lines):
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/mount_psshfs/psshfs.c
--- a/usr.sbin/puffs/mount_psshfs/psshfs.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/mount_psshfs/psshfs.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psshfs.c,v 1.58 2010/01/07 21:26:49 pooka Exp $ */
+/* $NetBSD: psshfs.c,v 1.59 2010/01/12 18:43:37 pooka Exp $ */
/*
* Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved.
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: psshfs.c,v 1.58 2010/01/07 21:26:49 pooka Exp $");
+__RCSID("$NetBSD: psshfs.c,v 1.59 2010/01/12 18:43:37 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -121,6 +121,8 @@
int nargs;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
if (argc < 3)
usage();
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c
--- a/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_ext2fs.c,v 1.8 2009/12/13 21:16:54 pooka Exp $ */
+/* $NetBSD: rump_ext2fs.c,v 1.9 2010/01/12 18:43:37 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -50,6 +50,8 @@
int rv;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
UKFS_DEVICE_ARGVPROBE(&part);
mount_ext2fs_parseargs(argc, argv, &args, &mntflags,
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/rump_ffs/rump_ffs.c
--- a/usr.sbin/puffs/rump_ffs/rump_ffs.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/rump_ffs/rump_ffs.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_ffs.c,v 1.6 2009/12/13 21:16:54 pooka Exp $ */
+/* $NetBSD: rump_ffs.c,v 1.7 2010/01/12 18:43:37 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -50,6 +50,8 @@
int rv;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
UKFS_DEVICE_ARGVPROBE(&part);
mount_ffs_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/rump_lfs/rump_lfs.c
--- a/usr.sbin/puffs/rump_lfs/rump_lfs.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/rump_lfs/rump_lfs.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_lfs.c,v 1.14 2009/12/13 21:16:54 pooka Exp $ */
+/* $NetBSD: rump_lfs.c,v 1.15 2010/01/12 18:43:37 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -32,6 +32,7 @@
#include <err.h>
#include <pthread.h>
+#include <puffs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -69,6 +70,8 @@
int rv;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
UKFS_DEVICE_ARGVPROBE(&part);
if (part != ukfs_part_none) {
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/rump_msdos/rump_msdos.c
--- a/usr.sbin/puffs/rump_msdos/rump_msdos.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/rump_msdos/rump_msdos.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_msdos.c,v 1.7 2009/12/13 21:16:55 pooka Exp $ */
+/* $NetBSD: rump_msdos.c,v 1.8 2010/01/12 18:43:37 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -50,6 +50,8 @@
int rv;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
UKFS_DEVICE_ARGVPROBE(&part);
mount_msdos_parseargs(argc, argv, &args, &mntflags,
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/rump_nfs/rump_nfs.c
--- a/usr.sbin/puffs/rump_nfs/rump_nfs.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/rump_nfs/rump_nfs.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_nfs.c,v 1.9 2009/10/18 16:02:15 pooka Exp $ */
+/* $NetBSD: rump_nfs.c,v 1.10 2010/01/12 18:43:37 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -48,6 +48,9 @@
int rv, mntflags;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
+
mount_nfs_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
rv = p2k_run_fs(MOUNT_NFS, canon_dev, canon_dir, mntflags, &args,
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/rump_smbfs/rump_smbfs.c
--- a/usr.sbin/puffs/rump_smbfs/rump_smbfs.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/rump_smbfs/rump_smbfs.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_smbfs.c,v 1.5 2009/10/20 02:14:12 pooka Exp $ */
+/* $NetBSD: rump_smbfs.c,v 1.6 2010/01/12 18:43:37 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -59,6 +59,8 @@
int mntflags;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
p2m = p2k_init(PUFFS_KFLAG_WTCACHE);
atexit(pcancel);
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c
--- a/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_sysvbfs.c,v 1.4 2009/12/13 21:16:55 pooka Exp $ */
+/* $NetBSD: rump_sysvbfs.c,v 1.5 2010/01/12 18:43:38 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -32,6 +32,7 @@
#include <rump/ukfs.h>
#include <err.h>
+#include <puffs.h>
#include <stdlib.h>
#include <string.h>
@@ -47,6 +48,8 @@
int rv;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
UKFS_DEVICE_ARGVPROBE(&part);
mount_sysvbfs_parseargs(argc, argv, &args, &mntflags,
diff -r d2b2bf258413 -r 5691ce556b47 usr.sbin/puffs/rump_udf/rump_udf.c
--- a/usr.sbin/puffs/rump_udf/rump_udf.c Tue Jan 12 18:42:38 2010 +0000
+++ b/usr.sbin/puffs/rump_udf/rump_udf.c Tue Jan 12 18:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_udf.c,v 1.6 2009/12/13 21:16:55 pooka Exp $ */
+/* $NetBSD: rump_udf.c,v 1.7 2010/01/12 18:43:38 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -50,6 +50,8 @@
int rv;
setprogname(argv[0]);
+ puffs_unmountonsignal(SIGINT, true);
+ puffs_unmountonsignal(SIGTERM, true);
UKFS_DEVICE_ARGVPROBE(&part);
mount_udf_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
Home |
Main Index |
Thread Index |
Old Index