[PATCH] I2C: chips/Kconfig corrections
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / init / do_mounts.h
blobde92bee4f35e7b9e03a5871e0d7c96c4c4bcc608
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>
12 dev_t name_to_dev_t(char *name);
13 void change_floppy(char *fmt, ...);
14 void mount_block_root(char *name, int flags);
15 void mount_root(void);
16 extern int root_mountflags;
17 extern char *root_device_name;
19 #ifdef CONFIG_DEVFS_FS
21 void mount_devfs(void);
22 void umount_devfs(char *path);
23 int create_dev(char *name, dev_t dev, char *devfs_name);
25 #else
27 static inline void mount_devfs(void) {}
28 static inline void umount_devfs(const char *path) {}
30 static inline int create_dev(char *name, dev_t dev, char *devfs_name)
32 sys_unlink(name);
33 return sys_mknod(name, S_IFBLK|0600, new_encode_dev(dev));
36 #endif
38 #if BITS_PER_LONG == 32
39 static inline u32 bstat(char *name)
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;
50 #else
51 static inline u32 bstat(char *name)
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;
60 #endif
62 #ifdef CONFIG_BLK_DEV_RAM
64 int __init rd_load_disk(int n);
65 int __init rd_load_image(char *from);
67 #else
69 static inline int rd_load_disk(int n) { return 0; }
70 static inline int rd_load_image(char *from) { return 0; }
72 #endif
74 #ifdef CONFIG_BLK_DEV_INITRD
76 int __init initrd_load(void);
78 #else
80 static inline int initrd_load(void) { return 0; }
82 #endif
84 #ifdef CONFIG_BLK_DEV_MD
86 void md_run_setup(void);
88 #else
90 static inline void md_run_setup(void) {}
92 #endif