aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/touch.c
diff options
context:
space:
mode:
authorJames Cook <falsifian@falsifian.org>2020-08-08 01:54:00 +0000
committerDan Cross <crossd@gmail.com>2020-08-08 12:11:37 -0400
commita1c4307800c7f1ef9c5d71ba4c6c3642837e2877 (patch)
treeb899f1fec7b0bf91a0564b4ff25ae17cafd3c3cd /src/cmd/touch.c
parentdd7c4e51044ce779cb695d6b52bbba0982a42e28 (diff)
downloadplan9port-a1c4307800c7f1ef9c5d71ba4c6c3642837e2877.tar.gz
plan9port-a1c4307800c7f1ef9c5d71ba4c6c3642837e2877.tar.bz2
plan9port-a1c4307800c7f1ef9c5d71ba4c6c3642837e2877.zip
touch: fix for OpenBSD.
This fixes https://github.com/9fans/plan9port/issues/436 This doesn't necessarily address the underlying issue: calling p9create with mode = OREAD should probably be allowed, but currently doesn't work on OpenBSD.
Diffstat (limited to 'src/cmd/touch.c')
-rw-r--r--src/cmd/touch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/touch.c b/src/cmd/touch.c
index 471e2b17..26141815 100644
--- a/src/cmd/touch.c
+++ b/src/cmd/touch.c
@@ -54,7 +54,7 @@ touch(int nocreate, char *name)
fprint(2, "touch: %s: cannot wstat: %r\n", name);
return 1;
}
- if((fd = create(name, OREAD, 0666)) < 0) {
+ if((fd = create(name, OWRITE, 0666)) < 0) {
fprint(2, "touch: %s: cannot create: %r\n", name);
return 1;
}