diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-03 16:46:09 -0700 |
---|---|---|
committer | Kyle McMartin <kyle@phobos.i.cabal.ca> | 2007-08-14 01:20:48 -0400 |
commit | ab950611401575145fa01084a85d817ea13bb9cf (patch) | |
tree | e6397d9d10eabccf17c48de75b79cc3ff5cdfb97 | |
parent | a85dd7adc35601a988b1001e8b3c8aa4d53de0c0 (diff) |
Add the file mode for bios_dumper output so it doesn't have 000 permissions.
(cherry picked from commit ba90d944329dd8c79a757c38128964fbbe4ab898)
-rw-r--r-- | src/bios_reader/bios_dumper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bios_reader/bios_dumper.c b/src/bios_reader/bios_dumper.c index c0dbdcf8..6f163d56 100644 --- a/src/bios_reader/bios_dumper.c +++ b/src/bios_reader/bios_dumper.c @@ -29,6 +29,7 @@ #include <stdlib.h> #include <string.h> #include <stdarg.h> +#include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <pciaccess.h> @@ -80,7 +81,7 @@ int main(int argc, char **argv) exit(1); } - fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC); + fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, DEFFILEMODE); if (fd < 0) { fprintf(stderr, "Couldn't open output: %s\n", strerror(errno)); exit(1); |