summaryrefslogtreecommitdiff
path: root/src/bios_reader
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-03 16:46:09 -0700
committerEric Anholt <eric@anholt.net>2007-08-06 14:34:58 -0700
commitba90d944329dd8c79a757c38128964fbbe4ab898 (patch)
tree2c3e5b71e1fd511a9304ae57b13d3de885c80cec /src/bios_reader
parent322a163cfbda885adc6bb09c1f976d36617ea83b (diff)
Add the file mode for bios_dumper output so it doesn't have 000 permissions.
Diffstat (limited to 'src/bios_reader')
-rw-r--r--src/bios_reader/bios_dumper.c3
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);