aboutsummaryrefslogtreecommitdiffstats
path: root/mbr/mbr.S
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-07-11 17:20:59 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-07-11 17:20:59 -0700
commit0d628e5402dbfee63181d20b9fb66d9f7fca9b1e (patch)
treec29cbc241e9af866dc6bf7147b7c86aea0b29d95 /mbr/mbr.S
parent289d77c6733182088953a02b9c09776272b04203 (diff)
downloadsyslinux.git-0d628e5402dbfee63181d20b9fb66d9f7fca9b1e.tar.gz
syslinux.git-0d628e5402dbfee63181d20b9fb66d9f7fca9b1e.tar.xz
syslinux.git-0d628e5402dbfee63181d20b9fb66d9f7fca9b1e.zip
MBR: shave 2 more bytes
We always re-read the last partition table on any kind of error, so no need to prevent the code from clobbering it on failure.
Diffstat (limited to 'mbr/mbr.S')
-rw-r--r--mbr/mbr.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/mbr/mbr.S b/mbr/mbr.S
index b9729eb8..ac24b746 100644
--- a/mbr/mbr.S
+++ b/mbr/mbr.S
@@ -148,18 +148,20 @@ read_common:
* read_partition_table:
* Read a partition table (pointed to by %eax), and copy
* the partition table into the ptab buffer.
+ *
* Clobbers %si, %di, and %cx, other registers preserved.
+ * %cx = 0 on exit.
+ *
+ * On error, CF is set and ptab is overwritten with junk.
*/
ptab = _start+446
read_partition_table:
call read_sector
- jc 20f
movw $bootsec+446, %si
movw $ptab, %di
movw $(16*4/2), %cx
rep ; movsw
-20:
ret
/*