summaryrefslogtreecommitdiff
path: root/recipes/busybox/slingbox-1.3.1/df_rootfs.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/busybox/slingbox-1.3.1/df_rootfs.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/busybox/slingbox-1.3.1/df_rootfs.patch')
-rw-r--r--recipes/busybox/slingbox-1.3.1/df_rootfs.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes/busybox/slingbox-1.3.1/df_rootfs.patch b/recipes/busybox/slingbox-1.3.1/df_rootfs.patch
new file mode 100644
index 0000000000..3819b59106
--- /dev/null
+++ b/recipes/busybox/slingbox-1.3.1/df_rootfs.patch
@@ -0,0 +1,44 @@
+--- busybox-1.3.1.orig/coreutils/df.c 2006-12-26 22:54:50.000000000 -0600
++++ busybox-1.3.1/coreutils/df.c 2006-12-30 00:45:10.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
+ opt_complementary = "h-km:k-hm:m-hk";
+@@ -77,7 +78,7 @@
+
+ do {
+ const char *device;
+- const char *mount_point;
++ char *mount_point;
+
+ if (mount_table) {
+ mount_entry = getmntent(mount_table);
+@@ -116,17 +117,20 @@
+ ) / (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 */
+- device = find_block_device("/");
++ device = find_block_device(mount_point);
+ if (!device) {
+ goto SET_ERROR;
+ }
+ }
+
++ if (strcmp(mount_point, "/") == 0) {
++ if (root_done) continue;
++ root_done = 1;
++ }
++
+ #ifdef CONFIG_FEATURE_HUMAN_READABLE
+ printf("%-20s %9s ", device,
+ make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr));