From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/5] hush: Add magicvars
Date: Sun, 27 Nov 2011 13:09:39 +0100 [thread overview]
Message-ID: <1322395780-21916-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1322395780-21916-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/hush.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/common/hush.c b/common/hush.c
index 573bd3e..c70c274 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -122,6 +122,7 @@
#include <glob.h>
#include <getopt.h>
#include <libbb.h>
+#include <magicvar.h>
#include <linux/list.h>
/*cmd_boot.c*/
@@ -540,6 +541,8 @@ static int builtin_getopt(struct p_context *ctx, struct child_prog *child)
return 0;
}
+
+BAREBOX_MAGIC_VAR(OPTARG, "optarg for hush builtin getopt");
#endif
/* run_pipe_real() starts all the jobs, but doesn't wait for anything
@@ -1721,6 +1724,11 @@ BAREBOX_CMD_START(getopt)
BAREBOX_CMD_END
#endif
+BAREBOX_MAGIC_VAR(PATH, "colon seperated list of pathes to search for executables");
+#ifdef CONFIG_HUSH_FANCY_PROMPT
+BAREBOX_MAGIC_VAR(PS1, "hush prompt");
+#endif
+
/**
* @file
* @brief A prototype Bourne shell grammar parser
--
1.7.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-11-27 12:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-27 12:09 [PATCH] magic variables Sascha Hauer
2011-11-27 12:09 ` [PATCH 1/5] add magicvar command Sascha Hauer
2011-11-27 12:09 ` [PATCH 2/5] bootm: Add bootargs magicvar Sascha Hauer
2011-11-27 12:09 ` [PATCH 3/5] ARM i.MX boot: Add barebox_loc magicvar Sascha Hauer
2011-11-27 12:09 ` Sascha Hauer [this message]
2011-11-27 12:09 ` [PATCH 5/5] dhcp: Add magicvars Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322395780-21916-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox