core/diskstart.inc: make the root filesystem a configurable
authorH. Peter Anvin <hpa@zytor.com>
Mon, 10 Aug 2009 21:27:21 +0000 (14:27 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 10 Aug 2009 21:27:21 +0000 (14:27 -0700)
Instead of using conditional compilation, just set the root filesystem
type in the assembly stub.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/diskstart.inc
core/extlinux.asm
core/ldlinux.asm

index c160c8d..36d513e 100644 (file)
@@ -722,26 +722,12 @@ expand_super:
 
                
                pushad
-%if IS_PXELINUX
-             extern pxe_fs_ops
-             mov eax,pxe_fs_ops
-%else
- %if IS_EXTLINUX
-             extern ext2_fs_ops
-             mov eax,ext2_fs_ops
- %elif IS_SYSLINUX
-             extern vfat_fs_ops
-             mov eax,vfat_fs_ops
- %elif IS_ISOLINUX
-             extern iso_fs_ops
-             mov eax,iso_fs_ops
- %endif
-             mov dl,[DriveNumber]
-              mov dh,0               ; we are boot from disk not CDROM
-             mov ecx,[bsHidden]
-             mov ebx,[bsHidden+4]
+               mov eax,ROOT_FS_OPS
+               movzx dx,byte [DriveNumber]
+               ; DH = 0: we are boot from disk not CDROM
+               mov ecx,[bsHidden]
+               mov ebx,[bsHidden+4]
                mov si,[bsHeads]
                mov di,[bsSecPerTrack]
-%endif
                pm_call fs_init
                popad
index 2a5526b..0048cc1 100644 (file)
@@ -25,4 +25,7 @@
 my_id          equ extlinux_id
 FILENAME_MAX_LG2 equ 8                 ; log2(Max filename size Including final null)
 
+               extern ext2_fs_ops
+ROOT_FS_OPS    equ ext2_fs_ops
+
 %include "diskfs.inc"
index 183262a..b8b86b2 100644 (file)
@@ -31,4 +31,7 @@
 my_id          equ syslinux_id
 FILENAME_MAX_LG2 equ 6                 ; log2(Max filename size Including final null)
 
+               extern vfat_fs_ops
+ROOT_FS_OPS    equ vfat_fs_ops
+
 %include "diskfs.inc"