chain.c32, libcom32: Move struct ebios_dapa as disk_ebios_dapa
authorShao Miller <shao.miller@yrdsb.edu.on.ca>
Mon, 28 Jun 2010 05:36:35 +0000 (01:36 -0400)
committerShao Miller <shao.miller@yrdsb.edu.on.ca>
Sat, 10 Jul 2010 05:03:04 +0000 (01:03 -0400)
Moving portions of chain.c32 into libcom32.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
com32/include/syslinux/disk.h
com32/modules/chain.c

index f880a89..51af728 100644 (file)
@@ -48,6 +48,14 @@ struct disk_info {
     int sect;
 };
 
+struct disk_ebios_dapa {
+    uint16_t len;
+    uint16_t count;
+    uint16_t off;
+    uint16_t seg;
+    uint64_t lba;
+};
+
 extern int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg);
 extern int disk_get_params(int disk, struct disk_info *diskinfo);
 
index 738d8c7..ea04b8b 100644 (file)
@@ -151,19 +151,11 @@ static struct disk_info diskinfo;
  * Get a disk block and return a malloc'd buffer.
  * Uses the disk number and information from diskinfo.
  */
-struct ebios_dapa {
-    uint16_t len;
-    uint16_t count;
-    uint16_t off;
-    uint16_t seg;
-    uint64_t lba;
-};
-
 /* Read count sectors from drive, starting at lba.  Return a new buffer */
 static void *read_sectors(uint64_t lba, uint8_t count)
 {
     com32sys_t inreg;
-    struct ebios_dapa *dapa = __com32.cs_bounce;
+    struct disk_ebios_dapa *dapa = __com32.cs_bounce;
     void *buf = (char *)__com32.cs_bounce + SECTOR;
     void *data;
 
@@ -228,7 +220,7 @@ static void *read_sectors(uint64_t lba, uint8_t count)
 static int write_sector(unsigned int lba, const void *data)
 {
     com32sys_t inreg;
-    struct ebios_dapa *dapa = __com32.cs_bounce;
+    struct disk_ebios_dapa *dapa = __com32.cs_bounce;
     void *buf = (char *)__com32.cs_bounce + SECTOR;
 
     memcpy(buf, data, SECTOR);