Created attachment 185810 [details] makefs: Reject UFS labels that are too long to fit If a specified UFS label is too long to fit, makefs currently silently truncates it. This causes problems if the created file system contains files like /etc/fstab that expect the whole label. You may end up with a release image that was built "successfully" but doesn't actually boot. The attached patch lets makefs reject UFS labels that don't fit which makes the issue easier to spot. Obtained from: ElectroBSD
For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open"
In 2017, Ed imported option parsing from NetBSD so this patch no longer applies. While I support the improvement, it has the side effect that since all strings are handled like this: case OPT_STRARRAY: strlcpy((void *)options[i].value, val, (size_t) options[i].maximum); break; you can't be selective about which truncation is tolerable and which is not. Ed, maybe we should reject any and all truncation errors in this path?
^Triage: clear stale flags.
> Ed, maybe we should reject any and all truncation errors in this path? I think that's reasonable