[packages/systemd] adjust target-pld.patch for new parse_env_file() interface
atler
atler at pld-linux.org
Mon Mar 4 02:14:45 CET 2019
commit 057a68c81424d1ac3a38c342e0fcf52d07b5af19
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Mar 4 02:13:57 2019 +0100
adjust target-pld.patch for new parse_env_file() interface
target-pld.patch | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/target-pld.patch b/target-pld.patch
index af7f8f3..c9e4388 100644
--- a/target-pld.patch
+++ b/target-pld.patch
@@ -25,10 +25,10 @@
+int read_etc_hostname_distro(const char *path, char **ret) {
+ int r;
+ char *p = NULL;
-+ r = parse_env_file(NULL, "/etc/sysconfig/network", NEWLINE, "HOSTNAME", &p, NULL);
++ r = parse_env_file(NULL, "/etc/sysconfig/network", "HOSTNAME", &p);
+ if (r < 0)
+ return r;
-+ if (r == 0) /* EOF without any hostname? the file is empty, let's treat that exactly like no file at all: ENOENT */
++ if (!p)
+ return -ENOENT;
+ hostname_cleanup(p);
+ if (!hostname_is_valid(p, true))
@@ -68,9 +68,9 @@
}
+ if (r <= 0 &&
-+ (r = parse_env_file(NULL, "/etc/sysconfig/i18n", NEWLINE,
-+ "LANG", &variables[VARIABLE_LANG],
-+ NULL)) < 0) {
++ (r = parse_env_file(NULL, "/etc/sysconfig/i18n",
++ "LANG", &variables[VARIABLE_LANG]
++ )) < 0) {
+
+ if (r != -ENOENT)
+ log_warning_errno(r, "Failed to read /etc/sysconfig/i18n: %m");
@@ -96,9 +96,9 @@
- if (!e)
- return -EINVAL;
+ if (!e) {
-+ r = parse_env_file(NULL, "/etc/sysconfig/timezone", NEWLINE,
-+ "TIMEZONE", &e,
-+ NULL);
++ r = parse_env_file(NULL, "/etc/sysconfig/timezone"
++ "TIMEZONE", &e
++ );
+ if (r < 0) {
+ if (r != -ENOENT)
+ log_warning_errno(r, "Failed to read /etc/sysconfig/timezone: %m");
@@ -114,13 +114,13 @@
if (r < 0 && r != -ENOENT)
log_warning_errno(r, "Failed to read /etc/vconsole.conf: %m");
-+ if (r <= 0) {
-+ int r1 = parse_env_file(NULL, "/etc/sysconfig/console", NEWLINE,
++ if (r < 0) {
++ int r1 = parse_env_file(NULL, "/etc/sysconfig/console"
+ "CONSOLEFONT", &vc_font,
+ "CONSOLEMAP", &vc_font_map,
+ "CONSOLESCREENFONTMAP", &vc_font_unimap,
-+ "KEYTABLE", &vc_keymap,
-+ NULL);
++ "KEYTABLE", &vc_keymap
++ );
+ if (r1 < 0 && r1 != -ENOENT)
+ log_warning_errno(r1, "Failed to read /etc/sysconfig/console: %m");
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/057a68c81424d1ac3a38c342e0fcf52d07b5af19
More information about the pld-cvs-commit
mailing list