Skip to content

Commit aa241fa

Browse files
committed
✨ feat(busybox): update
1 parent f6e3b0c commit aa241fa

4 files changed

Lines changed: 52 additions & 12 deletions

File tree

repo/packages/b/busybox/patches/1.35.0/01_adapt_smart.diff

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,19 @@ index 827643808..d98d58ec9 100644
842842
}
843843
static int
844844
dup2_or_raise(int from, int to)
845+
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c
846+
index 4c30f31f8..a152d3a73 100644
847+
--- a/util-linux/fdisk_gpt.c
848+
+++ b/util-linux/fdisk_gpt.c
849+
@@ -108,7 +108,7 @@ gpt_list_table(int xtra UNUSED_PARAM)
850+
int i;
851+
char numstr6[6];
852+
853+
- smart_ulltoa5(total_number_of_sectors * sector_size, numstr6, " KMGTPEZY")[0] = '\0';
854+
+ smart_ulltoa5((unsigned long long)total_number_of_sectors * (unsigned long long)sector_size, numstr6, " KMGTPEZY")[0] = '\0';
855+
printf("Disk %s: %llu sectors, %s\n", disk_device,
856+
(unsigned long long)total_number_of_sectors,
857+
numstr6);
845858
diff --git a/util-linux/fsfreeze.c b/util-linux/fsfreeze.c
846859
index 6e2ff0a54..6ba039890 100644
847860
--- a/util-linux/fsfreeze.c
@@ -869,7 +882,7 @@ index 6d673002f..1f0ba5066 100644
869882
#ifndef FITRIM
870883
struct fstrim_range {
871884
diff --git a/util-linux/mount.c b/util-linux/mount.c
872-
index 4e65b6b46..08eff7a84 100644
885+
index 4e65b6b46..258ec69b2 100644
873886
--- a/util-linux/mount.c
874887
+++ b/util-linux/mount.c
875888
@@ -255,9 +255,9 @@
@@ -885,15 +898,29 @@ index 4e65b6b46..08eff7a84 100644
885898
#endif
886899

887900

888-
@@ -818,6 +818,7 @@ static int mount_it_now(struct mntent *mp, unsigned long vfsflags, char *filtero
901+
@@ -806,7 +806,13 @@ static int mount_it_now(struct mntent *mp, unsigned long vfsflags, char *filtero
902+
update_mtab_entry_on_move(mp);
903+
else
904+
#endif
905+
+ {
906+
+ if (mp->mnt_opts[0] == '\0')
907+
+ {
908+
+ append_mount_options(&(mp->mnt_opts), "rw");
909+
+ }
910+
addmntent(mountTable, mp);
911+
+ }
912+
endmntent(mountTable);
913+
914+
if (ENABLE_FEATURE_CLEAN_UP) {
915+
@@ -818,6 +824,7 @@ static int mount_it_now(struct mntent *mp, unsigned long vfsflags, char *filtero
889916
return rc;
890917
}
891918

892919
+#if 0
893920
#if ENABLE_FEATURE_MOUNT_NFS
894921

895922
/*
896-
@@ -1912,6 +1913,8 @@ static int nfsmount(struct mntent *mp, unsigned long vfsflags, char *filteropts)
923+
@@ -1912,6 +1919,8 @@ static int nfsmount(struct mntent *mp, unsigned long vfsflags, char *filteropts)
897924

898925
#endif // !ENABLE_FEATURE_MOUNT_NFS
899926

@@ -902,27 +929,40 @@ index 4e65b6b46..08eff7a84 100644
902929
// Find "...,NAME=NUM,..." in the option string, remove "NAME=NUM" option
903930
// and return NUM.
904931
// Return 0 if not found.
905-
@@ -2089,6 +2092,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
932+
@@ -2089,6 +2098,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
906933
}
907934

908935
// Might this be an NFS filesystem?
909936
+#if 0
910937
if (!(vfsflags & (MS_BIND | MS_MOVE))
911938
&& (!mp->mnt_type || is_prefixed_with(mp->mnt_type, "nfs"))
912939
) {
913-
@@ -2102,6 +2106,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
940+
@@ -2102,6 +2112,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
914941
goto report_error;
915942
}
916943
}
917944
+#endif
918945

919946
// Look at the file. (Not found isn't a failure for remount, or for
920947
// a synthetic filesystem like proc or sysfs.)
921-
@@ -2151,6 +2156,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
948+
@@ -2151,6 +2162,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
922949
// If we know the fstype (or don't need to), jump straight
923950
// to the actual mount.
924951
if (mp->mnt_type || (vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))) {
925-
+
952+
+
926953
char *next;
927954
for (;;) {
928955
next = mp->mnt_type ? strchr(mp->mnt_type, ',') : NULL;
956+
diff --git a/util-linux/umount.c b/util-linux/umount.c
957+
index 23da32868..18d5dea67 100644
958+
--- a/util-linux/umount.c
959+
+++ b/util-linux/umount.c
960+
@@ -169,6 +169,8 @@ int umount_main(int argc UNUSED_PARAM, char **argv)
961+
argv++;
962+
path = xmalloc_realpath(zapit);
963+
if (path) {
964+
+ size_t length = strlen(path);
965+
+ path[length - 1] = '\0';
966+
for (m = mtl; m; m = m->next)
967+
if (strcmp(path, m->dir) == 0 || strcmp(path, m->device) == 0)
968+
break;

repo/packages/b/busybox/port/1.35.0/.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Automatically generated make config: don't edit
33
# Busybox version: 1.35.0
4-
# Wed Jun 7 23:22:30 2023
4+
# Thu Jun 15 19:49:52 2023
55
#
66
CONFIG_HAVE_DOT_CONFIG=y
77

@@ -709,7 +709,7 @@ CONFIG_UNSHARE=y
709709
#
710710
CONFIG_FEATURE_MOUNT_LOOP=y
711711
CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
712-
# CONFIG_FEATURE_MTAB_SUPPORT is not set
712+
CONFIG_FEATURE_MTAB_SUPPORT=y
713713
CONFIG_VOLUMEID=y
714714

715715
#

repo/packages/b/busybox/scripts/deploy.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2023-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file deploy.lua
1717
--
1818
-- Change Logs:

repo/packages/b/busybox/xmake.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2023-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file xmake.lua
1717
--
1818
-- Change Logs:
@@ -30,7 +30,7 @@ do
3030
add_versions("1.35.0", "faeeb244c35a348a334f4a59e44626ee870fb07b6884d68c10ae8bc19f83a694")
3131

3232
add_patches("1.35.0", path.join(os.scriptdir(), "patches", "1.35.0", "01_adapt_smart.diff"),
33-
"1bbfbe1c98f8693e10978fc4e7b350af444f59e5b5655bcc2ef753059ea77e54")
33+
"897875a5c8af75164d2e089e9f3869ad4ee0a329f7ee80b4a9752c88ba18c8cc")
3434

3535
on_install("cross@linux", function(package)
3636
import("rt.private.build.rtflags")

0 commit comments

Comments
 (0)