Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/tmpfs make the include files usable from userland.
details: https://anonhg.NetBSD.org/src/rev/6c6168ff14c6
branches: trunk
changeset: 588163:6c6168ff14c6
user: christos <christos%NetBSD.org@localhost>
date: Fri Feb 10 16:00:02 2006 +0000
description:
make the include files usable from userland.
diffstat:
sys/fs/tmpfs/tmpfs.h | 16 ++++++++++------
sys/fs/tmpfs/tmpfs_pool.h | 8 ++++----
2 files changed, 14 insertions(+), 10 deletions(-)
diffs (105 lines):
diff -r ae33d92a92e2 -r 6c6168ff14c6 sys/fs/tmpfs/tmpfs.h
--- a/sys/fs/tmpfs/tmpfs.h Fri Feb 10 07:07:20 2006 +0000
+++ b/sys/fs/tmpfs/tmpfs.h Fri Feb 10 16:00:02 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs.h,v 1.13 2005/12/24 12:31:57 jmmv Exp $ */
+/* $NetBSD: tmpfs.h,v 1.14 2006/02/10 16:00:02 christos Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -43,9 +43,6 @@
/* ---------------------------------------------------------------------
* KERNEL-SPECIFIC DEFINITIONS
* --------------------------------------------------------------------- */
-
-#if defined(_KERNEL)
-
#include <sys/dirent.h>
#include <sys/mount.h>
#include <sys/queue.h>
@@ -295,6 +292,7 @@
/* --------------------------------------------------------------------- */
+#ifdef _KERNEL
/*
* Prototypes for tmpfs_subr.c.
*/
@@ -403,6 +401,8 @@
/* Returns the available space for the given file system. */
#define TMPFS_PAGES_AVAIL(tmp) (TMPFS_PAGES_MAX(tmp) - (tmp)->tm_pages_used)
+#endif
+
/* --------------------------------------------------------------------- */
/*
@@ -416,7 +416,9 @@
{
struct tmpfs_mount *tmp;
+#ifdef KASSERT
KASSERT((mp) != NULL && (mp)->mnt_data != NULL);
+#endif
tmp = (struct tmpfs_mount *)(mp)->mnt_data;
return tmp;
}
@@ -427,7 +429,9 @@
{
struct tmpfs_node *node;
+#ifdef KASSERT
KASSERT((vp) != NULL && (vp)->v_data != NULL);
+#endif
node = (struct tmpfs_node *)vp->v_data;
return node;
}
@@ -439,12 +443,12 @@
struct tmpfs_node *node;
node = VP_TO_TMPFS_NODE(vp);
+#ifdef KASSERT
TMPFS_VALIDATE_DIR(node);
+#endif
return node;
}
-#endif /* _KERNEL */
-
/* ---------------------------------------------------------------------
* USER AND KERNEL DEFINITIONS
* --------------------------------------------------------------------- */
diff -r ae33d92a92e2 -r 6c6168ff14c6 sys/fs/tmpfs/tmpfs_pool.h
--- a/sys/fs/tmpfs/tmpfs_pool.h Fri Feb 10 07:07:20 2006 +0000
+++ b/sys/fs/tmpfs/tmpfs_pool.h Fri Feb 10 16:00:02 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_pool.h,v 1.4 2005/12/03 17:34:44 christos Exp $ */
+/* $NetBSD: tmpfs_pool.h,v 1.5 2006/02/10 16:00:02 christos Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -40,9 +40,6 @@
#ifndef _FS_TMPFS_TMPFS_POOL_H_
#define _FS_TMPFS_TMPFS_POOL_H_
-#if !defined(_KERNEL)
-#error not supposed to be exposed to userland.
-#endif
/* --------------------------------------------------------------------- */
@@ -93,6 +90,7 @@
};
/* --------------------------------------------------------------------- */
+#ifdef _KERNEL
/*
* Convenience functions and macros to manipulate a tmpfs_pool.
@@ -116,4 +114,6 @@
char * tmpfs_str_pool_get(struct tmpfs_str_pool *, size_t, int);
void tmpfs_str_pool_put(struct tmpfs_str_pool *, char *, size_t);
+#endif
+
#endif /* _FS_TMPFS_TMPFS_POOL_H_ */
Home |
Main Index |
Thread Index |
Old Index