Displaying 2 results from an estimated 2 matches for "diskbios".
Did you mean:
disk_io
2013 Sep 17
2
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
eparam would only be used if EBIOS is available.
If it is not, then there is no reason to allocate eparam.
Signed-off-by: Raphael S.Carvalho <raphael.scarv at gmail.com>
---
com32/lib/syslinux/disk.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c
index 093751a..d96acbf 100644
---
2013 Sep 30
0
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...gt; + eparam = lmalloc(sizeof *eparam);
> + if (!eparam)
> + return -1;
> +
> memset(&inreg, 0, sizeof inreg);
> inreg.eax.b[1] = 0x48;
> inreg.edx.b[0] = disk;
It would be better to move the lfree(), and in fact the declaration of
'eparam' under...
if (diskbios->ebios) {
struct disk_ebios_eparam *eparam;
eparam = lmalloc();
...
lfree(eparam);
}
since it's not used anywhere else. Make sense?
--
Matt Fleming, Intel Open Source Technology Center