version 1.70, 2001/05/08 19:45:24 |
version 1.71, 2001/05/19 16:05:41 |
|
|
} |
} |
omode = mode; |
omode = mode; |
mode |= S_IWRITE; |
mode |= S_IWRITE; |
if ((ofd = open(np, O_WRONLY | O_CREAT | O_TRUNC, mode)) < 0) { |
if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { |
bad: run_err("%s: %s", np, strerror(errno)); |
bad: run_err("%s: %s", np, strerror(errno)); |
continue; |
continue; |
} |
} |
|
|
wrerr = YES; |
wrerr = YES; |
wrerrno = j >= 0 ? EIO : errno; |
wrerrno = j >= 0 ? EIO : errno; |
} |
} |
#if 0 |
|
if (ftruncate(ofd, size)) { |
if (ftruncate(ofd, size)) { |
run_err("%s: truncate: %s", np, strerror(errno)); |
run_err("%s: truncate: %s", np, strerror(errno)); |
wrerr = DISPLAYED; |
wrerr = DISPLAYED; |
} |
} |
#endif |
|
if (pflag) { |
if (pflag) { |
if (exists || omode != mode) |
if (exists || omode != mode) |
if (fchmod(ofd, omode)) |
if (fchmod(ofd, omode)) |