!459 修复conf_parser函数中错误信息中显示的行号错误问题
From: @huyubiao Reviewed-by: @licunlong Signed-off-by: @licunlong
This commit is contained in:
commit
4a199ab49b
39
backport-conf-parser-fix-line-number-in-error-message.patch
Normal file
39
backport-conf-parser-fix-line-number-in-error-message.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 68c1ac1568910037a224c301d5c871af73493c16 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||||
|
Date: Fri, 28 Feb 2020 02:37:11 +0900
|
||||||
|
Subject: [PATCH] conf-parser: fix line number in error message
|
||||||
|
|
||||||
|
Fixes #14929.
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://github.com/systemd/systemd/commit/68c1ac1568910037a224c301d5c871af73493c16
|
||||||
|
|
||||||
|
---
|
||||||
|
src/shared/conf-parser.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
|
||||||
|
index 318588cc1f..657df0a517 100644
|
||||||
|
--- a/src/shared/conf-parser.c
|
||||||
|
+++ b/src/shared/conf-parser.c
|
||||||
|
@@ -334,6 +334,8 @@ int config_parse(const char *unit,
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ line++;
|
||||||
|
+
|
||||||
|
l = skip_leading_chars(buf, WHITESPACE);
|
||||||
|
if (*l != '\0' && strchr(COMMENTS, *l))
|
||||||
|
continue;
|
||||||
|
@@ -390,7 +392,7 @@ int config_parse(const char *unit,
|
||||||
|
|
||||||
|
r = parse_line(unit,
|
||||||
|
filename,
|
||||||
|
- ++line,
|
||||||
|
+ line,
|
||||||
|
sections,
|
||||||
|
lookup,
|
||||||
|
table,
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
Name: systemd
|
Name: systemd
|
||||||
Url: https://www.freedesktop.org/wiki/Software/systemd
|
Url: https://www.freedesktop.org/wiki/Software/systemd
|
||||||
Version: 243
|
Version: 243
|
||||||
Release: 62
|
Release: 63
|
||||||
License: MIT and LGPLv2+ and GPLv2+
|
License: MIT and LGPLv2+ and GPLv2+
|
||||||
Summary: System and Service Manager
|
Summary: System and Service Manager
|
||||||
|
|
||||||
@ -212,6 +212,7 @@ Patch0164: backport-argv-util-also-update-program_invocation_short_name.pat
|
|||||||
Patch0165: backport-pid1-fix-segv-triggered-by-status-query.patch
|
Patch0165: backport-pid1-fix-segv-triggered-by-status-query.patch
|
||||||
Patch0166: backport-main-log-which-process-send-SIGNAL-to-PID1.patch
|
Patch0166: backport-main-log-which-process-send-SIGNAL-to-PID1.patch
|
||||||
Patch0167: backport-main-drop-get_process_cmdline-from-crash-handler.patch
|
Patch0167: backport-main-drop-get_process_cmdline-from-crash-handler.patch
|
||||||
|
Patch0168: backport-conf-parser-fix-line-number-in-error-message.patch
|
||||||
|
|
||||||
#openEuler
|
#openEuler
|
||||||
Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch
|
Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch
|
||||||
@ -1619,6 +1620,9 @@ fi
|
|||||||
%exclude /usr/share/man/man3/*
|
%exclude /usr/share/man/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 5 2023 huyubiao <huyubiao@huawei.com> - 243-63
|
||||||
|
- sync community patches: fix line number in conf_parser error message
|
||||||
|
|
||||||
* Sun Apr 23 2023 hongjinghao <hongjinghao@huawei.com> - 243-62
|
* Sun Apr 23 2023 hongjinghao <hongjinghao@huawei.com> - 243-62
|
||||||
- sync community patches
|
- sync community patches
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user