chiark / gitweb /
udev: rules - print the first invalid character
authorTom Gundersen <teg@jklm.no>
Fri, 28 Nov 2014 20:46:34 +0000 (21:46 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 28 Nov 2014 20:54:24 +0000 (21:54 +0100)
The current code would print the character following the first invalid
character.

Given an udev rules-file without a trailing newline we would otherwise print
garbage:

  invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
  on line 26, starting at character 25 ('m')

This is now changed to print

  invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
  on line 26, starting at character 25 ('')

(still not very good as printing \0 just gives the empty string)


No differences found