diff options
| author | Sheldon Hearn <sheldonh@FreeBSD.org> | 2001-07-26 11:02:39 +0000 |
|---|---|---|
| committer | Sheldon Hearn <sheldonh@FreeBSD.org> | 2001-07-26 11:02:39 +0000 |
| commit | e1b4d8d0746069292d84708b0e11b17a7e1ef5e0 (patch) | |
| tree | bd2ac2627dbeab7d3427432bb98d2c73085b61c1 /libexec | |
| parent | 8155f5e200803441caa6e1bba5d9fa1f836d232f (diff) | |
Notes
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/rexecd/rexecd.c | 6 | ||||
| -rw-r--r-- | libexec/rlogind/rlogind.c | 2 | ||||
| -rw-r--r-- | libexec/rtld-aout/rtld.c | 2 | ||||
| -rw-r--r-- | libexec/rtld-elf/debug.h | 2 | ||||
| -rw-r--r-- | libexec/rtld-elf/rtld.c | 2 | ||||
| -rw-r--r-- | libexec/uucpd/uucpd.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index f820b90396f5..57bb14c29438 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -237,7 +237,7 @@ doit(f, fromp) syslog(LOG_INFO, "login from %s as %s", remote, user); - (void) write(2, "\0", 1); + (void) write(STDERR_FILENO, "\0", 1); if (port) { (void) pipe(pv); pid = fork(); @@ -314,7 +314,7 @@ error(fmt, a1, a2, a3) buf[0] = 1; (void) snprintf(buf+1, sizeof(buf) - 1, fmt, a1, a2, a3); - (void) write(2, buf, strlen(buf)); + (void) write(STDERR_FILENO, buf, strlen(buf)); } void @@ -326,7 +326,7 @@ getstr(buf, cnt, err) char c; do { - if (read(0, &c, 1) != 1) + if (read(STDIN_FILENO, &c, 1) != 1) exit(1); *buf++ = c; if (--cnt == 0) { diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c index f1cea97cebe6..f0df9dfd099c 100644 --- a/libexec/rlogind/rlogind.c +++ b/libexec/rlogind/rlogind.c @@ -586,7 +586,7 @@ getstr(buf, cnt, errmsg) char c; do { - if (read(0, &c, 1) != 1) + if (read(STDIN_FILENO, &c, 1) != 1) exit(1); if (--cnt < 0) fatal(STDOUT_FILENO, errmsg, 0); diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c index 3a663195f372..7f0908b90258 100644 --- a/libexec/rtld-aout/rtld.c +++ b/libexec/rtld-aout/rtld.c @@ -2329,7 +2329,7 @@ char *fmt; #endif vsnprintf(buf, sizeof(buf), fmt, ap); - (void)write(1, buf, strlen(buf)); + (void)write(STDOUT_FILENO, buf, strlen(buf)); va_end(ap); } diff --git a/libexec/rtld-elf/debug.h b/libexec/rtld-elf/debug.h index 2600651997e8..04314a9cb591 100644 --- a/libexec/rtld-elf/debug.h +++ b/libexec/rtld-elf/debug.h @@ -53,7 +53,7 @@ extern int debug; #define assert(cond) ((cond) ? (void) 0 : \ (msg("ld-elf.so.1: assert failed: " __FILE__ ":" \ __XSTRING(__LINE__) "\n"), abort())) -#define msg(s) write(1, s, strlen(s)) +#define msg(s) write(STDOUT_FILENO, s, strlen(s)) #define trace() msg("ld-elf.so.1: " __XSTRING(__LINE__) "\n") #endif /* DEBUG_H */ diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 4e907f341592..3b67cb530d26 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2107,6 +2107,6 @@ xprintf(const char *fmt, ...) va_start(ap, fmt); vsprintf(buf, fmt, ap); - (void)write(1, buf, strlen(buf)); + (void)write(STDOUT_FILENO, buf, strlen(buf)); va_end(ap); } diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c index 7ca2b6758af9..062c4aeaf231 100644 --- a/libexec/uucpd/uucpd.c +++ b/libexec/uucpd/uucpd.c @@ -204,7 +204,7 @@ int readline(char start[], int num, int passw) register int n = num; while (n-- > 0) { - if (read(0, &c, 1) <= 0) + if (read(STDIN_FILENO, &c, 1) <= 0) return(-1); c &= 0177; if (c == '\n' || c == '\r' || c == '\0') { |
