summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-15 21:43:08 +0000
committerphk <phk@FreeBSD.org>2004-02-15 21:43:08 +0000
commit758f11d12733b14451a5b9a622a672c71fd3fc73 (patch)
tree77745dcce8e3b03ba96ef09918c6263dbd8250a2 /sys/fs/devfs
parent900024a6aaa99e39cc2ada236b0e0d5cb71d2738 (diff)
downloadFreeBSD-src-758f11d12733b14451a5b9a622a672c71fd3fc73.zip
FreeBSD-src-758f11d12733b14451a5b9a622a672c71fd3fc73.tar.gz
White-space align a struct definition.
Move a SYSINIT to the file where it belongs.
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs.h47
-rw-r--r--sys/fs/devfs/devfs_devs.c11
-rw-r--r--sys/fs/devfs/devfs_rule.c6
3 files changed, 27 insertions, 37 deletions
diff --git a/sys/fs/devfs/devfs.h b/sys/fs/devfs/devfs.h
index 38ed7f8..c12a4d6 100644
--- a/sys/fs/devfs/devfs.h
+++ b/sys/fs/devfs/devfs.h
@@ -146,37 +146,37 @@ MALLOC_DECLARE(M_DEVFS);
#endif
struct devfs_dirent {
- int de_inode;
- int de_flags;
+ int de_inode;
+ int de_flags;
#define DE_WHITEOUT 0x1
#define DE_DOT 0x2
#define DE_DOTDOT 0x4
- struct dirent *de_dirent;
+ struct dirent *de_dirent;
TAILQ_ENTRY(devfs_dirent) de_list;
TAILQ_HEAD(, devfs_dirent) de_dlist;
- struct devfs_dirent *de_dir;
- int de_links;
- mode_t de_mode;
- uid_t de_uid;
- gid_t de_gid;
- struct label *de_label;
- struct timespec de_atime;
- struct timespec de_mtime;
- struct timespec de_ctime;
- struct vnode *de_vnode;
- char * de_symlink;
+ struct devfs_dirent *de_dir;
+ int de_links;
+ mode_t de_mode;
+ uid_t de_uid;
+ gid_t de_gid;
+ struct label *de_label;
+ struct timespec de_atime;
+ struct timespec de_mtime;
+ struct timespec de_ctime;
+ struct vnode *de_vnode;
+ char *de_symlink;
};
struct devfs_mount {
- struct mount *dm_mount;
- struct devfs_dirent *dm_rootdir;
- struct devfs_dirent *dm_basedir;
- unsigned dm_generation;
- struct devfs_dirent **dm_dirent;
- struct devfs_dirent **dm_overflow;
- int dm_inode;
- struct lock dm_lock;
- devfs_rsnum dm_ruleset;
+ struct mount *dm_mount;
+ struct devfs_dirent *dm_rootdir;
+ struct devfs_dirent *dm_basedir;
+ unsigned dm_generation;
+ struct devfs_dirent **dm_dirent;
+ struct devfs_dirent **dm_overflow;
+ int dm_inode;
+ struct lock dm_lock;
+ devfs_rsnum dm_ruleset;
};
/*
@@ -187,7 +187,6 @@ struct devfs_mount {
#define VFSTODEVFS(mp) ((struct devfs_mount *)((mp)->mnt_data))
void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de);
-void devfs_rules_init(void);
int devfs_rules_ioctl(struct mount *mp, u_long cmd, caddr_t data, struct thread *td);
void devfs_rules_newmount(struct devfs_mount *dm, struct thread *td);
int devfs_allocv (struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, struct thread *td);
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index e5e6ffb..eb394d8 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -1,4 +1,3 @@
-#define DEBUG 1
/*
* Copyright (c) 2000
* Poul-Henning Kamp. All rights reserved.
@@ -443,13 +442,3 @@ devfs_destroy(dev_t dev)
atomic_cmpset_int(&devfs_nextino, i, ino);
}
}
-
-static void
-devfs_init(void *junk)
-{
-
- devfs_rules_init();
-}
-
-SYSINIT(devfs, SI_SUB_DEVFS, SI_ORDER_FIRST, devfs_init, NULL);
-
diff --git a/sys/fs/devfs/devfs_rule.c b/sys/fs/devfs/devfs_rule.c
index 16b4022..366fd84 100644
--- a/sys/fs/devfs/devfs_rule.c
+++ b/sys/fs/devfs/devfs_rule.c
@@ -146,8 +146,8 @@ devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de)
/*
* Rule subsystem SYSINIT hook.
*/
-void
-devfs_rules_init(void)
+static void
+devfs_rules_init(void *junk __unused)
{
struct devfs_ruleset *ds;
@@ -158,6 +158,8 @@ devfs_rules_init(void)
ds->ds_refcount = 1; /* Prevent reaping. */
}
+SYSINIT(devfs_rules, SI_SUB_DEVFS, SI_ORDER_FIRST, devfs_rules_init, NULL);
+
/*
* Rule subsystem ioctl hook.
*/
OpenPOWER on IntegriCloud