Bug 67508

Summary: udev does not report errors properly when values are not quoted
Product: systemd Reporter: Michał Górny <mgorny>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Michał Górny 2013-07-29 22:15:16 UTC
For example, consider the following rule file:

  KERNEL=="foo*", ATTR{bar}=1

The missing quoting around '1' results in udev silently ignoring the rule and not reporting a single error. It should verbosely report a broken line instead.

falconindy nailed it down:

00:11:02       <falconindy> ah, think i found it...
00:11:26       <falconindy> mgorny:
00:11:26 http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-rules.c#n826
00:11:40       <falconindy> if not quoted, return -1. dun.
00:13:20       <falconindy> add_rule just needs to log the error on return from get_key
Comment 1 Dave Reisner 2013-07-30 01:56:37 UTC
This should be improved by http://cgit.freedesktop.org/systemd/systemd/commit/?id=e736cf3582c03273f9. At least now you'll get an error in the journal about the unparseable rule and it's starting location.
Comment 2 Zbigniew Jedrzejewski-Szmek 2013-07-30 11:40:22 UTC
Marking as resolved, because the error is now reported as requested. If something more is needed, we can reopen.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.