aboutsummaryrefslogtreecommitdiffstats
path: root/com32
diff options
context:
space:
mode:
Diffstat (limited to 'com32')
-rw-r--r--com32/Makefile2
-rw-r--r--com32/libupload/.gitignore2
-rw-r--r--com32/libupload/Makefile38
-rw-r--r--com32/libupload/cpio.c (renamed from com32/sysdump/cpio.c)12
-rw-r--r--com32/libupload/ctime.c (renamed from com32/sysdump/ctime.c)0
-rw-r--r--com32/libupload/ctime.h (renamed from com32/sysdump/ctime.h)0
-rw-r--r--com32/libupload/serial.c (renamed from com32/sysdump/serial.c)0
-rw-r--r--com32/libupload/serial.h (renamed from com32/sysdump/serial.h)0
-rw-r--r--com32/libupload/srecsend.h (renamed from com32/sysdump/srecsend.h)0
-rw-r--r--com32/libupload/upload_backend.h55
-rw-r--r--com32/libupload/upload_srec.c (renamed from com32/sysdump/be_srec.c)8
-rw-r--r--com32/libupload/upload_tftp.c (renamed from com32/sysdump/be_tftp.c)8
-rw-r--r--com32/libupload/upload_ymodem.c (renamed from com32/sysdump/be_ymodem.c)8
-rw-r--r--com32/libupload/ymodem.txt (renamed from com32/sysdump/ymodem.txt)0
-rw-r--r--com32/libupload/zout.c (renamed from com32/sysdump/zout.c)10
-rw-r--r--com32/sysdump/Makefile2
-rw-r--r--com32/sysdump/acpi.c10
-rw-r--r--com32/sysdump/backend.h55
-rw-r--r--com32/sysdump/cpuid.c4
-rw-r--r--com32/sysdump/dmi.c8
-rw-r--r--com32/sysdump/main.c20
-rw-r--r--com32/sysdump/memmap.c6
-rw-r--r--com32/sysdump/memory.c6
-rw-r--r--com32/sysdump/pci.c6
-rw-r--r--com32/sysdump/sysdump.h16
-rw-r--r--com32/sysdump/vesa.c4
26 files changed, 160 insertions, 120 deletions
diff --git a/com32/Makefile b/com32/Makefile
index b090c403..da632a17 100644
--- a/com32/Makefile
+++ b/com32/Makefile
@@ -1,4 +1,4 @@
-SUBDIRS = tools lib gpllib libutil modules mboot menu samples rosh cmenu \
+SUBDIRS = libupload tools lib gpllib libutil modules mboot menu samples rosh cmenu \
hdt gfxboot sysdump lua/src
all tidy dist clean spotless install:
diff --git a/com32/libupload/.gitignore b/com32/libupload/.gitignore
new file mode 100644
index 00000000..e0292b19
--- /dev/null
+++ b/com32/libupload/.gitignore
@@ -0,0 +1,2 @@
+*.o
+*.a
diff --git a/com32/libupload/Makefile b/com32/libupload/Makefile
new file mode 100644
index 00000000..c009b6b9
--- /dev/null
+++ b/com32/libupload/Makefile
@@ -0,0 +1,38 @@
+# Include configuration rules
+topdir = ../..
+include ../lib/MCONFIG
+
+REQFLAGS += -I./
+
+SUBDIRS := .
+LIBOBJS := $(foreach dir,$(SUBDIRS),$(patsubst %.c,%.o,$(wildcard $(dir)/*.c)))
+
+BINDIR = /usr/bin
+LIBDIR = /usr/lib
+DATADIR = /usr/share
+AUXDIR = $(DATADIR)/syslinux
+INCDIR = /usr/include
+COM32DIR = $(AUXDIR)/com32
+
+all: libcom32upload.a
+
+libcom32upload.a : $(LIBOBJS)
+ rm -f $@
+ $(AR) cq $@ $^
+ $(RANLIB) $@
+
+tidy dist clean:
+ find . \( -name \*.o -o -name \*.a -o -name .\*.d -o -name \*.tmp \) -print0 | \
+ xargs -0r rm -f
+
+spotless: clean
+ rm -f *.a
+ rm -f *~ \#* */*~ */\#*
+
+install: all
+ mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR)
+ install -m 644 libcom32upload.a $(INSTALLROOT)$(COM32DIR)
+ mkdir -p $(INSTALLROOT)$(COM32DIR)/include/
+ cp -r *.h $(INSTALLROOT)$(COM32DIR)/include/
+
+-include .*.d */.*.d */*/.*.d
diff --git a/com32/sysdump/cpio.c b/com32/libupload/cpio.c
index 81d0d4be..b3e1eb78 100644
--- a/com32/sysdump/cpio.c
+++ b/com32/libupload/cpio.c
@@ -9,10 +9,10 @@
#include <inttypes.h>
#include <stdbool.h>
#include <zlib.h>
-#include "backend.h"
+#include "upload_backend.h"
#include "ctime.h"
-int cpio_pad(struct backend *be)
+int cpio_pad(struct upload_backend *be)
{
static char pad[4]; /* Up to 4 zero bytes */
if (be->dbytes & 3)
@@ -21,7 +21,7 @@ int cpio_pad(struct backend *be)
return 0;
}
-int cpio_hdr(struct backend *be, uint32_t mode, size_t datalen,
+int cpio_hdr(struct upload_backend *be, uint32_t mode, size_t datalen,
const char *filename)
{
static uint32_t inode = 2;
@@ -52,12 +52,12 @@ int cpio_hdr(struct backend *be, uint32_t mode, size_t datalen,
return rv;
}
-int cpio_mkdir(struct backend *be, const char *filename)
+int cpio_mkdir(struct upload_backend *be, const char *filename)
{
return cpio_hdr(be, MODE_DIR, 0, filename);
}
-int cpio_writefile(struct backend *be, const char *filename,
+int cpio_writefile(struct upload_backend *be, const char *filename,
const void *data, size_t len)
{
int rv;
@@ -69,7 +69,7 @@ int cpio_writefile(struct backend *be, const char *filename,
return rv;
}
-int cpio_close(struct backend *be)
+int cpio_close(struct upload_backend *be)
{
return cpio_hdr(be, 0, 0, "TRAILER!!!");
}
diff --git a/com32/sysdump/ctime.c b/com32/libupload/ctime.c
index 56c8efb6..56c8efb6 100644
--- a/com32/sysdump/ctime.c
+++ b/com32/libupload/ctime.c
diff --git a/com32/sysdump/ctime.h b/com32/libupload/ctime.h
index e6461253..e6461253 100644
--- a/com32/sysdump/ctime.h
+++ b/com32/libupload/ctime.h
diff --git a/com32/sysdump/serial.c b/com32/libupload/serial.c
index a3987531..a3987531 100644
--- a/com32/sysdump/serial.c
+++ b/com32/libupload/serial.c
diff --git a/com32/sysdump/serial.h b/com32/libupload/serial.h
index 356f2cef..356f2cef 100644
--- a/com32/sysdump/serial.h
+++ b/com32/libupload/serial.h
diff --git a/com32/sysdump/srecsend.h b/com32/libupload/srecsend.h
index 667be20d..667be20d 100644
--- a/com32/sysdump/srecsend.h
+++ b/com32/libupload/srecsend.h
diff --git a/com32/libupload/upload_backend.h b/com32/libupload/upload_backend.h
new file mode 100644
index 00000000..968e2c62
--- /dev/null
+++ b/com32/libupload/upload_backend.h
@@ -0,0 +1,55 @@
+#ifndef BACKEND_H
+#define BACKEND_H
+
+#include <stddef.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <zlib.h>
+#include "serial.h"
+
+/* Backend flags */
+#define BE_NEEDLEN 0x01
+
+struct upload_backend {
+ const char *name;
+ const char *helpmsg;
+ int minargs;
+
+ size_t dbytes;
+ size_t zbytes;
+ const char **argv;
+
+ uint32_t now;
+
+ int (*write)(struct upload_backend *);
+
+ z_stream zstream;
+ char *outbuf;
+ size_t alloc;
+};
+
+/* zout.c */
+int init_data(struct upload_backend *be, const char *argv[]);
+int write_data(struct upload_backend *be, const void *buf, size_t len);
+int flush_data(struct upload_backend *be);
+
+/* cpio.c */
+#define cpio_init init_data
+int cpio_hdr(struct upload_backend *be, uint32_t mode, size_t datalen,
+ const char *filename);
+int cpio_mkdir(struct upload_backend *be, const char *filename);
+int cpio_writefile(struct upload_backend *be, const char *filename,
+ const void *data, size_t len);
+int cpio_close(struct upload_backend *be);
+#define MODE_FILE 0100644
+#define MODE_DIR 0040755
+
+/* backends.c */
+struct upload_backend *get_upload_backend(const char *name);
+
+/* backends */
+extern struct upload_backend upload_tftp;
+extern struct upload_backend upload_ymodem;
+extern struct upload_backend upload_srec;
+
+#endif /* BACKEND_H */
diff --git a/com32/sysdump/be_srec.c b/com32/libupload/upload_srec.c
index fc69c886..c1907131 100644
--- a/com32/sysdump/be_srec.c
+++ b/com32/libupload/upload_srec.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <inttypes.h>
#include <minmax.h>
-#include "backend.h"
+#include "upload_backend.h"
/* Write a single S-record */
static int write_srecord(unsigned int len, unsigned int alen,
@@ -43,7 +43,7 @@ static int write_srecord(unsigned int len, unsigned int alen,
return 0;
}
-static int be_srec_write(struct backend *be)
+static int upload_srec_write(struct upload_backend *be)
{
char name[33];
const char *buf;
@@ -77,9 +77,9 @@ static int be_srec_write(struct backend *be)
return 0;
}
-struct backend be_srec = {
+struct upload_backend upload_srec = {
.name = "srec",
.helpmsg = "[filename]",
.minargs = 0,
- .write = be_srec_write,
+ .write = upload_srec_write,
};
diff --git a/com32/sysdump/be_tftp.c b/com32/libupload/upload_tftp.c
index 36a91eb8..d97cbd3a 100644
--- a/com32/sysdump/be_tftp.c
+++ b/com32/libupload/upload_tftp.c
@@ -9,7 +9,7 @@
#include <netinet/in.h>
#include <sys/times.h>
-#include "backend.h"
+#include "upload_backend.h"
enum tftp_opcode {
TFTP_RRQ = 1,
@@ -107,7 +107,7 @@ done:
return err;
}
-static int be_tftp_write(struct backend *be)
+static int upload_tftp_write(struct upload_backend *be)
{
static uint16_t local_port = 0x4000;
struct tftp_state tftp;
@@ -170,9 +170,9 @@ static int be_tftp_write(struct backend *be)
return 0;
}
-struct backend be_tftp = {
+struct upload_backend upload_tftp = {
.name = "tftp",
.helpmsg = "filename [tftp_server]",
.minargs = 1,
- .write = be_tftp_write,
+ .write = upload_tftp_write,
};
diff --git a/com32/sysdump/be_ymodem.c b/com32/libupload/upload_ymodem.c
index 316b3d4e..c42327d8 100644
--- a/com32/sysdump/be_ymodem.c
+++ b/com32/libupload/upload_ymodem.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <stdio.h>
#include <inttypes.h>
-#include "backend.h"
+#include "upload_backend.h"
#include "serial.h"
enum {
@@ -98,7 +98,7 @@ static void send_ack(struct ymodem_state *ym, const uint8_t *blk, size_t bytes)
} while (ack_buf == NAK);
}
-static int be_ymodem_write(struct backend *be)
+static int upload_ymodem_write(struct upload_backend *be)
{
static const uint8_t eot_buf = EOT;
uint8_t ack_buf;
@@ -167,9 +167,9 @@ static int be_ymodem_write(struct backend *be)
return 0;
}
-struct backend be_ymodem = {
+struct upload_backend upload_ymodem = {
.name = "ymodem",
.helpmsg = "filename [port [speed]]",
.minargs = 1,
- .write = be_ymodem_write,
+ .write = upload_ymodem_write,
};
diff --git a/com32/sysdump/ymodem.txt b/com32/libupload/ymodem.txt
index 2264ff78..2264ff78 100644
--- a/com32/sysdump/ymodem.txt
+++ b/com32/libupload/ymodem.txt
diff --git a/com32/sysdump/zout.c b/com32/libupload/zout.c
index ece934cc..b5575a9f 100644
--- a/com32/sysdump/zout.c
+++ b/com32/libupload/zout.c
@@ -8,12 +8,12 @@
#include <inttypes.h>
#include <stdbool.h>
#include <zlib.h>
-#include "backend.h"
+#include "upload_backend.h"
#include "ctime.h"
#define ALLOC_CHUNK 65536
-int init_data(struct backend *be, const char *argv[])
+int init_data(struct upload_backend *be, const char *argv[])
{
be->now = posix_time();
be->argv = argv;
@@ -33,7 +33,7 @@ int init_data(struct backend *be, const char *argv[])
return 0;
}
-static int do_deflate(struct backend *be, int flush)
+static int do_deflate(struct upload_backend *be, int flush)
{
int rv;
char *buf;
@@ -55,7 +55,7 @@ static int do_deflate(struct backend *be, int flush)
}
-int write_data(struct backend *be, const void *buf, size_t len)
+int write_data(struct upload_backend *be, const void *buf, size_t len)
{
int rv = Z_OK;
@@ -75,7 +75,7 @@ int write_data(struct backend *be, const void *buf, size_t len)
}
/* Output the data and shut down the stream */
-int flush_data(struct backend *be)
+int flush_data(struct upload_backend *be)
{
int rv = Z_OK;
diff --git a/com32/sysdump/Makefile b/com32/sysdump/Makefile
index bffee3a2..b2093de0 100644
--- a/com32/sysdump/Makefile
+++ b/com32/sysdump/Makefile
@@ -19,7 +19,7 @@ topdir = ../..
include ../MCONFIG
-include $(topdir)/version.mk
-LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC)
+LIBS = ../libutil/libutil_com.a ../lib/libcom32.a ../libupload/libcom32upload.a $(LIBGCC)
LNXLIBS = ../libutil/libutil_lnx.a
MODULES = sysdump.c32
diff --git a/com32/sysdump/acpi.c b/com32/sysdump/acpi.c
index 8671fc8a..f2be4f45 100644
--- a/com32/sysdump/acpi.c
+++ b/com32/sysdump/acpi.c
@@ -18,7 +18,7 @@
#include <string.h>
#include <stdlib.h>
#include "sysdump.h"
-#include "backend.h"
+#include "../libupload/upload_backend.h"
#include "rbtree.h"
struct acpi_rsdp {
@@ -151,7 +151,7 @@ static const struct acpi_rsdp *find_rsdp(void)
return scan_for_rsdp(0xe0000, 0x100000);
}
-static void dump_table(struct backend *be,
+static void dump_table(struct upload_backend *be,
const char name[], const void *ptr, uint32_t len)
{
char namebuf[64];
@@ -171,7 +171,7 @@ static void dump_table(struct backend *be,
write_data(be, ptr, len);
}
-static void dump_rsdt(struct backend *be, const struct acpi_rsdp *rsdp)
+static void dump_rsdt(struct upload_backend *be, const struct acpi_rsdp *rsdp)
{
const struct acpi_rsdt *rsdt;
uint32_t i, n;
@@ -196,7 +196,7 @@ static void dump_rsdt(struct backend *be, const struct acpi_rsdp *rsdp)
}
}
-static void dump_xsdt(struct backend *be, const struct acpi_rsdp *rsdp)
+static void dump_xsdt(struct upload_backend *be, const struct acpi_rsdp *rsdp)
{
const struct acpi_xsdt *xsdt;
uint32_t rsdp_len = rsdp->rev > 0 ? rsdp->len : 20;
@@ -231,7 +231,7 @@ static void dump_xsdt(struct backend *be, const struct acpi_rsdp *rsdp)
}
}
-void dump_acpi(struct backend *be)
+void dump_acpi(struct upload_backend *be)
{
const struct acpi_rsdp *rsdp;
uint32_t rsdp_len;
diff --git a/com32/sysdump/backend.h b/com32/sysdump/backend.h
deleted file mode 100644
index f2b3bc25..00000000
--- a/com32/sysdump/backend.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef BACKEND_H
-#define BACKEND_H
-
-#include <stddef.h>
-#include <inttypes.h>
-#include <stdbool.h>
-#include <zlib.h>
-#include "serial.h"
-
-/* Backend flags */
-#define BE_NEEDLEN 0x01
-
-struct backend {
- const char *name;
- const char *helpmsg;
- int minargs;
-
- size_t dbytes;
- size_t zbytes;
- const char **argv;
-
- uint32_t now;
-
- int (*write)(struct backend *);
-
- z_stream zstream;
- char *outbuf;
- size_t alloc;
-};
-
-/* zout.c */
-int init_data(struct backend *be, const char *argv[]);
-int write_data(struct backend *be, const void *buf, size_t len);
-int flush_data(struct backend *be);
-
-/* cpio.c */
-#define cpio_init init_data
-int cpio_hdr(struct backend *be, uint32_t mode, size_t datalen,
- const char *filename);
-int cpio_mkdir(struct backend *be, const char *filename);
-int cpio_writefile(struct backend *be, const char *filename,
- const void *data, size_t len);
-int cpio_close(struct backend *be);
-#define MODE_FILE 0100644
-#define MODE_DIR 0040755
-
-/* backends.c */
-struct backend *get_backend(const char *name);
-
-/* backends */
-extern struct backend be_tftp;
-extern struct backend be_ymodem;
-extern struct backend be_srec;
-
-#endif /* BACKEND_H */
diff --git a/com32/sysdump/cpuid.c b/com32/sysdump/cpuid.c
index 372a70db..53c54f2f 100644
--- a/com32/sysdump/cpuid.c
+++ b/com32/sysdump/cpuid.c
@@ -8,7 +8,7 @@
#include <com32.h>
#include <sys/cpu.h>
#include "sysdump.h"
-#include "backend.h"
+#include "../libupload/upload_backend.h"
struct cpuid_data {
uint32_t eax, ebx, ecx, edx;
@@ -29,7 +29,7 @@ static void get_cpuid(uint32_t eax, uint32_t ecx, struct cpuid_data *data)
#define CPUID_CHUNK 128
-void dump_cpuid(struct backend *be)
+void dump_cpuid(struct upload_backend *be)
{
struct cpuid_info *buf = NULL;
int nentry, nalloc;
diff --git a/com32/sysdump/dmi.c b/com32/sysdump/dmi.c
index be4cce46..64fcffb7 100644
--- a/com32/sysdump/dmi.c
+++ b/com32/sysdump/dmi.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <stdlib.h>
#include "sysdump.h"
-#include "backend.h"
+#include "../libupload/upload_backend.h"
struct dmi_header {
char signature[5];
@@ -60,7 +60,7 @@ static bool is_smbios(size_t dptr)
is_old_dmi(dptr+16);
}
-static void dump_smbios(struct backend *be, size_t dptr)
+static void dump_smbios(struct upload_backend *be, size_t dptr)
{
const struct smbios_header *smb = (void *)dptr;
struct smbios_header smx = *smb;
@@ -82,7 +82,7 @@ static void dump_smbios(struct backend *be, size_t dptr)
write_data(be, (const void *)smb->dmi.tbladdr, smb->dmi.tbllen);
}
-static void dump_old_dmi(struct backend *be, size_t dptr)
+static void dump_old_dmi(struct upload_backend *be, size_t dptr)
{
const struct dmi_header *dmi = (void *)dptr;
struct fake {
@@ -108,7 +108,7 @@ static void dump_old_dmi(struct backend *be, size_t dptr)
write_data(be, (const void *)dmi->tbladdr, dmi->tbllen);
}
-void dump_dmi(struct backend *be)
+void dump_dmi(struct upload_backend *be)
{
size_t dptr;
diff --git a/com32/sysdump/main.c b/com32/sysdump/main.c
index d0d40a7b..4931024a 100644
--- a/com32/sysdump/main.c
+++ b/com32/sysdump/main.c
@@ -20,7 +20,7 @@
#include <console.h>
#include <sys/cpu.h>
#include "../../version.h"
-#include "backend.h"
+#include "../libupload/upload_backend.h"
#include "sysdump.h"
const char program[] = "sysdump";
@@ -32,7 +32,7 @@ __noreturn die(const char *msg)
exit(1);
}
-static void dump_all(struct backend *be, const char *argv[])
+static void dump_all(struct upload_backend *be, const char *argv[])
{
cpio_init(be, argv);
@@ -50,20 +50,20 @@ static void dump_all(struct backend *be, const char *argv[])
flush_data(be);
}
-static struct backend *backends[] =
+static struct upload_backend *upload_backends[] =
{
- &be_tftp,
- &be_ymodem,
- &be_srec,
+ &upload_tftp,
+ &upload_ymodem,
+ &upload_srec,
NULL
};
__noreturn usage(void)
{
- struct backend **bep, *be;
+ struct upload_backend **bep, *be;
printf("Usage:\n");
- for (bep = backends ; (be = *bep) ; bep++)
+ for (bep = upload_backends ; (be = *bep) ; bep++)
printf(" %s %s %s\n", program, be->name, be->helpmsg);
exit(1);
@@ -71,7 +71,7 @@ __noreturn usage(void)
int main(int argc, char *argv[])
{
- struct backend **bep, *be;
+ struct upload_backend **bep, *be;
openconsole(&dev_null_r, &dev_stdcon_w);
fputs(version, stdout);
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
if (argc < 2)
usage();
- for (bep = backends ; (be = *bep) ; bep++) {
+ for (bep = upload_backends ; (be = *bep) ; bep++) {
if (!strcmp(be->name, argv[1]))
break;
}
diff --git a/com32/sysdump/memmap.c b/com32/sysdump/memmap.c
index 251107d5..7a21a312 100644
--- a/com32/sysdump/memmap.c
+++ b/com32/sysdump/memmap.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <com32.h>
#include "sysdump.h"
-#include "backend.h"
+#include "../libupload/upload_backend.h"
#define E820_CHUNK 128
struct e820_info {
@@ -16,7 +16,7 @@ struct e820_info {
uint8_t data[24];
};
-static void dump_e820(struct backend *be)
+static void dump_e820(struct upload_backend *be)
{
com32sys_t ireg, oreg;
struct e820_info *curr;
@@ -63,7 +63,7 @@ static void dump_e820(struct backend *be)
lfree(curr);
}
-void dump_memory_map(struct backend *be)
+void dump_memory_map(struct upload_backend *be)
{
com32sys_t ireg, oreg;
diff --git a/com32/sysdump/memory.c b/com32/sysdump/memory.c
index 6552e7f3..20b20c63 100644
--- a/com32/sysdump/memory.c
+++ b/com32/sysdump/memory.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <sys/cpu.h>
#include "sysdump.h"
-#include "backend.h"
+#include "../libupload/upload_backend.h"
static char *lowmem;
static size_t lowmem_len;
@@ -29,7 +29,7 @@ void snapshot_lowmem(void)
}
}
-static void dump_memory_range(struct backend *be, const void *where,
+static void dump_memory_range(struct upload_backend *be, const void *where,
const void *addr, size_t len)
{
char filename[32];
@@ -38,7 +38,7 @@ static void dump_memory_range(struct backend *be, const void *where,
cpio_writefile(be, filename, where, len);
}
-void dump_memory(struct backend *be)
+void dump_memory(struct upload_backend *be)
{
printf("Dumping memory... ");
diff --git a/com32/sysdump/pci.c b/com32/sysdump/pci.c
index 1d687279..7646a75d 100644
--- a/com32/sysdump/pci.c
+++ b/com32/sysdump/pci.c
@@ -7,9 +7,9 @@
#include <stdlib.h>
#include <sys/pci.h>
#include "sysdump.h"
-#include "backend.h"
+#include "../libupload/upload_backend.h"
-static void dump_pci_device(struct backend *be, pciaddr_t a, uint8_t hdrtype)
+static void dump_pci_device(struct upload_backend *be, pciaddr_t a, uint8_t hdrtype)
{
unsigned int bus = pci_bus(a);
unsigned int dev = pci_dev(a);
@@ -31,7 +31,7 @@ static void dump_pci_device(struct backend *be, pciaddr_t a, uint8_t hdrtype)
cpio_writefile(be, filename, data, sizeof data);
}
-void dump_pci(struct backend *be)
+void dump_pci(struct upload_backend *be)
{
int cfgtype;
unsigned int nbus, ndev, nfunc, maxfunc;
diff --git a/com32/sysdump/sysdump.h b/com32/sysdump/sysdump.h
index a5b963f8..15bb899d 100644
--- a/com32/sysdump/sysdump.h
+++ b/com32/sysdump/sysdump.h
@@ -1,15 +1,15 @@
#ifndef SYSDUMP_H
#define SYSDUMP_H
-struct backend;
+struct upload_backend;
-void dump_memory_map(struct backend *);
+void dump_memory_map(struct upload_backend *);
void snapshot_lowmem(void);
-void dump_memory(struct backend *);
-void dump_dmi(struct backend *);
-void dump_acpi(struct backend *);
-void dump_cpuid(struct backend *);
-void dump_pci(struct backend *);
-void dump_vesa_tables(struct backend *);
+void dump_memory(struct upload_backend *);
+void dump_dmi(struct upload_backend *);
+void dump_acpi(struct upload_backend *);
+void dump_cpuid(struct upload_backend *);
+void dump_pci(struct upload_backend *);
+void dump_vesa_tables(struct upload_backend *);
#endif /* SYSDUMP_H */
diff --git a/com32/sysdump/vesa.c b/com32/sysdump/vesa.c
index 017f9e4f..aebed182 100644
--- a/com32/sysdump/vesa.c
+++ b/com32/sysdump/vesa.c
@@ -1,10 +1,10 @@
#include <string.h>
#include <stdio.h>
#include "../lib/sys/vesa/vesa.h"
-#include "backend.h"
+#include "../libupload/upload_backend.h"
#include "sysdump.h"
-void dump_vesa_tables(struct backend *be)
+void dump_vesa_tables(struct upload_backend *be)
{
com32sys_t rm;
struct vesa_info *vip;