This doesn't really make any real difference, given the file should only
contain a single line. But it's conceptually more correct to just remove
the trailing newline/whitespace then the whole lines coming after that.
i.e. if the file actually contains more lines than one, this should
probably be considered an error.
if (r < 0)
return log_debug_errno(r, "Failed to read current uevent sequence number: %m");
- truncate_nl(p);
-
- r = safe_atou64(p, ret);
+ r = safe_atou64(strstrip(p), ret);
if (r < 0)
return log_debug_errno(r, "Failed to parse current uevent sequence number: %s", p);