summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-05-19 09:48:17 +0000
committerBernhard Reutner-Fischer2008-05-19 09:48:17 +0000
commit5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d (patch)
tree44b7cf5fb706b0816dd4525782ca8c37d07c2f43 /shell
parent636a1f85e89432601c59cdc3239fc867b4adf051 (diff)
downloadbusybox-5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d.zip
busybox-5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d.tar.gz
- use STD*_FILENO some more. No object-code changes
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c2
-rw-r--r--shell/msh.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c
index fa063bf..20b93f3 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -1258,7 +1258,7 @@ stunalloc(void *p)
{
#if DEBUG
if (!p || (g_stacknxt < (char *)p) || ((char *)p < g_stackp->space)) {
- write(2, "stunalloc\n", 10);
+ write(STDERR_FILENO, "stunalloc\n", 10);
abort();
}
#endif
diff --git a/shell/msh.c b/shell/msh.c
index 48fa56e..9e06a3b 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -743,7 +743,7 @@ static void print_tree(struct op *head)
static void prs(const char *s)
{
if (*s)
- write(2, s, strlen(s));
+ write(STDERR_FILENO, s, strlen(s));
}
static void prn(unsigned u)
@@ -3384,7 +3384,7 @@ static int doread(struct op *t ATTRIBUTE_UNUSED, char **args)
}
for (wp = args + 1; *wp; wp++) {
for (cp = global_env.linep; !nl && cp < elinep - 1; cp++) {
- nb = nonblock_safe_read(0, cp, sizeof(*cp));
+ nb = nonblock_safe_read(STDIN_FILENO, cp, sizeof(*cp));
if (nb != sizeof(*cp))
break;
nl = (*cp == '\n');
@@ -4522,7 +4522,7 @@ static int readc(void)
static void ioecho(char c)
{
if (FLAG['v'])
- write(2, &c, sizeof c);
+ write(STDERR_FILENO, &c, sizeof c);
}
static void pushio(struct ioarg *argp, int (*fn) (struct ioarg *))