BSD stat and GNU stat differ significantly when it comes to using a
custom format string, both in the option name and in the format string
itself. Handle both here (assuming Linux means GNU stat rather than BSD
stat).
Obtained from: CheriBSD
Differential D35814
release: Support GNU stat in mkisoimages.sh jrtc27 on Jul 14 2022, 12:14 AM. Authored by Tags None Referenced Files
Details BSD stat and GNU stat differ significantly when it comes to using a Obtained from: CheriBSD
Diff Detail
Event TimelineComment Actions Can we just make mkimg(1) to accept a filename as its parameter, basically by stat'ing the file and use that size as capacity instead? Comment Actions I do not object to the change, but I would prefer to test uname -s against "FreeBSD" and reverse the if/else logic. But I will not complain too loudly about this nit. Comment Actions macOS wants the FreeBSD behaviour; currently Linux is the exception. I could flip it with != Linux, but if != .. else feels wrong to write. Comment Actions Nope, that's fine then. I didn't realize the macOS behavior. So you can ignore my suggestion. :) Comment Actions It's a bit of an unusual thing to want, and --capacity file would then be strange (especially if the file is of the form [0-9]+, it's then ambiguous). Adding an option just for mkisoimages.sh's use seems a little overkill. |