Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/kinit/do_mounts.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 1077 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 /*
2 * do_mounts.h
3 */
4
5 #ifndef DO_MOUNTS_H
6 #define DO_MOUNTS_H
7
8 #include <sys/types.h>
9 #include <sys/sysmacros.h>
10 #include <sys/stat.h>
11
12 #define Root_RAM0 __makedev(1,0)
13
14 /* These device numbers are only used internally */
15 #define Root_NFS __makedev(0,255)
16 #define Root_MTD __makedev(0,254)
17
18 int create_dev(const char *name, dev_t dev);
19
20 dev_t name_to_dev_t(const char *name);
21
22 const char *mount_block(const char *source, const char *target,
23 const char *type, unsigned long flags,
24 const void *data);
25
26 int mount_root(int argc, char *argv[], dev_t root_dev,
27 const char *root_dev_name);
28
29 int mount_mtd_root(int argc, char *argv[], const char *root_dev_name,
30 const char *type, unsigned long flags);
31
32 int do_mounts(int argc, char *argv[]);
33
34 int initrd_load(int argc, char *argv[], dev_t root_dev);
35
36 static inline dev_t bstat(const char *name)
37 {
38 struct stat st;
39
40 if (stat(name, &st) || !S_ISBLK(st.st_mode))
41 return 0;
42 return st.st_rdev;
43 }
44
45 int load_ramdisk_compressed(const char *devpath, FILE * wfd,
46 off_t ramdisk_start);
47
48 #endif /* DO_MOUNTS_H */