[systemd-commits] 2 commits - fixme src/locale-setup.c src/modules-load.c src/vconsole-setup.c
Kay Sievers
kay at kemper.freedesktop.org
Tue Sep 28 02:52:35 PDT 2010
fixme | 2 --
src/locale-setup.c | 6 +++---
src/modules-load.c | 4 ++--
src/vconsole-setup.c | 10 +++++-----
4 files changed, 10 insertions(+), 12 deletions(-)
New commits:
commit fd5bf055acae23a5ff0fcce8425675703f7bf5e0
Author: Kay Sievers <kay.sievers at vrfy.org>
Date: Tue Sep 28 11:51:24 2010 +0200
use .conf for new config files: locale, vconsole, modules.d
diff --git a/fixme b/fixme
index f66f07a..9e283f5 100644
--- a/fixme
+++ b/fixme
@@ -99,8 +99,6 @@
* s/tempfiles/volatile-files/
-* use .conf suffix for locale/vconsole/...
-
External:
* place /etc/inittab with explaining blurb.
diff --git a/src/locale-setup.c b/src/locale-setup.c
index 78fa212..ffb4ee9 100644
--- a/src/locale-setup.c
+++ b/src/locale-setup.c
@@ -93,9 +93,9 @@ int locale_setup(void) {
}
/* Hmm, nothing set on the kernel cmd line? Then let's
- * try /etc/locale */
+ * try /etc/locale.conf */
if (r <= 0 &&
- (r = parse_env_file("/etc/locale", NEWLINE,
+ (r = parse_env_file("/etc/locale.conf", NEWLINE,
"LANG", &variables[VARIABLE_LANG],
"LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
"LC_NUMERIC", &variables[VARIABLE_LC_NUMERIC],
@@ -112,7 +112,7 @@ int locale_setup(void) {
NULL)) < 0) {
if (r != -ENOENT)
- log_warning("Failed to read /etc/locale: %s", strerror(-r));
+ log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
}
#ifdef TARGET_FEDORA
diff --git a/src/modules-load.c b/src/modules-load.c
index bfe5b8a..56f2a90 100644
--- a/src/modules-load.c
+++ b/src/modules-load.c
@@ -31,7 +31,7 @@
#include "util.h"
#include "strv.h"
-/* This reads all module names listed in /etc/modules.d/?*.modules and
+/* This reads all module names listed in /etc/modules.d/?*.conf and
* loads them into the kernel. This follows roughly Debian's way to
* handle modules, but uses a directory of fragments instead of a
* single /etc/modules file. */
@@ -46,7 +46,7 @@ static int scandir_filter(const struct dirent *d) {
d->d_type != DT_LNK)
return 0;
- return endswith(d->d_name, ".modules");
+ return endswith(d->d_name, ".conf");
}
int main(int argc, char *argv[]) {
diff --git a/src/vconsole-setup.c b/src/vconsole-setup.c
index 047a153..9e5d65d 100644
--- a/src/vconsole-setup.c
+++ b/src/vconsole-setup.c
@@ -186,9 +186,9 @@ int main(int argc, char **argv) {
}
/* Hmm, nothing set on the kernel cmd line? Then let's
- * try /etc/vconsole */
+ * try /etc/vconsole.conf */
if (r <= 0 &&
- (r = parse_env_file("/etc/vconsole", NEWLINE,
+ (r = parse_env_file("/etc/vconsole.conf", NEWLINE,
"KEYMAP", &vc_keymap,
"FONT", &vc_font,
"FONT_MAP", &vc_font_map,
@@ -196,7 +196,7 @@ int main(int argc, char **argv) {
NULL)) < 0) {
if (r != -ENOENT)
- log_warning("Failed to read /etc/vconsole: %s", strerror(-r));
+ log_warning("Failed to read /etc/vconsole.conf: %s", strerror(-r));
}
if (r <= 0) {
commit 915d22e4f09e8f6d7fb2e7a7456f8b5908bd7f98
Author: Kay Sievers <kay.sievers at vrfy.org>
Date: Tue Sep 28 11:49:47 2010 +0200
vconsole-setup: ignore empty strings like FOO="", imported from config files
diff --git a/src/vconsole-setup.c b/src/vconsole-setup.c
index 0fd426c..047a153 100644
--- a/src/vconsole-setup.c
+++ b/src/vconsole-setup.c
@@ -113,11 +113,11 @@ static int load_font(const char *vc, const char *font, const char *map, const ch
args[i++] = "-C";
args[i++] = vc;
args[i++] = font;
- if (map) {
+ if (map && map[0] != '\0') {
args[i++] = "-m";
args[i++] = map;
}
- if (unimap) {
+ if (unimap && unimap[0] != '\0') {
args[i++] = "-u";
args[i++] = unimap;
}
More information about the systemd-commits
mailing list