Hi Peter,
thanks for your patch. Unfortunately this breaks cross-compilation under Linux for DOS because "/usr/sbin/dmidecode" won't work in a DOS binary, whereas "dmidecode" works because of the implicit .exe extension.
On 12.09.2010 11:13, Peter Lemenkov wrote:
This helps in case then user doesn't have dmidecode in his PATH. For example, if user elevates his privileges with sudo, then he may not inherit some superuser's environmental variables ($PATH, contaning additional directories - /sbin, /usr/sbin and similar).
Your observation is correct, and I would love to get a cross-platform fix for it. One way to do this would be to keep the "dmidecode" string as is if we're doing cross compilation. Another way would be an additional internal programmer parameter like this: flashrom -p internal:dmidecode_path=/usr/sbin/dmidecode Yet another solution would be to finally integrate the internal dmi decoder patch into flashrom and kill the dmidecode dependency that way.
In case of failure to determine full path to dmidecode it just fallbacks to the default value.
Tested only on Linux.
What do you think of my suggestions above?
Regards, Carl-Daniel