version 1.8, 2002/04/15 21:47:45 |
version 1.9, 2002/06/11 06:16:36 |
|
|
if (cp->u.fd == -1 && (cp->u.fd = open(cp->t, |
if (cp->u.fd == -1 && (cp->u.fd = open(cp->t, |
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, |
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, |
DEFFILEMODE)) == -1) |
DEFFILEMODE)) == -1) |
err(FATAL, "%s: %s\n", |
err(FATAL, "%s: %s", |
cp->t, strerror(errno)); |
cp->t, strerror(errno)); |
if (write(cp->u.fd, ps, psl) != psl) |
if (write(cp->u.fd, ps, psl) != psl) |
err(FATAL, "%s: %s\n", |
err(FATAL, "%s: %s", |
cp->t, strerror(errno)); |
cp->t, strerror(errno)); |
break; |
break; |
case 'x': |
case 'x': |
|
|
if (cp->u.s->wfile && !pd) { |
if (cp->u.s->wfile && !pd) { |
if (cp->u.s->wfd == -1 && (cp->u.s->wfd = open(cp->u.s->wfile, |
if (cp->u.s->wfd == -1 && (cp->u.s->wfd = open(cp->u.s->wfile, |
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, DEFFILEMODE)) == -1) |
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, DEFFILEMODE)) == -1) |
err(FATAL, "%s: %s\n", cp->u.s->wfile, strerror(errno)); |
err(FATAL, "%s: %s", cp->u.s->wfile, strerror(errno)); |
if (write(cp->u.s->wfd, ps, psl) != psl) |
if (write(cp->u.s->wfd, ps, psl) != psl) |
err(FATAL, "%s: %s\n", cp->u.s->wfile, strerror(errno)); |
err(FATAL, "%s: %s", cp->u.s->wfile, strerror(errno)); |
} |
} |
return (1); |
return (1); |
} |
} |