I have been spoiled by free software
Since I tend to use only free software (for various definitions of freedom) I keep forgetting how much spoiled I am by its quality (or at least by knowing than when it lacks quality I can improve it).
Today I was very happy when I found out that IBM provides a Linux program which can read and write the settings of the BIOS, BMC and RSA II. Now I am amazed by its shockingly abysmal quality. This code was written by somebody who apparently received detailed instructions about what kind of user interface and logging is expected from a system utility but also had no idea about how programs are designed in the real world.
In a few minutes I have been able to determine that this FPOS:
- Obtains the kernel version by running uname -r with system(3).
- ... a dozen of times.
- ... and redirecting its output to a file in /tmp with a constant name.
- Adds support for unknown BIOS versions by binary-patching itself.
- Opens and closes /dev/mem once for each parameter it wants to read or write.
But at least this is a real Linux program: the updater for the disks firmwares is a scary shell script which modifies the configuration of grub to boot a DOS image after a reboot...