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

Details view sticks WC settings atop border #6

Closed
dankamongmen opened this issue Aug 3, 2019 · 5 comments
Closed

Details view sticks WC settings atop border #6

dankamongmen opened this issue Aug 3, 2019 · 5 comments
Assignees
Labels

Comments

@dankamongmen
Copy link
Owner

Look at the details view here. What's up with the spacing? Did we let a tab through or something?

growlight-bug

Note that this is also mentioned in #4. Use this bug to track the fix.

@dankamongmen
Copy link
Owner Author

It looks like there's a linefeed in the serial number.

@dankamongmen
Copy link
Owner Author

Normalizing all space characters to spaces improves things, but now the WC stuff is over by one character. nvme_id_ctrl allows up to 20 characters for the serial. sg likewise allows a serial to be up to 20 bytes. I think we've actually got 21 spaces for the S/N, so I think we've got an off-by-one here.

@dankamongmen
Copy link
Owner Author

We did indeed have an incorrect calculation of remaining space. That's fixed, but now we don't print it at all when the full 20 characters are being used. That's acceptable, I guess, but in the instance above we've just got trailing spaces. Trim them out at the point of the ioctl().

@dankamongmen
Copy link
Owner Author

I've got this fixed up for NVMe, but we should make it work the same way for regular disks. Lift out the presentation function and call it from sg_interrogate().

@dankamongmen
Copy link
Owner Author

growlight-fixed

Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant