New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpt-auto-generator: Ignore zero sized block devices #26904
Conversation
e.g usb connected card readers with no card in them
You have successfully added a new shellcheck configuration |
r = read_one_line_file(p, &s); | ||
if (r == 0 && !strcmp(s, "0")) { |
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.
read_one_line_file()
returns the number of characters read. If the file is empty, this will be 0. The conditional, as written, cannot be true.
Did this get tested at all?
i don't get this. we dissect the root disk from which the root fs is mounted. A zero-sized block device would not be backing your root fs, hence this PR looks wrong to me. What made you think this as anything to do with an usb card reader? Can you please provide logs of the issue you saw? |
I think I know how I got this wrong:
Sorry for the noise |
e.g usb connected card readers with no card in them
Otherwise I get a little bit of ugliness on startup here with Fedora 37 like: