path: root/com32/sysdump/dmi.c
diff options
authorH. Peter Anvin <hpa@zytor.com>2010-02-07 15:14:21 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-07 15:14:21 -0800
commit88f5f9b480f036ef9da9cf9deb41935c9ad9743c (patch)
treed4aae48e5a3f2b8d618ca5675c87f852d744ac46 /com32/sysdump/dmi.c
parent257adb86a34db443100d9e18891ce98f2518333f (diff)
sysdump: change to a two-phase generate/output model, buffer in memory
Instead of outputting data as it is generated, buffer it all in memory and then output it all at once. This not only gives us exact size and so on before we start, but turns out to be faster at least for TFTP. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/sysdump/dmi.c')
1 files changed, 4 insertions, 4 deletions
diff --git a/com32/sysdump/dmi.c b/com32/sysdump/dmi.c
index 64f95a9a..be4cce46 100644
--- a/com32/sysdump/dmi.c
+++ b/com32/sysdump/dmi.c
@@ -78,8 +78,8 @@ static void dump_smbios(struct backend *be, size_t dptr)
smx.dmi.tbladdr = sizeof smx;
smx.dmi.csum -= checksum(&smx.dmi, 0x0f);
- write_data(be, &smx, sizeof smx, false);
- write_data(be, (const void *)smb->dmi.tbladdr, smb->dmi.tbllen, false);
+ write_data(be, &smx, sizeof smx);
+ write_data(be, (const void *)smb->dmi.tbladdr, smb->dmi.tbllen);
static void dump_old_dmi(struct backend *be, size_t dptr)
@@ -104,8 +104,8 @@ static void dump_old_dmi(struct backend *be, size_t dptr)
fake.dmi.tbladdr = sizeof fake;
fake.dmi.csum -= checksum(&fake.dmi, 0x0f);
- write_data(be, &fake, sizeof fake, false);
- write_data(be, (const void *)dmi->tbladdr, dmi->tbllen, false);
+ write_data(be, &fake, sizeof fake);
+ write_data(be, (const void *)dmi->tbladdr, dmi->tbllen);
void dump_dmi(struct backend *be)