diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-03-04 06:07:34 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-03-04 06:07:34 +0000 |
commit | 95fddf380390d9e21f0e6f0e5754ac1208ecdac6 (patch) | |
tree | 6c5d51c3c2b9ac7761afb6074ff8ce5a568b7e1c | |
parent | 91bbd18ac77c29d47ba51b1b981a1fc7f45d9915 (diff) | |
download | busybox-w32-95fddf380390d9e21f0e6f0e5754ac1208ecdac6.tar.gz busybox-w32-95fddf380390d9e21f0e6f0e5754ac1208ecdac6.tar.bz2 busybox-w32-95fddf380390d9e21f0e6f0e5754ac1208ecdac6.zip |
If umount2 is not available, stub it out.
git-svn-id: svn://busybox.net/trunk/busybox@1962 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | utility.c | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -189,18 +189,33 @@ _syscall1(int, sysinfo, struct sysinfo *, info); | |||
189 | 189 | ||
190 | #if defined BB_MOUNT || defined BB_UMOUNT | 190 | #if defined BB_MOUNT || defined BB_UMOUNT |
191 | 191 | ||
192 | #ifndef __NR_umount2 | ||
193 | static const int __NR_umount2 = 52; | ||
194 | #endif | ||
195 | |||
196 | /* Include our own version of <sys/mount.h>, since libc5 doesn't | 192 | /* Include our own version of <sys/mount.h>, since libc5 doesn't |
197 | * know about umount2 */ | 193 | * know about umount2 */ |
198 | extern _syscall1(int, umount, const char *, special_file); | 194 | extern _syscall1(int, umount, const char *, special_file); |
199 | extern _syscall2(int, umount2, const char *, special_file, int, flags); | ||
200 | extern _syscall5(int, mount, const char *, special_file, const char *, dir, | 195 | extern _syscall5(int, mount, const char *, special_file, const char *, dir, |
201 | const char *, fstype, unsigned long int, rwflag, const void *, data); | 196 | const char *, fstype, unsigned long int, rwflag, const void *, data); |
197 | #ifndef __NR_umount2 | ||
198 | # warning This kernel does not support the umount2 syscall | ||
199 | # warning The umount2 system call is being stubbed out... | ||
200 | int umount2(const char * special_file, int flags) | ||
201 | { | ||
202 | /* BusyBox was compiled against a kernel that did not support | ||
203 | * the umount2 system call. To make this application work, | ||
204 | * you will need to recompile with a kernel supporting the | ||
205 | * umount2 system call. | ||
206 | */ | ||
207 | fprintf(stderr, "\n\nTo make this application work, you will need to recompile\n"); | ||
208 | fprintf(stderr, "with a kernel supporting the umount2 system call. -Erik\n\n"); | ||
209 | errno=ENOSYS; | ||
210 | return -1; | ||
211 | } | ||
212 | # else | ||
213 | extern _syscall2(int, umount2, const char *, special_file, int, flags); | ||
214 | # endif | ||
202 | #endif | 215 | #endif |
203 | 216 | ||
217 | |||
218 | |||
204 | #if defined BB_FEATURE_NEW_MODULE_INTERFACE && ( defined BB_INSMOD || defined BB_LSMOD ) | 219 | #if defined BB_FEATURE_NEW_MODULE_INTERFACE && ( defined BB_INSMOD || defined BB_LSMOD ) |
205 | #ifndef __NR_query_module | 220 | #ifndef __NR_query_module |
206 | static const int __NR_query_module = 167; | 221 | static const int __NR_query_module = 167; |