[syslinux] Read disk not working in 3.35+
H. Peter Anvin
hpa at zytor.com
Mon Feb 19 15:43:57 PST 2007
Ram Yalamanchili wrote:
> Hey,
>
> Looks like read disk function which was launched in 3.35 isnt working.
> Did anyone test this on any hardware? I'm using it thru the com32
> interface to read contents of the active partition of a USB boot key
> (syslinux).
>
> I did a sample test like:
>
> void scanAndPrint()
> {
> com32sys_t regs_in;
> char *sectorBuf = __com32.cs_bounce;
> int i;
> memset(sectorBuf, 0x0, 512); // XXX MARK 1
>
> for (i=0; i< 10; i++) {
> int j;
>
> memset(®s_in, 0, sizeof regs_in);
> regs_in.eax.l = 0x0019;
> regs_in.edx.l = i; // sector number
> regs_in.ecx.l = 1; // sector count
> regs_in.es = SEG(sectorBuf);
> regs_in.ebx.w[0] = OFFS(sectorBuf);
> __intcall(0x22, ®s_in, NULL);
>
> printf("%d: ", i);
> for (j =0; j < 512; j++) {
> if (sectorBuf[j] != 0)
> printf("%x", sectorBuf[j]);
> }
> printf(" .\n");
> }
> }
>
This doesn't work, since printf() uses the bounce buffer.
-hpa
More information about the Syslinux
mailing list