summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/e2fsprogs
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-03-20 14:08:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-21 12:05:29 +0000
commit46896b601c1c93e276954b674aa30b8b4dc4f611 (patch)
tree9bf633625ea2f263ddce5a9a92d1630333903a2c /meta/recipes-devtools/e2fsprogs
parentbaada8ef412478450fa0ab234b1a3151bdfe7ac4 (diff)
downloadopenembedded-core-46896b601c1c93e276954b674aa30b8b4dc4f611.tar.gz
openembedded-core-46896b601c1c93e276954b674aa30b8b4dc4f611.tar.bz2
openembedded-core-46896b601c1c93e276954b674aa30b8b4dc4f611.zip
e2fsprogs: return error when failed to populate fs
We need return retval when "mke2fs -d" failed, otherwise the "$?" would be 0 which is misleading. [YOCTO #6011] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs')
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch37
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch
new file mode 100644
index 0000000000..9b467c338c
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch
@@ -0,0 +1,37 @@
+From e4ffd6fe975888d306b5f700ba54af18b59f6759 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 20 Mar 2014 11:10:21 +0800
+Subject: [PATCH] misc/mke2fs.c: return error when failed to populate filesystem
+
+We need return retval when "mke2fs -d" failed, otherwise the "$?" would
+be 0 which is misleading.
+
+Upstream-Status Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ misc/mke2fs.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/misc/mke2fs.c b/misc/mke2fs.c
+index a63f0b7..846190e 100644
+--- a/misc/mke2fs.c
++++ b/misc/mke2fs.c
+@@ -2745,10 +2745,11 @@ no_journal:
+ current_fs = fs;
+ root = EXT2_ROOT_INO;
+ retval = populate_fs(root, root_dir);
+- if (retval)
++ if (retval) {
+ fprintf(stderr, "%s",
+- _("\nError while populating file system"));
+- else if (!quiet)
++ _("\nError while populating file system\n"));
++ return retval;
++ } else if (!quiet)
+ printf("%s", _("done\n"));
+ }
+
+--
+1.8.3.1
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index 4114fd21bc..75a58b5d45 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -17,6 +17,7 @@ SRC_URI += "file://acinclude.m4 \
file://0010-debugfs-use-the-functions-in-misc-create_inode.c.patch \
file://0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch \
file://0001-e2fsprogs-fix-cross-compilation-problem.patch \
+ file://misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch \
"
SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7"