Skip to content
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

fsck output string truncation too short #260

Closed
hongkongkiwi opened this issue May 6, 2022 · 1 comment
Closed

fsck output string truncation too short #260

hongkongkiwi opened this issue May 6, 2022 · 1 comment
Assignees
Milestone

Comments

@hongkongkiwi
Copy link
Contributor

hongkongkiwi commented May 6, 2022

I noticed that my startup logs look like this:

[ OK ] Checking filesystem /dev/mmcblk0p
[ OK ] Checking filesystem /dev/mmcblk0p
[ OK ] Checking filesystem /dev/mmcblk0p
[ OK ] Checking filesystem /dev/mmcblk0p
[ OK ] Checking filesystem /dev/mmcblk0p

After investigation I found that there is a hardcoded size for an output string here:

fsck_rc = run_interactive(cmd, "Checking filesystem %.13s", dev);

So this assumes that the string is not more than 13 chars, however I think this is not necessarily true. e.g.

  • /dev/mmcblk0p1 is 15 chars
  • /dev/mmcblk0p14 is 16 chars
  • Some people are using: /dev/mmcblk0boot0 which is 18 chars....

So my suggestion is to set this to by default 18 chars as that should cover a majority of cases.

Additionally, if it's larger than 18 chars, for example if you had a weird case of "/dev/mmcblk0boot10" perhaps you could append ... e.g. [ OK ] Checking filesystem /dev/mmcblk0boot1... so people know it's been truncated.

Or perhaps no need to set any limit on the size?

@troglobit
Copy link
Owner

Yes, thanks for pointing this out!

@troglobit troglobit self-assigned this May 6, 2022
@troglobit troglobit added this to the 4.3 milestone May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants