Page MenuHomeFreeBSD

stand: Add dv_devfmt to return a string represenation of the device
ClosedPublic

Authored by imp on Jul 25 2022, 8:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 15, 10:04 AM
Unknown Object (File)
Sat, Jun 29, 8:55 AM
Unknown Object (File)
Jun 24 2024, 6:59 AM
Unknown Object (File)
Jun 17 2024, 5:20 PM
Unknown Object (File)
Jun 17 2024, 4:21 PM
Unknown Object (File)
Jun 13 2024, 6:02 PM
Unknown Object (File)
Jun 6 2024, 9:01 PM
Unknown Object (File)
May 28 2024, 10:21 AM
Subscribers

Details

Summary

Add a new pointer, dv_devfmt, to allow devices to format themselves. We
will use this to simplify many of the fmtdev functions in the tree as
they are all almost the same, or all are isomorphic to each other.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Jul 25 2022, 8:32 PM
stand/libsa/stand.h
143

Is there more background for this specific size? I mean, we have DEV_NAMLEN + 10 chars in int + colon + NUL... asking because 128 bytes add up in text+data+bss of BIOS loader:)

stand/libsa/stand.h
143

128 was used in a lot of places (see subsequent reviews) so I used that here.
For disk devices, I don't see this ever being > diskXXXXsXXa: (so up to 10k disks, 100 partitions and maybe a bsd label for evilness).
I'm not sure what a good limit is here, but in most loaders, this will just be 128 bytes once in the devformat static buffer.

This revision is now accepted and ready to land.Jul 26 2022, 10:30 AM
This revision now requires review to proceed.Jul 28 2022, 4:57 PM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 11 2022, 4:28 PM
This revision was automatically updated to reflect the committed changes.