makefs: do not pass mode to open() call lacking O_CREAT

Obtained from:	OpenBSD ffs.c 1.35
This commit is contained in:
Ed Maste 2023-03-29 21:42:44 -04:00
parent cc4adc4c4e
commit 45e405603b

View File

@ -954,7 +954,7 @@ ffs_write_file(union dinode *din, uint32_t ino, void *buf, fsinfo_t *fsopts)
if (isfile) {
fbuf = emalloc(ffs_opts->bsize);
if ((ffd = open((char *)buf, O_RDONLY, 0444)) == -1) {
if ((ffd = open((char *)buf, O_RDONLY)) == -1) {
err(EXIT_FAILURE, "Can't open `%s' for reading", (char *)buf);
}
} else {