[PATCH] palo/palo.c:482:5: /usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In file included from /usr/include/fcntl.h:296:0,
                 from palo.c:16:
In function 'open',
    inlined from 'do_formatted' at palo.c:482:5:
/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode'
declared with attribute error: open with O_CREAT in second argument
needs 3 arguments

Signed-off-by: Jeroen Roovers <jer@xxxxxxxxxx>

diff --git a/palo/palo.c b/palo/palo.c
index 10031fd..fffb7ec 100644
--- a/palo/palo.c
+++ b/palo/palo.c
@@ -484,7 +484,7 @@ do_formatted(int init, int media, const char *medianame, int partition,
            error(14, "bootloader");

        sprintf(badblockfilename, "/tmp/paloblk-%d", getpid());
-       if ((fd = open(badblockfilename, O_RDWR | O_CREAT | O_TRUNC)) < 0) {
+       if ((fd = open(badblockfilename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) < 0) {
            perror(badblockfilename);
            exit(1);
        }
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux