1 /* vi: set sw=4 ts=4: */
5 * Copyright (C) tons of folks. Tracking down who wrote what
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
30 #include <sys/syscall.h>
31 #include <linux/unistd.h>
35 _syscall3(int, sysfs, int, option, unsigned int, fs_index, char *, buf);
37 #ifndef __NR_pivot_root
38 #warning This kernel does not support the pivot_root syscall
39 #warning -> The pivot_root system call is being stubbed out...
40 int pivot_root(const char * new_root,const char * put_old)
42 /* BusyBox was compiled against a kernel that did not support
43 * the pivot_root system call. To make this application work,
44 * you will need to recompile with a kernel supporting the
45 * pivot_root system call.
47 fprintf(stderr, "\n\nTo make this application work, you will need to recompile\n");
48 fprintf(stderr, "with a kernel supporting the pivot_root system call. -Erik\n\n");
53 _syscall2(int,pivot_root,const char *,new_root,const char *,put_old)
59 #if __GNU_LIBRARY__ < 5
60 /* These syscalls are not included as part of libc5 */
61 _syscall2(int, bdflush, int, func, int, data);
62 _syscall1(int, delete_module, const char *, name)
64 #ifndef __NR_query_module
65 #warning This kernel does not support the query_module syscall
66 #warning -> The query_module system call is being stubbed out...
67 int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret)
69 /* BusyBox was compiled against a kernel that did not support
70 * the query_module system call. To make this application work,
71 * you will need to recompile with a kernel supporting the
72 * query_module system call.
74 fprintf(stderr, "\n\nTo make this application work, you will need to recompile\n");
75 fprintf(stderr, "with a kernel supporting the query_module system call. -Erik\n\n");
80 _syscall5(int, query_module, const char *, name, int, which,
81 void *, buf, size_t, bufsize, size_t*, ret);
85 # define __NR_klogctl __NR_syslog
86 _syscall3(int, klogctl, int, type, char *, b, int, len);
90 # warning This kernel does not support the umount2 syscall
91 # warning -> The umount2 system call is being stubbed out...
92 int umount2(const char * special_file, int flags)
94 /* BusyBox was compiled against a kernel that did not support
95 * the umount2 system call. To make this application work,
96 * you will need to recompile with a kernel supporting the
97 * umount2 system call.
99 fprintf(stderr, "\n\nTo make this application work, you will need to recompile\n");
100 fprintf(stderr, "with a kernel supporting the umount2 system call. -Erik\n\n");
105 _syscall2(int, umount2, const char *, special_file, int, flags);
109 #endif /* __GNU_LIBRARY__ < 5 */
113 _syscall1(int, sysinfo, struct sysinfo *, info);
120 c-file-style: "linux"