* small fixes
@ 2011-11-11 15:21 Sascha Hauer
2011-11-11 15:21 ` [PATCH 1/2] mkdir command: do not fail with -p and directory already exists Sascha Hauer
2011-11-11 15:21 ` [PATCH 2/2] export: do not fail on already exported variable Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2011-11-11 15:21 UTC (permalink / raw)
To: barebox
Sascha Hauer (2):
mkdir command: do not fail with -p and directory already exists
export: do not fail on already exported variable
commands/mkdir.c | 7 +++++--
common/env.c | 3 +--
2 files changed, 6 insertions(+), 4 deletions(-)
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] mkdir command: do not fail with -p and directory already exists
2011-11-11 15:21 small fixes Sascha Hauer
@ 2011-11-11 15:21 ` Sascha Hauer
2011-11-11 15:21 ` [PATCH 2/2] export: do not fail on already exported variable Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2011-11-11 15:21 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/mkdir.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/commands/mkdir.c b/commands/mkdir.c
index b66795b..45e7408 100644
--- a/commands/mkdir.c
+++ b/commands/mkdir.c
@@ -45,10 +45,13 @@ static int do_mkdir(struct command *cmdtp, int argc, char *argv[])
return COMMAND_ERROR_USAGE;
while (optind < argc) {
- if (parent)
+ if (parent) {
ret = make_directory(argv[optind]);
- else
+ if (ret == -EEXIST)
+ ret = 0;
+ } else {
ret = mkdir(argv[optind], 0);
+ }
if (ret) {
printf("could not create %s: %s\n", argv[optind], errno_str());
return 1;
--
1.7.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] export: do not fail on already exported variable
2011-11-11 15:21 small fixes Sascha Hauer
2011-11-11 15:21 ` [PATCH 1/2] mkdir command: do not fail with -p and directory already exists Sascha Hauer
@ 2011-11-11 15:21 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2011-11-11 15:21 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/env.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/common/env.c b/common/env.c
index defb26b..05ed714 100644
--- a/common/env.c
+++ b/common/env.c
@@ -247,8 +247,7 @@ int export(const char *varname)
if (val) {
setenv_raw(context->global, varname, val);
setenv_raw(context->local, varname, NULL);
- return 0;
}
- return -1;
+ return 0;
}
EXPORT_SYMBOL(export);
--
1.7.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-11 15:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-11 15:21 small fixes Sascha Hauer
2011-11-11 15:21 ` [PATCH 1/2] mkdir command: do not fail with -p and directory already exists Sascha Hauer
2011-11-11 15:21 ` [PATCH 2/2] export: do not fail on already exported variable Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox