summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch')
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch37
1 files changed, 37 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 0000000..9b467c3
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch
@@ -0,0 +1,37 @@
1From e4ffd6fe975888d306b5f700ba54af18b59f6759 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 20 Mar 2014 11:10:21 +0800
4Subject: [PATCH] misc/mke2fs.c: return error when failed to populate filesystem
5
6We need return retval when "mke2fs -d" failed, otherwise the "$?" would
7be 0 which is misleading.
8
9Upstream-Status Submitted
10
11Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
12---
13 misc/mke2fs.c | 7 ++++---
14 1 file changed, 4 insertions(+), 3 deletions(-)
15
16diff --git a/misc/mke2fs.c b/misc/mke2fs.c
17index a63f0b7..846190e 100644
18--- a/misc/mke2fs.c
19+++ b/misc/mke2fs.c
20@@ -2745,10 +2745,11 @@ no_journal:
21 current_fs = fs;
22 root = EXT2_ROOT_INO;
23 retval = populate_fs(root, root_dir);
24- if (retval)
25+ if (retval) {
26 fprintf(stderr, "%s",
27- _("\nError while populating file system"));
28- else if (!quiet)
29+ _("\nError while populating file system\n"));
30+ return retval;
31+ } else if (!quiet)
32 printf("%s", _("done\n"));
33 }
34
35--
361.8.3.1
37