Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1122 - (hide annotations) (download)
Wed Aug 18 21:11:40 2010 UTC (13 years, 8 months ago) by niro
File MIME type: text/plain
File size: 1113 byte(s)
-updated to klibc-1.5.19
1 niro 532 /*
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 niro 1122 #define Root_MULTI __makedev(0,253)
18 niro 532
19     int create_dev(const char *name, dev_t dev);
20    
21     dev_t name_to_dev_t(const char *name);
22    
23     const char *mount_block(const char *source, const char *target,
24     const char *type, unsigned long flags,
25     const void *data);
26    
27     int mount_root(int argc, char *argv[], dev_t root_dev,
28     const char *root_dev_name);
29    
30     int mount_mtd_root(int argc, char *argv[], const char *root_dev_name,
31     const char *type, unsigned long flags);
32    
33     int do_mounts(int argc, char *argv[]);
34    
35     int initrd_load(int argc, char *argv[], dev_t root_dev);
36    
37     static inline dev_t bstat(const char *name)
38     {
39     struct stat st;
40    
41     if (stat(name, &st) || !S_ISBLK(st.st_mode))
42     return 0;
43     return st.st_rdev;
44     }
45    
46     int load_ramdisk_compressed(const char *devpath, FILE * wfd,
47     off_t ramdisk_start);
48    
49     #endif /* DO_MOUNTS_H */