summaryrefslogtreecommitdiff
path: root/src/udev/keymap/keymap.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-05 17:33:24 +0200
committerKay Sievers <kay@vrfy.org>2012-07-05 17:33:24 +0200
commit47ef94ac5f39db6c5c18be10afe32397a0a8d5cc (patch)
tree2a6872d28ae5d6c7f4b7a73a9765dccace762e03 /src/udev/keymap/keymap.c
parentdaa9cf546ce7265645ced9592dd54c6b2fc04302 (diff)
udev: add some O_CLOEXEC
Diffstat (limited to 'src/udev/keymap/keymap.c')
-rw-r--r--src/udev/keymap/keymap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/keymap/keymap.c b/src/udev/keymap/keymap.c
index a2e43f92c0..051aa42552 100644
--- a/src/udev/keymap/keymap.c
+++ b/src/udev/keymap/keymap.c
@@ -410,7 +410,7 @@ int main(int argc, char **argv)
const char *filearg = argv[optind+1];
if (strchr(filearg, '/')) {
/* Keymap file argument is a path */
- FILE *f = fopen(filearg, "r");
+ FILE *f = fopen(filearg, "re");
if (f)
merge_table(fd, f);
else
@@ -421,12 +421,12 @@ int main(int argc, char **argv)
char keymap_path[PATH_MAX];
FILE *f;
snprintf(keymap_path, sizeof(keymap_path), "%s%s", SYSCONFDIR "/udev/keymaps/", filearg);
- f = fopen(keymap_path, "r");
+ f = fopen(keymap_path, "re");
if (f) {
merge_table(fd, f);
} else {
snprintf(keymap_path, sizeof(keymap_path), "%s%s", UDEVLIBEXECDIR "/keymaps/", filearg);
- f = fopen(keymap_path, "r");
+ f = fopen(keymap_path, "re");
if (f)
merge_table(fd, f);
else