move libc related stuff out of platform.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#include <assert.h> /* assert */
|
||||
#include <sys/mount.h>
|
||||
#if !defined(BLKSSZGET)
|
||||
# define BLKSSZGET _IO(0x12, 104)
|
||||
#endif
|
||||
#include "libbb.h"
|
||||
|
||||
/* Looks like someone forgot to add this to config system */
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Licensed under GPLv2, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include "libbb.h"
|
||||
|
||||
/* From <linux/fd.h> */
|
||||
|
@@ -7,12 +7,15 @@
|
||||
*
|
||||
* Licensed under GPLv2, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include "volume_id/volume_id_internal.h"
|
||||
|
||||
#include <linux/hdreg.h> /* HDIO_GETGEO */
|
||||
#include <linux/fd.h> /* FDGETPRM */
|
||||
#include <sys/mount.h> /* BLKSSZGET */
|
||||
#if !defined(BLKSSZGET)
|
||||
# define BLKSSZGET _IO(0x12, 104)
|
||||
#endif
|
||||
//#include <linux/msdos_fs.h>
|
||||
#include "libbb.h"
|
||||
#include "volume_id/volume_id_internal.h"
|
||||
|
||||
#define SECTOR_SIZE 512
|
||||
|
||||
|
@@ -8,7 +8,6 @@
|
||||
*
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
|
||||
// Design notes: There is no spec for mount. Remind me to write one.
|
||||
//
|
||||
// mount_main() calls singlemount() which calls mount_it_now().
|
||||
@@ -17,9 +16,37 @@
|
||||
// singlemount() can loop through /etc/filesystems for fstype detection.
|
||||
// mount_it_now() does the actual mount.
|
||||
//
|
||||
|
||||
#include <mntent.h>
|
||||
#include <syslog.h>
|
||||
#include <sys/mount.h>
|
||||
#ifndef MS_BIND
|
||||
# define MS_BIND (1 << 12)
|
||||
#endif
|
||||
#ifndef MS_MOVE
|
||||
# define MS_MOVE (1 << 13)
|
||||
#endif
|
||||
#ifndef MS_RECURSIVE
|
||||
# define MS_RECURSIVE (1 << 14)
|
||||
#endif
|
||||
#ifndef MS_SILENT
|
||||
# define MS_SILENT (1 << 15)
|
||||
#endif
|
||||
/* The shared subtree stuff, which went in around 2.6.15. */
|
||||
#ifndef MS_UNBINDABLE
|
||||
# define MS_UNBINDABLE (1 << 17)
|
||||
#endif
|
||||
#ifndef MS_PRIVATE
|
||||
# define MS_PRIVATE (1 << 18)
|
||||
#endif
|
||||
#ifndef MS_SLAVE
|
||||
# define MS_SLAVE (1 << 19)
|
||||
#endif
|
||||
#ifndef MS_SHARED
|
||||
# define MS_SHARED (1 << 20)
|
||||
#endif
|
||||
#ifndef MS_RELATIME
|
||||
# define MS_RELATIME (1 << 21)
|
||||
#endif
|
||||
#include "libbb.h"
|
||||
|
||||
#if ENABLE_FEATURE_MOUNT_LABEL
|
||||
|
@@ -5,18 +5,16 @@
|
||||
*
|
||||
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include <sys/vfs.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include "libbb.h"
|
||||
// Make up for header deficiencies
|
||||
#ifndef RAMFS_MAGIC
|
||||
# define RAMFS_MAGIC ((unsigned)0x858458f6)
|
||||
#endif
|
||||
|
||||
#ifndef TMPFS_MAGIC
|
||||
# define TMPFS_MAGIC ((unsigned)0x01021994)
|
||||
#endif
|
||||
|
||||
#ifndef MS_MOVE
|
||||
# define MS_MOVE 8192
|
||||
#endif
|
||||
|
@@ -7,8 +7,37 @@
|
||||
*
|
||||
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
|
||||
#include <mntent.h>
|
||||
#include <sys/mount.h>
|
||||
/* Make sure we have all the new mount flags we actually try to use. */
|
||||
#ifndef MS_BIND
|
||||
# define MS_BIND (1 << 12)
|
||||
#endif
|
||||
#ifndef MS_MOVE
|
||||
# define MS_MOVE (1 << 13)
|
||||
#endif
|
||||
#ifndef MS_RECURSIVE
|
||||
# define MS_RECURSIVE (1 << 14)
|
||||
#endif
|
||||
#ifndef MS_SILENT
|
||||
# define MS_SILENT (1 << 15)
|
||||
#endif
|
||||
/* The shared subtree stuff, which went in around 2.6.15. */
|
||||
#ifndef MS_UNBINDABLE
|
||||
# define MS_UNBINDABLE (1 << 17)
|
||||
#endif
|
||||
#ifndef MS_PRIVATE
|
||||
# define MS_PRIVATE (1 << 18)
|
||||
#endif
|
||||
#ifndef MS_SLAVE
|
||||
# define MS_SLAVE (1 << 19)
|
||||
#endif
|
||||
#ifndef MS_SHARED
|
||||
# define MS_SHARED (1 << 20)
|
||||
#endif
|
||||
#ifndef MS_RELATIME
|
||||
# define MS_RELATIME (1 << 21)
|
||||
#endif
|
||||
#include "libbb.h"
|
||||
|
||||
#if defined(__dietlibc__)
|
||||
|
@@ -7,11 +7,12 @@
|
||||
*
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
|
||||
#include <sys/mount.h> /* BLKGETSIZE64 */
|
||||
#if !defined(BLKGETSIZE64)
|
||||
# define BLKGETSIZE64 _IOR(0x12,114,size_t)
|
||||
#endif
|
||||
#include "volume_id_internal.h"
|
||||
|
||||
//#define BLKGETSIZE64 _IOR(0x12,114,size_t)
|
||||
|
||||
static struct uuidCache_s {
|
||||
struct uuidCache_s *next;
|
||||
// int major, minor;
|
||||
|
Reference in New Issue
Block a user