[syslinux] Syslinux win exit code is incorrect
Pradhap Devarajan
pradhap at gmail.com
Fri Apr 12 17:49:14 PDT 2019
Hello,
When an AntiVirus/Malware defender or utility such as MBRFilter
https://blog.talosintelligence.com/2016/10/mbrfilter.html is active on the
system , then trying to use syslinux to update the MBR would fail.
PS D:\> D:\syslinux64.exe -a -m -f -i D:
Writing MBR: Access is denied.
Did not successfully update the MBR; continuing...
PS D:\> echo $LASTEXITCODE
0
The issue here is in line
https://repo.or.cz/syslinux.git/blob/HEAD:/win/syslinux.c#l509
eventhough we fail to update MBR but we still exit with 0. Need to have
exit(1) to indicate that operation has failed.
https://repo.or.cz/syslinux.git/blob/HEAD:/win/syslinux.c#l513 can have
exit(1) aswell.
thanks,
Pradhap
More information about the Syslinux
mailing list