summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Westerhof <mwester@dls.net>2006-11-11 19:55:43 +0000
committerMike Westerhof <mwester@dls.net>2006-11-11 19:55:43 +0000
commit0c2df02716f3ac58962352d64cd19c4732d000d8 (patch)
treea9202936acdd764474afb48528f42f4093084dc7
parentc1a8bd1100953486dcc6b1224bcaa051a90e90bf (diff)
Unslung: Slingbox: df: fixed handling of root pseudo-devices for Unslung
-rw-r--r--packages/busybox/slingbox-1.2.2/df_rootfs.patch34
-rw-r--r--packages/busybox/slingbox_1.2.2.bb3
2 files changed, 36 insertions, 1 deletions
diff --git a/packages/busybox/slingbox-1.2.2/df_rootfs.patch b/packages/busybox/slingbox-1.2.2/df_rootfs.patch
new file mode 100644
index 0000000000..fa7e61af15
--- /dev/null
+++ b/packages/busybox/slingbox-1.2.2/df_rootfs.patch
@@ -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));
diff --git a/packages/busybox/slingbox_1.2.2.bb b/packages/busybox/slingbox_1.2.2.bb
index 2468680ba1..56d75f943e 100644
--- a/packages/busybox/slingbox_1.2.2.bb
+++ b/packages/busybox/slingbox_1.2.2.bb
@@ -4,12 +4,13 @@ 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"