[oe-commits] org.oe.dev Unslung: Slingbox: df: fixed handling of root pseudo-devices for Unslung
mwester commit
openembedded-commits at lists.openembedded.org
Sat Nov 11 20:09:03 UTC 2006
Unslung: Slingbox: df: fixed handling of root pseudo-devices for Unslung
Author: mwester at openembedded.org
Branch: org.openembedded.dev
Revision: 08f4988586fde46fc34e278580fadd7263df7d53
ViewMTN: http://monotone.openembedded.org/revision.psp?id=08f4988586fde46fc34e278580fadd7263df7d53
Files:
1
packages/busybox/slingbox-1.2.2/df_rootfs.patch
packages/busybox/slingbox_1.2.2.bb
Diffs:
#
# mt diff -r2b62cff8be527c33d39658607e9a08a1cc0a8bf5 -r08f4988586fde46fc34e278580fadd7263df7d53
#
#
#
# add_file "packages/busybox/slingbox-1.2.2/df_rootfs.patch"
# content [35f3bded62c957802286c612217720b0f291f879]
#
# patch "packages/busybox/slingbox_1.2.2.bb"
# from [c4683018fd1b8861e32515075c54f544423daa9b]
# to [b83dc87da0c9b066d34397d730c433c98c881da5]
#
============================================================
--- packages/busybox/slingbox-1.2.2/df_rootfs.patch 35f3bded62c957802286c612217720b0f291f879
+++ packages/busybox/slingbox-1.2.2/df_rootfs.patch 35f3bded62c957802286c612217720b0f291f879
@@ -0,0 +1,34 @@
+--- busybox-1.2.2/coreutils/df.c.orig 2006-11-11 13:25:00.000000000 -0600
++++ busybox-1.2.2/coreutils/df.c 2006-11-11 13:23:15.000000000 -0600
+@@ -47,6 +47,7 @@
+ struct statfs s;
+ static const char hdr_1k[] = "1k-blocks"; /* default display is kilobytes */
+ const char *disp_units_hdr = hdr_1k;
++ int root_done = 0;
+
+ #ifdef CONFIG_FEATURE_HUMAN_READABLE
+ bb_opt_complementally = "h-km:k-hm:m-hk";
+@@ -112,16 +113,19 @@
+ ) / (blocks_used + s.f_bavail);
+ }
+
+- if (strcmp(device, "rootfs") == 0) {
+- continue;
+- } else if (strcmp(device, "/dev/root") == 0) {
++ if (strcmp(device, "/dev/root") == 0 || strcmp(device, "rootfs") == 0) {
+ /* Adjusts device to be the real root device,
+ * or leaves device alone if it can't find it */
+- if ((device = find_block_device("/")) == NULL) {
++ if ((device = find_block_device(mount_point)) == NULL) {
+ goto SET_ERROR;
+ }
+ }
+
++ if (strcmp(mount_point, "/") == 0) {
++ if (root_done) continue;
++ root_done = 1;
++ }
++
+ #ifdef CONFIG_FEATURE_HUMAN_READABLE
+ bb_printf("%-20s %9s ", device,
+ make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr));
============================================================
--- packages/busybox/slingbox_1.2.2.bb c4683018fd1b8861e32515075c54f544423daa9b
+++ packages/busybox/slingbox_1.2.2.bb b83dc87da0c9b066d34397d730c433c98c881da5
@@ -1,15 +1,16 @@ PRIORITY = "required"
DESCRIPTION = "SlingBox is a minimal version of BusyBox with just enough functionality \
to enable ipkg to run on an Unslung NSLU2 device."
HOMEPAGE = "http://www.busybox.net"
LICENSE = "GPL"
SECTION = "base"
PRIORITY = "required"
-PR = "r2"
+PR = "r3"
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
file://defconfig \
file://wget-long-options.patch;patch=1 \
file://lazy_umount.patch;patch=1 \
+ file://df_rootfs.patch;patch=1 \
file://slingbox_name.patch;patch=1 \
file://halt.patch;patch=1" \
file://slingbox.patch;patch=1"
More information about the Openembedded-commits
mailing list