Source-Changes-HG archive

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

[src/trunk]: src/sbin/fsck_lfs Move the definition of simple_lock() and simpl...



details:   https://anonhg.NetBSD.org/src/rev/b8ba5695b813
branches:  trunk
changeset: 579945:b8ba5695b813
user:      he <he%NetBSD.org@localhost>
date:      Fri Apr 01 23:45:59 2005 +0000

description:
Move the definition of simple_lock() and simple_unlock() to a common
header, since more of the LFS macros now use these functions.  Since
we're outside of the kernel, these are defined to be empty.

diffstat:

 sbin/fsck_lfs/lfs.h      |  11 ++++++++++-
 sbin/fsck_lfs/segwrite.c |   6 +-----
 2 files changed, 11 insertions(+), 6 deletions(-)

diffs (45 lines):

diff -r 1f9f30d7448b -r b8ba5695b813 sbin/fsck_lfs/lfs.h
--- a/sbin/fsck_lfs/lfs.h       Fri Apr 01 23:25:29 2005 +0000
+++ b/sbin/fsck_lfs/lfs.h       Fri Apr 01 23:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.h,v 1.4 2005/03/25 20:16:37 perseant Exp $ */
+/* $NetBSD: lfs.h,v 1.5 2005/04/01 23:45:59 he Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -48,6 +48,15 @@
 #define lfs_devvp lfs_unlockvp
 
 /*
+ * This is outside of the kernel, so no locking primitives available.
+ */
+#undef simple_lock
+#undef simple_unlock
+
+#define simple_lock(arg)       /* empty */
+#define simple_unlock(arg)     /* empty */
+
+/*
  * Structure used to pass around logical block paths generated by
  * ufs_getlbns and used by truncate and bmap code.
  */
diff -r 1f9f30d7448b -r b8ba5695b813 sbin/fsck_lfs/segwrite.c
--- a/sbin/fsck_lfs/segwrite.c  Fri Apr 01 23:25:29 2005 +0000
+++ b/sbin/fsck_lfs/segwrite.c  Fri Apr 01 23:45:59 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: segwrite.c,v 1.8 2005/03/25 20:16:37 perseant Exp $ */
+/* $NetBSD: segwrite.c,v 1.9 2005/04/01 23:45:59 he Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -78,10 +78,6 @@
 #include <ufs/ufs/ufsmount.h>
 
 /* Override certain things to make <ufs/lfs/lfs.h> work */
-#undef simple_lock
-#define simple_lock(x)
-#undef simple_unlock
-#define simple_unlock(x)
 #define vnode uvnode
 #define buf ubuf
 #define panic call_panic



Home | Main Index | Thread Index | Old Index