projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e85b07
)
udev-rules: do not ignore short lines
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Thu, 21 Feb 2019 08:29:29 +0000
(17:29 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Thu, 21 Feb 2019 21:50:12 +0000
(06:50 +0900)
Otherwise, a short line continues the previous continuation.
This fixes a bug introduced by
f10aa08e3e48de7dcb71be348f021c6b1385304f
.
src/udev/udev-rules.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-rules.c
b/src/udev/udev-rules.c
index
e34ecc6
..
178a419
100644
(file)
--- a/
src/udev/udev-rules.c
+++ b/
src/udev/udev-rules.c
@@
-1496,8
+1496,6
@@
static int parse_file(UdevRules *rules, const char *filename) {
continue;
len = strlen(line);
- if (len < 3)
- continue;
if (continuation && !ignore_line) {
if (strlen(continuation) + len >= UTIL_LINE_SIZE)
@@
-1512,7
+1510,7
@@
static int parse_file(UdevRules *rules, const char *filename) {
}
}
- if (line[len - 1] == '\\') {
+ if (l
en > 0 && l
ine[len - 1] == '\\') {
if (ignore_line)
continue;
@@
-1528,7
+1526,7
@@
static int parse_file(UdevRules *rules, const char *filename) {
if (ignore_line)
log_error("Line too long '%s':%u, ignored", filename, line_nr);
- else
+ else
if (len > 0)
add_rule(rules, line, filename, filename_off, line_nr);
continuation = mfree(continuation);