Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
guess/touchscreen: Check that the string read from sysfs is not empty
Signed-off-by: Alexey Gladkov <[email protected]>
- Loading branch information
7b1f1a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@legionus, is it possible?
7b1f1a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sysfs is not a real filesystem and there can be weirdness in it. The
readline()
function appeared because in some version of the kernel there was a line in modalias without a newline. Now I faced[1] another strange situation where the raid uuid was empty, which I have never seen before. So I decided to reassure myself and add checks in case a similar problem occurs in other places reading from sysfs.[1] https://bugzilla.altlinux.org/51073