aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /init/do_mounts.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'init/do_mounts.h')
-rw-r--r--init/do_mounts.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/init/do_mounts.h b/init/do_mounts.h
new file mode 100644
index 000000000000..de92bee4f35e
--- /dev/null
+++ b/init/do_mounts.h
@@ -0,0 +1,92 @@
1#include <linux/config.h>
2#include <linux/kernel.h>
3#include <linux/devfs_fs_kernel.h>
4#include <linux/init.h>
5#include <linux/syscalls.h>
6#include <linux/unistd.h>
7#include <linux/slab.h>
8#include <linux/mount.h>
9#include <linux/major.h>
10#include <linux/root_dev.h>
11
12dev_t name_to_dev_t(char *name);
13void change_floppy(char *fmt, ...);
14void mount_block_root(char *name, int flags);
15void mount_root(void);
16extern int root_mountflags;
17extern char *root_device_name;
18
19#ifdef CONFIG_DEVFS_FS
20
21void mount_devfs(void);
22void umount_devfs(char *path);
23int create_dev(char *name, dev_t dev, char *devfs_name);
24
25#else
26
27static inline void mount_devfs(void) {}
28static inline void umount_devfs(const char *path) {}
29
30static inline int create_dev(char *name, dev_t dev, char *devfs_name)
31{
32 sys_unlink(name);
33 return sys_mknod(name, S_IFBLK|0600, new_encode_dev(dev));
34}
35
36#endif
37
38#if BITS_PER_LONG == 32
39static inline u32 bstat(char *name)
40{
41 struct stat64 stat;
42 if (sys_stat64(name, &stat) != 0)
43 return 0;
44 if (!S_ISBLK(stat.st_mode))
45 return 0;
46 if (stat.st_rdev != (u32)stat.st_rdev)
47 return 0;
48 return stat.st_rdev;
49}
50#else
51static inline u32 bstat(char *name)
52{
53 struct stat stat;
54 if (sys_newstat(name, &stat) != 0)
55 return 0;
56 if (!S_ISBLK(stat.st_mode))
57 return 0;
58 return stat.st_rdev;
59}
60#endif
61
62#ifdef CONFIG_BLK_DEV_RAM
63
64int __init rd_load_disk(int n);
65int __init rd_load_image(char *from);
66
67#else
68
69static inline int rd_load_disk(int n) { return 0; }
70static inline int rd_load_image(char *from) { return 0; }
71
72#endif
73
74#ifdef CONFIG_BLK_DEV_INITRD
75
76int __init initrd_load(void);
77
78#else
79
80static inline int initrd_load(void) { return 0; }
81
82#endif
83
84#ifdef CONFIG_BLK_DEV_MD
85
86void md_run_setup(void);
87
88#else
89
90static inline void md_run_setup(void) {}
91
92#endif