[syslinux] 3.36-pre2 without msdos filesystem

Tomas M tomas at slax.org
Sat Feb 3 04:04:52 PST 2007


>> It prints out '/dev/sdb4: No such file or directory'
>>
>> I tried strace, and there is probably something wrong.
>>
> 
> Okay, double user error (and lack of error checking on my part):

I don't agree. I would say you are _wrong_.

Even if I try using unmounted filesystem and even if I use slash at the 
beginning of -d directory, it's all the same. If I use -d 
/boot/syslinux, then ldlinux_name is "///boot/syslinux......."

Please review the code ./unix/syslinux.c, line 468.

I believe that the sprintf is incorrect.
The line says: if subdir is not empty, start ldlinux_name with "//".

I believe you should swap the arguments, the first %s should be mntpath, 
and then the rest.

eg.   sprintf(ldlinux_name, "%s%s%s//ldlinux.sys", mntpath /* first! */, 
subdir ? ...... /*the rest*/ ..... );


Tomas M
slax.org




More information about the Syslinux mailing list