mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 22:21:45 +00:00
udev: rules - ignore the lack of trailing newline
Also accept '\r' as newline character.
This dropps warnings of the type:
invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
on line 26, starting at character 25 ('')
This commit is contained in:
@@ -1067,7 +1067,7 @@ static int add_rule(struct udev_rules *rules, char *line,
|
||||
|
||||
/* If we aren't at the end of the line, this is a parsing error.
|
||||
* Make a best effort to describe where the problem is. */
|
||||
if (*linepos != '\n') {
|
||||
if (!strchr(NEWLINE "\0", *linepos)) {
|
||||
char buf[2] = {*linepos};
|
||||
_cleanup_free_ char *tmp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user