aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/dmesg.c13
-rw-r--r--util-linux/mount.c6
-rw-r--r--util-linux/pivot_root.c23
-rw-r--r--util-linux/swaponoff.c13
4 files changed, 14 insertions, 41 deletions
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 2c85ed3e9..73de6d1ae 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -20,18 +20,13 @@
20#include <getopt.h> 20#include <getopt.h>
21 21
22#if __GNU_LIBRARY__ < 5 22#if __GNU_LIBRARY__ < 5
23#include <sys/syscall.h> 23# ifdef __alpha__
24#include <linux/unistd.h> 24# define klogctl syslog
25#ifndef __alpha__ 25# endif
26# define __NR_klogctl __NR_syslog
27static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
28#else /* __alpha__ */
29#define klogctl syslog
30#endif
31
32#else 26#else
33# include <sys/klog.h> 27# include <sys/klog.h>
34#endif 28#endif
29
35#include "busybox.h" 30#include "busybox.h"
36 31
37int dmesg_main(int argc, char **argv) 32int dmesg_main(int argc, char **argv)
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 57dc73e55..5b6ec1e71 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -84,11 +84,7 @@ extern int mount (__const char *__special_file, __const char *__dir,
84extern int umount (__const char *__special_file); 84extern int umount (__const char *__special_file);
85extern int umount2 (__const char *__special_file, int __flags); 85extern int umount2 (__const char *__special_file, int __flags);
86 86
87#include <sys/syscall.h> 87extern int sysfs( int option, unsigned int fs_index, char * buf);
88#include <linux/unistd.h>
89static int sysfs( int option, unsigned int fs_index, char * buf);
90_syscall3(int, sysfs, int, option, unsigned int, fs_index, char *, buf);
91
92 88
93extern const char mtab_file[]; /* Defined in utility.c */ 89extern const char mtab_file[]; /* Defined in utility.c */
94 90
diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c
index 4d7f8a3d1..ba26b9c58 100644
--- a/util-linux/pivot_root.c
+++ b/util-linux/pivot_root.c
@@ -9,30 +9,9 @@
9#include <stdlib.h> 9#include <stdlib.h>
10#include <stdio.h> 10#include <stdio.h>
11#include <errno.h> 11#include <errno.h>
12#include <sys/syscall.h>
13#include <linux/unistd.h>
14#include "busybox.h" 12#include "busybox.h"
15 13
16#ifndef __NR_pivot_root 14extern int pivot_root(const char * new_root,const char * put_old);
17#warning This kernel does not support the pivot_root syscall
18#warning The pivot_root system call is being stubbed out...
19int pivot_root(const char * new_root,const char * put_old)
20{
21 /* BusyBox was compiled against a kernel that did not support
22 * the pivot_root system call. To make this application work,
23 * you will need to recompile with a kernel supporting the
24 * pivot_root system call.
25 */
26 fprintf(stderr, "\n\nTo make this application work, you will need to recompile\n");
27 fprintf(stderr, "with a kernel supporting the pivot_root system call. -Erik\n\n");
28 errno=ENOSYS;
29 return -1;
30}
31#else
32static _syscall2(int,pivot_root,const char *,new_root,const char *,put_old)
33#endif
34
35
36 15
37int pivot_root_main(int argc, char **argv) 16int pivot_root_main(int argc, char **argv)
38{ 17{
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 55022ae3b..ce0e2c6cc 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -29,13 +29,16 @@
29#include <string.h> 29#include <string.h>
30#include <stdlib.h> 30#include <stdlib.h>
31#include <sys/mount.h> 31#include <sys/mount.h>
32#include <sys/syscall.h>
33#include <linux/unistd.h>
34#include "busybox.h"
35 32
36static _syscall2(int, swapon, const char *, path, int, flags); 33#if __GNU_LIBRARY__ < 5
37static _syscall1(int, swapoff, const char *, path); 34/* libc5 doesn't have sys/swap.h, define these here. */
35extern int swapon (__const char *__path, int __flags);
36extern int swapoff (__const char *__path);
37#else
38#include <sys/swap.h>
39#endif
38 40
41#include "busybox.h"
39 42
40static int whichApp; 43static int whichApp;
41 44