summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/lpd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/lpr/lpd')
-rw-r--r--usr.sbin/lpr/lpd/lpd.c2
-rw-r--r--usr.sbin/lpr/lpd/recvjob.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index b48cf25..542ef3c 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -459,7 +459,7 @@ doit(void)
do {
if (cp >= &cbuf[sizeof(cbuf) - 1])
fatal(0, "Command line too long");
- if ((n = read(1, cp, 1)) != 1) {
+ if ((n = read(STDOUT_FILENO, cp, 1)) != 1) {
if (n < 0)
fatal(0, "Lost connection");
return;
diff --git a/usr.sbin/lpr/lpd/recvjob.c b/usr.sbin/lpr/lpd/recvjob.c
index 4d291c2..d473680 100644
--- a/usr.sbin/lpr/lpd/recvjob.c
+++ b/usr.sbin/lpr/lpd/recvjob.c
@@ -69,7 +69,7 @@ static const char rcsid[] =
#include "extern.h"
#include "pathnames.h"
-#define ack() (void) write(1, sp, 1);
+#define ack() (void) write(STDOUT_FILENO, sp, 1);
static char dfname[NAME_MAX]; /* data files */
static int minfree; /* keep at least minfree blocks available */
@@ -158,7 +158,7 @@ readjob(struct printer *pp)
*/
cp = line;
do {
- if ((size = read(1, cp, 1)) != 1) {
+ if ((size = read(STDOUT_FILENO, cp, 1)) != 1) {
if (size < 0) {
frecverr("%s: lost connection",
pp->printer);
@@ -201,7 +201,7 @@ readjob(struct printer *pp)
frecverr("readjob: %s: illegal path name",
tfname);
if (!chksize(size)) {
- (void) write(1, "\2", 1);
+ (void) write(STDOUT_FILENO, "\2", 1);
continue;
}
if (!readfile(pp, tfname, size)) {
@@ -226,7 +226,7 @@ readjob(struct printer *pp)
if (*cp++ != ' ')
break;
if (!chksize(size)) {
- (void) write(1, "\2", 1);
+ (void) write(STDOUT_FILENO, "\2", 1);
continue;
}
(void) strncpy(dfname, cp, sizeof(dfname) - 1);
@@ -273,7 +273,7 @@ readfile(struct printer *pp, char *file, int size)
if (i + amt > size)
amt = size - i;
do {
- j = read(1, cp, amt);
+ j = read(STDOUT_FILENO, cp, amt);
if (j <= 0) {
frecverr("%s: lost connection", pp->printer);
/*NOTREACHED*/
@@ -308,7 +308,7 @@ noresponse(void)
{
char resp;
- if (read(1, &resp, 1) != 1) {
+ if (read(STDOUT_FILENO, &resp, 1) != 1) {
frecverr("lost connection in noresponse()");
/*NOTREACHED*/
}
OpenPOWER on IntegriCloud