diff options
Diffstat (limited to 'mount.c')
-rw-r--r-- | mount.c | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -43,27 +43,41 @@ | |||
43 | #include <string.h> | 43 | #include <string.h> |
44 | #include <stdio.h> | 44 | #include <stdio.h> |
45 | #include <mntent.h> | 45 | #include <mntent.h> |
46 | #include <sys/mount.h> | ||
47 | #include <ctype.h> | 46 | #include <ctype.h> |
48 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 47 | #if defined BB_FEATURE_USE_DEVPS_PATCH |
49 | #include <linux/devmtab.h> | 48 | #include <linux/devmtab.h> |
50 | #endif | 49 | #endif |
51 | 50 | ||
52 | /* 2.0.x. kernels don't know about MS_NODIRATIME */ | 51 | |
53 | #ifndef MS_NODIRATIME | 52 | #define MS_MGC_VAL 0xc0ed0000 /* Magic number indicatng "new" flags */ |
53 | #define MS_RDONLY 1 /* Mount read-only */ | ||
54 | #define MS_NOSUID 2 /* Ignore suid and sgid bits */ | ||
55 | #define MS_NODEV 4 /* Disallow access to device special files */ | ||
56 | #define MS_NOEXEC 8 /* Disallow program execution */ | ||
57 | #define MS_SYNCHRONOUS 16 /* Writes are synced at once */ | ||
58 | #define MS_REMOUNT 32 /* Alter flags of a mounted FS */ | ||
59 | #define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ | ||
60 | #define S_QUOTA 128 /* Quota initialized for file/directory/symlink */ | ||
61 | #define S_APPEND 256 /* Append-only file */ | ||
62 | #define S_IMMUTABLE 512 /* Immutable file */ | ||
63 | #define MS_NOATIME 1024 /* Do not update access times. */ | ||
54 | #define MS_NODIRATIME 2048 /* Do not update directory access times */ | 64 | #define MS_NODIRATIME 2048 /* Do not update directory access times */ |
55 | #endif | ||
56 | 65 | ||
57 | 66 | ||
58 | 67 | ||
59 | #if defined BB_FEATURE_MOUNT_LOOP | 68 | #if defined BB_FEATURE_MOUNT_LOOP |
60 | #include <fcntl.h> | 69 | #include <fcntl.h> |
61 | #include <sys/ioctl.h> | 70 | #include <sys/ioctl.h> |
62 | |||
63 | |||
64 | static int use_loop = FALSE; | 71 | static int use_loop = FALSE; |
65 | #endif | 72 | #endif |
66 | 73 | ||
74 | extern int mount (__const char *__special_file, __const char *__dir, | ||
75 | __const char *__fstype, unsigned long int __rwflag, | ||
76 | __const void *__data); | ||
77 | extern int umount (__const char *__special_file); | ||
78 | extern int umount2 (__const char *__special_file, int __flags); | ||
79 | |||
80 | |||
67 | extern const char mtab_file[]; /* Defined in utility.c */ | 81 | extern const char mtab_file[]; /* Defined in utility.c */ |
68 | 82 | ||
69 | static const char mount_usage[] = | 83 | static const char mount_usage[] = |