diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-07 23:15:02 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-07 23:15:02 +0000 |
commit | 5ac44d06b883cf932bed5143858d532e0856fefa (patch) | |
tree | 3aa0506adca3c02f8e03bbc9dd3a0639205b94e6 | |
parent | 96b70f660b9ac0f9ce2ac0753ed24bfdd6e5d915 (diff) | |
parent | c321443c7c049a7975fed7c88c84c8a046bc9ef5 (diff) | |
download | toybox-sdk-release.tar.gz |
Snap for 11812660 from c321443c7c049a7975fed7c88c84c8a046bc9ef5 to sdk-releasesdk-release
Change-Id: I48da694f87fb6f8b18f510b9e3f8a70fbc4ece83
-rw-r--r-- | Android.bp | 6 | ||||
-rw-r--r-- | android/linux/generated/config.h | 12 | ||||
-rw-r--r-- | android/linux/generated/flags.h | 66 | ||||
-rw-r--r-- | android/linux/generated/globals.h | 23 | ||||
-rw-r--r-- | config-linux | 6 |
5 files changed, 68 insertions, 45 deletions
@@ -133,8 +133,11 @@ all_srcs = [ ] linux_srcs = [ + "toys/lsb/mount.c", + "toys/lsb/umount.c", "toys/posix/ps.c", "toys/other/flock.c", + "toys/other/nsenter.c", "toys/other/taskset.c", ] @@ -149,10 +152,8 @@ device_srcs = [ "toys/lsb/dmesg.c", "toys/lsb/killall.c", "toys/lsb/mknod.c", - "toys/lsb/mount.c", "toys/lsb/pidof.c", "toys/lsb/sync.c", - "toys/lsb/umount.c", "toys/net/ifconfig.c", "toys/net/netcat.c", "toys/net/netstat.c", @@ -192,7 +193,6 @@ device_srcs = [ "toys/other/modinfo.c", "toys/other/mountpoint.c", "toys/other/nbd_client.c", - "toys/other/nsenter.c", "toys/other/partprobe.c", "toys/other/pivot_root.c", "toys/other/pmap.c", diff --git a/android/linux/generated/config.h b/android/linux/generated/config.h index 3e2afb23..330982dd 100644 --- a/android/linux/generated/config.h +++ b/android/linux/generated/config.h @@ -402,8 +402,8 @@ #define USE_MODPROBE(...) #define CFG_MORE 0 #define USE_MORE(...) -#define CFG_MOUNT 0 -#define USE_MOUNT(...) +#define CFG_MOUNT 1 +#define USE_MOUNT(...) __VA_ARGS__ #define CFG_MOUNTPOINT 0 #define USE_MOUNTPOINT(...) #define CFG_MV 1 @@ -618,8 +618,8 @@ #define USE_UCLAMPSET(...) #define CFG_ULIMIT 0 #define USE_ULIMIT(...) -#define CFG_UMOUNT 0 -#define USE_UMOUNT(...) +#define CFG_UMOUNT 1 +#define USE_UMOUNT(...) __VA_ARGS__ #define CFG_UNAME 1 #define USE_UNAME(...) __VA_ARGS__ #define CFG_UNICODE 0 @@ -630,8 +630,8 @@ #define USE_UNIX2DOS(...) __VA_ARGS__ #define CFG_UNLINK 0 #define USE_UNLINK(...) -#define CFG_UNSHARE 0 -#define USE_UNSHARE(...) +#define CFG_UNSHARE 1 +#define USE_UNSHARE(...) __VA_ARGS__ #define CFG_UPTIME 0 #define USE_UPTIME(...) #define CFG_USERADD 0 diff --git a/android/linux/generated/flags.h b/android/linux/generated/flags.h index 125b74d0..d51629e0 100644 --- a/android/linux/generated/flags.h +++ b/android/linux/generated/flags.h @@ -2163,7 +2163,7 @@ #undef FOR_more #endif -// mount ?RO:afnrvwt:o*[-rw] +// mount ?RO:afnrvwt:o*[-rw] ?RO:afnrvwt:o*[-rw] #undef OPTSTR_mount #define OPTSTR_mount "?RO:afnrvwt:o*[-rw]" #ifdef CLEANUP_mount @@ -3570,7 +3570,7 @@ #undef FLAG_P #endif -// umount cndDflrat*v[!na] +// umount cndDflrat*v[!na] cndDflrat*v[!na] #undef OPTSTR_umount #define OPTSTR_umount "cndDflrat*v[!na]" #ifdef CLEANUP_umount @@ -3655,7 +3655,7 @@ #undef FLAG_f #endif -// unshare <1^a(all)f(fork)r(map-root-user)C(cgroup):; i(ipc):; m(mount):; n(net):; p(pid):; u(uts):; U(user):; +// unshare <1^a(all)f(fork)r(map-root-user)C(cgroup):; i(ipc):; m(mount):; n(net):; p(pid):; u(uts):; U(user):; <1^a(all)f(fork)r(map-root-user)C(cgroup):; i(ipc):; m(mount):; n(net):; p(pid):; u(uts):; U(user):; #undef OPTSTR_unshare #define OPTSTR_unshare "<1^a(all)f(fork)r(map-root-user)C(cgroup):; i(ipc):; m(mount):; n(net):; p(pid):; u(uts):; U(user):; " #ifdef CLEANUP_unshare @@ -5914,16 +5914,16 @@ #ifndef TT #define TT this.mount #endif -#define FLAG_o (FORCED_FLAG<<0) -#define FLAG_t (FORCED_FLAG<<1) -#define FLAG_w (FORCED_FLAG<<2) -#define FLAG_v (FORCED_FLAG<<3) -#define FLAG_r (FORCED_FLAG<<4) -#define FLAG_n (FORCED_FLAG<<5) -#define FLAG_f (FORCED_FLAG<<6) -#define FLAG_a (FORCED_FLAG<<7) -#define FLAG_O (FORCED_FLAG<<8) -#define FLAG_R (FORCED_FLAG<<9) +#define FLAG_o (1LL<<0) +#define FLAG_t (1LL<<1) +#define FLAG_w (1LL<<2) +#define FLAG_v (1LL<<3) +#define FLAG_r (1LL<<4) +#define FLAG_n (1LL<<5) +#define FLAG_f (1LL<<6) +#define FLAG_a (1LL<<7) +#define FLAG_O (1LL<<8) +#define FLAG_R (1LL<<9) #endif #ifdef FOR_mountpoint @@ -7217,16 +7217,16 @@ #ifndef TT #define TT this.umount #endif -#define FLAG_v (FORCED_FLAG<<0) -#define FLAG_t (FORCED_FLAG<<1) -#define FLAG_a (FORCED_FLAG<<2) -#define FLAG_r (FORCED_FLAG<<3) -#define FLAG_l (FORCED_FLAG<<4) -#define FLAG_f (FORCED_FLAG<<5) -#define FLAG_D (FORCED_FLAG<<6) -#define FLAG_d (FORCED_FLAG<<7) -#define FLAG_n (FORCED_FLAG<<8) -#define FLAG_c (FORCED_FLAG<<9) +#define FLAG_v (1LL<<0) +#define FLAG_t (1LL<<1) +#define FLAG_a (1LL<<2) +#define FLAG_r (1LL<<3) +#define FLAG_l (1LL<<4) +#define FLAG_f (1LL<<5) +#define FLAG_D (1LL<<6) +#define FLAG_d (1LL<<7) +#define FLAG_n (1LL<<8) +#define FLAG_c (1LL<<9) #endif #ifdef FOR_uname @@ -7295,16 +7295,16 @@ #ifndef TT #define TT this.unshare #endif -#define FLAG_U (FORCED_FLAG<<0) -#define FLAG_u (FORCED_FLAG<<1) -#define FLAG_p (FORCED_FLAG<<2) -#define FLAG_n (FORCED_FLAG<<3) -#define FLAG_m (FORCED_FLAG<<4) -#define FLAG_i (FORCED_FLAG<<5) -#define FLAG_C (FORCED_FLAG<<6) -#define FLAG_r (FORCED_FLAG<<7) -#define FLAG_f (FORCED_FLAG<<8) -#define FLAG_a (FORCED_FLAG<<9) +#define FLAG_U (1LL<<0) +#define FLAG_u (1LL<<1) +#define FLAG_p (1LL<<2) +#define FLAG_n (1LL<<3) +#define FLAG_m (1LL<<4) +#define FLAG_i (1LL<<5) +#define FLAG_C (1LL<<6) +#define FLAG_r (1LL<<7) +#define FLAG_f (1LL<<8) +#define FLAG_a (1LL<<9) #endif #ifdef FOR_uptime diff --git a/android/linux/generated/globals.h b/android/linux/generated/globals.h index 362a97bc..37bdea6b 100644 --- a/android/linux/generated/globals.h +++ b/android/linux/generated/globals.h @@ -14,12 +14,27 @@ struct mktemp_data { char *p, *tmpdir; }; +struct mount_data { + struct arg_list *o; + char *t, *O; + + unsigned long flags; + char *opts; + int okuser; +}; + struct seq_data { char *s, *f; int precision, buflen; }; +struct umount_data { + struct arg_list *t; + + char *types; +}; + struct microcom_data { long s; @@ -36,6 +51,11 @@ struct getopt_data { char *o, *n; }; +struct nsenter_data { + char *UupnmiC[7]; + long t; +}; + struct realpath_data { char *R, *relative_base; }; @@ -399,10 +419,13 @@ extern union global_union { struct hostname_data hostname; struct md5sum_data md5sum; struct mktemp_data mktemp; + struct mount_data mount; struct seq_data seq; + struct umount_data umount; struct microcom_data microcom; struct dos2unix_data dos2unix; struct getopt_data getopt; + struct nsenter_data nsenter; struct realpath_data realpath; struct setsid_data setsid; struct stat_data stat; diff --git a/config-linux b/config-linux index 59b5745a..24132c62 100644 --- a/config-linux +++ b/config-linux @@ -214,7 +214,7 @@ CONFIG_MKTEMP=y # CONFIG_MODINFO is not set # CONFIG_MODPROBE is not set # CONFIG_MORE is not set -# CONFIG_MOUNT is not set +CONFIG_MOUNT=y # CONFIG_MOUNTPOINT is not set CONFIG_MV=y # CONFIG_NBD_CLIENT is not set @@ -322,13 +322,13 @@ CONFIG_TR=y # CONFIG_TUNCTL is not set # CONFIG_UCLAMPSET is not set # CONFIG_ULIMIT is not set -# CONFIG_UMOUNT is not set +CONFIG_UMOUNT=y CONFIG_UNAME=y # CONFIG_UNICODE is not set CONFIG_UNIQ=y CONFIG_UNIX2DOS=y # CONFIG_UNLINK is not set -# CONFIG_UNSHARE is not set +CONFIG_UNSHARE=y # CONFIG_UPTIME is not set # CONFIG_USERADD is not set # CONFIG_USERDEL is not set |