aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-07-08 02:58:38 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-07-08 02:58:38 +0200
commitda49f5852481adb0b3fa0b5ccba93b266f271c35 (patch)
tree3ab27dafe02a3723658ab2649e8b3ea28b024ac5 /util-linux
parent95cc814dbd37a4cb5a69b5eac80bd3e5173fe908 (diff)
downloadbusybox-w32-da49f5852481adb0b3fa0b5ccba93b266f271c35.tar.gz
busybox-w32-da49f5852481adb0b3fa0b5ccba93b266f271c35.tar.bz2
busybox-w32-da49f5852481adb0b3fa0b5ccba93b266f271c35.zip
move libc related stuff out of platform.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fdisk.c4
-rw-r--r--util-linux/freeramdisk.c2
-rw-r--r--util-linux/mkfs_vfat.c9
-rw-r--r--util-linux/mount.c31
-rw-r--r--util-linux/switch_root.c6
-rw-r--r--util-linux/umount.c31
-rw-r--r--util-linux/volume_id/get_devname.c7
7 files changed, 76 insertions, 14 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 514b5d79c..441640831 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -12,6 +12,10 @@
12#define _LARGEFILE64_SOURCE 12#define _LARGEFILE64_SOURCE
13#endif 13#endif
14#include <assert.h> /* assert */ 14#include <assert.h> /* assert */
15#include <sys/mount.h>
16#if !defined(BLKSSZGET)
17# define BLKSSZGET _IO(0x12, 104)
18#endif
15#include "libbb.h" 19#include "libbb.h"
16 20
17/* Looks like someone forgot to add this to config system */ 21/* Looks like someone forgot to add this to config system */
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index bde6afc0a..6b9d95e69 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -8,7 +8,7 @@
8 * 8 *
9 * Licensed under GPLv2, see file LICENSE in this tarball for details. 9 * Licensed under GPLv2, see file LICENSE in this tarball for details.
10 */ 10 */
11 11#include <sys/mount.h>
12#include "libbb.h" 12#include "libbb.h"
13 13
14/* From <linux/fd.h> */ 14/* From <linux/fd.h> */
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
index 8c6078d7b..8d12babdc 100644
--- a/util-linux/mkfs_vfat.c
+++ b/util-linux/mkfs_vfat.c
@@ -7,12 +7,15 @@
7 * 7 *
8 * Licensed under GPLv2, see file LICENSE in this tarball for details. 8 * Licensed under GPLv2, see file LICENSE in this tarball for details.
9 */ 9 */
10#include "libbb.h"
11#include "volume_id/volume_id_internal.h"
12
13#include <linux/hdreg.h> /* HDIO_GETGEO */ 10#include <linux/hdreg.h> /* HDIO_GETGEO */
14#include <linux/fd.h> /* FDGETPRM */ 11#include <linux/fd.h> /* FDGETPRM */
12#include <sys/mount.h> /* BLKSSZGET */
13#if !defined(BLKSSZGET)
14# define BLKSSZGET _IO(0x12, 104)
15#endif
15//#include <linux/msdos_fs.h> 16//#include <linux/msdos_fs.h>
17#include "libbb.h"
18#include "volume_id/volume_id_internal.h"
16 19
17#define SECTOR_SIZE 512 20#define SECTOR_SIZE 512
18 21
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 72dabd840..56c32e126 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -8,7 +8,6 @@
8 * 8 *
9 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 9 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
10 */ 10 */
11
12// Design notes: There is no spec for mount. Remind me to write one. 11// Design notes: There is no spec for mount. Remind me to write one.
13// 12//
14// mount_main() calls singlemount() which calls mount_it_now(). 13// mount_main() calls singlemount() which calls mount_it_now().
@@ -17,9 +16,37 @@
17// singlemount() can loop through /etc/filesystems for fstype detection. 16// singlemount() can loop through /etc/filesystems for fstype detection.
18// mount_it_now() does the actual mount. 17// mount_it_now() does the actual mount.
19// 18//
20
21#include <mntent.h> 19#include <mntent.h>
22#include <syslog.h> 20#include <syslog.h>
21#include <sys/mount.h>
22#ifndef MS_BIND
23# define MS_BIND (1 << 12)
24#endif
25#ifndef MS_MOVE
26# define MS_MOVE (1 << 13)
27#endif
28#ifndef MS_RECURSIVE
29# define MS_RECURSIVE (1 << 14)
30#endif
31#ifndef MS_SILENT
32# define MS_SILENT (1 << 15)
33#endif
34/* The shared subtree stuff, which went in around 2.6.15. */
35#ifndef MS_UNBINDABLE
36# define MS_UNBINDABLE (1 << 17)
37#endif
38#ifndef MS_PRIVATE
39# define MS_PRIVATE (1 << 18)
40#endif
41#ifndef MS_SLAVE
42# define MS_SLAVE (1 << 19)
43#endif
44#ifndef MS_SHARED
45# define MS_SHARED (1 << 20)
46#endif
47#ifndef MS_RELATIME
48# define MS_RELATIME (1 << 21)
49#endif
23#include "libbb.h" 50#include "libbb.h"
24 51
25#if ENABLE_FEATURE_MOUNT_LABEL 52#if ENABLE_FEATURE_MOUNT_LABEL
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index 0f00b605a..ff0551843 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -5,18 +5,16 @@
5 * 5 *
6 * Licensed under GPL version 2, see file LICENSE in this tarball for details. 6 * Licensed under GPL version 2, see file LICENSE in this tarball for details.
7 */ 7 */
8#include "libbb.h"
9#include <sys/vfs.h> 8#include <sys/vfs.h>
10 9#include <sys/mount.h>
10#include "libbb.h"
11// Make up for header deficiencies 11// Make up for header deficiencies
12#ifndef RAMFS_MAGIC 12#ifndef RAMFS_MAGIC
13# define RAMFS_MAGIC ((unsigned)0x858458f6) 13# define RAMFS_MAGIC ((unsigned)0x858458f6)
14#endif 14#endif
15
16#ifndef TMPFS_MAGIC 15#ifndef TMPFS_MAGIC
17# define TMPFS_MAGIC ((unsigned)0x01021994) 16# define TMPFS_MAGIC ((unsigned)0x01021994)
18#endif 17#endif
19
20#ifndef MS_MOVE 18#ifndef MS_MOVE
21# define MS_MOVE 8192 19# define MS_MOVE 8192
22#endif 20#endif
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 5b22bfacc..a4b2bd087 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -7,8 +7,37 @@
7 * 7 *
8 * Licensed under GPL version 2, see file LICENSE in this tarball for details. 8 * Licensed under GPL version 2, see file LICENSE in this tarball for details.
9 */ 9 */
10
11#include <mntent.h> 10#include <mntent.h>
11#include <sys/mount.h>
12/* Make sure we have all the new mount flags we actually try to use. */
13#ifndef MS_BIND
14# define MS_BIND (1 << 12)
15#endif
16#ifndef MS_MOVE
17# define MS_MOVE (1 << 13)
18#endif
19#ifndef MS_RECURSIVE
20# define MS_RECURSIVE (1 << 14)
21#endif
22#ifndef MS_SILENT
23# define MS_SILENT (1 << 15)
24#endif
25/* The shared subtree stuff, which went in around 2.6.15. */
26#ifndef MS_UNBINDABLE
27# define MS_UNBINDABLE (1 << 17)
28#endif
29#ifndef MS_PRIVATE
30# define MS_PRIVATE (1 << 18)
31#endif
32#ifndef MS_SLAVE
33# define MS_SLAVE (1 << 19)
34#endif
35#ifndef MS_SHARED
36# define MS_SHARED (1 << 20)
37#endif
38#ifndef MS_RELATIME
39# define MS_RELATIME (1 << 21)
40#endif
12#include "libbb.h" 41#include "libbb.h"
13 42
14#if defined(__dietlibc__) 43#if defined(__dietlibc__)
diff --git a/util-linux/volume_id/get_devname.c b/util-linux/volume_id/get_devname.c
index a1786df1c..0686a0741 100644
--- a/util-linux/volume_id/get_devname.c
+++ b/util-linux/volume_id/get_devname.c
@@ -7,11 +7,12 @@
7 * 7 *
8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
9 */ 9 */
10 10#include <sys/mount.h> /* BLKGETSIZE64 */
11#if !defined(BLKGETSIZE64)
12# define BLKGETSIZE64 _IOR(0x12,114,size_t)
13#endif
11#include "volume_id_internal.h" 14#include "volume_id_internal.h"
12 15
13//#define BLKGETSIZE64 _IOR(0x12,114,size_t)
14
15static struct uuidCache_s { 16static struct uuidCache_s {
16 struct uuidCache_s *next; 17 struct uuidCache_s *next;
17// int major, minor; 18// int major, minor;