summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* btrfs: beginning of btrfs supportbtrfsH. Peter Anvin2009-08-149-7/+2900
| | | | | | | | Infrastructure for btrfs, plus an import of the btrfs code written for Grub 0.97. It does not yet compile and will need significant changes still. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: kaboom.c: file missing from previous checkinH. Peter Anvin2009-08-131-0/+16
| | | | | | kaboom.c; necessary file missing from previous checkin. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: cleaner way to call kaboom from 32-bit codeH. Peter Anvin2009-08-123-10/+18
| | | | | | | | Make kaboom() a noreturn function directly callable from 32-bit code. Do a special macro hack to keep it from interfering with the symbol kaboom in 16-bit code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* netinet/in.h: add __constfunc to inlinesH. Peter Anvin2009-08-121-4/+5
| | | | | | All the byte-swapping functions are true constfuncs... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* netinet/in.h: put in explicit casts for all the hton/ntoh macrosH. Peter Anvin2009-08-121-6/+6
| | | | | | For the macro versions of hton/ntoh, use casts everywhere. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: use stpcpy() as generic_unmangle_name()H. Peter Anvin2009-08-126-12/+10
| | | | | | | We can use stpcpy() as generic_unmangle_name(); this also gives us the pointer to the end that the assembly code wants and expects. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* iso9660: adjust to the new VFSH. Peter Anvin2009-08-121-110/+114
| | | | | | | I missed converting iso9660 over to the new VFS. Do it now. In particular, getfssec now takes a struct file *. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: remove strpcpy() - we already have stpcpy()H. Peter Anvin2009-08-124-23/+2
| | | | | | | | Remove strpcpy(); it is exactly the same thing as stpcpy() which we already have, and which is more "standard" (in the sense that none of these are actually standard...) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: make FILENAME_MAX common; librarize mangle/unmangleH. Peter Anvin2009-08-1214-151/+124
| | | | | | | | FILENAME_MAX was 2^8 in all variants by now; make it a common define. Libraries mangle/unmangle; we have generic_mangle_name for Unix-like filesystems, and unmangle now defaults to simple strcpy. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: more filesystem-specific files into subdirectoriesH. Peter Anvin2009-08-1211-188/+5
| | | | | | | Preemptively move filesystem-specific files into core/fs/<fsname> so we can start trying to pretend to be organized. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: VFS cleanups: add a persistent generic struct fileH. Peter Anvin2009-08-1112-169/+232
| | | | | | | | | | | Major cleanups to the VFS layer: - add a persistent generic "struct file" - pass "struct file *" to getfssec - add a close_file method - use VFS-assigned indicies instead of pointers as file handles. This allows the file structures to be allocated from high memory. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge commit 'liu/master' into fscsyslinux-4.00-pre2H. Peter Anvin2009-08-116-50/+54
|\
| * Core:SYSLINUX: make searchdir do workLiu Aleaxander2009-08-114-28/+31
| | | | | | | | | | | | | | | | well, still get lots of bugs, like when we execute dir /boot/syslinux in fact, it will list the file in /boot/ directory but not in /boot/syslinux/ Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
| * Core:SYSLINUX: fix the vfat_searchdirLiu Aleaxander2009-08-116-27/+28
| | | | | | | | | | | | This makes the searchdir can find a dir; it's also prepared for the readdir function used in rosh Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
* | pxe: more tweaks to the open (searchdir) routineH. Peter Anvin2009-08-111-131/+114
| | | | | | | | | | | | | | | | More tweaks to the open (searchdir) routine, in particular in the OACK packet parsing. From testing it appears substantially more robust now. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | netinet/in.h: adjust hton/ntoh macros to be true constantsH. Peter Anvin2009-08-111-11/+20
| | | | | | | | | | | | | | | | Tweak the hton/ntoh macros so that they are true constants if the input is a constant expression; this makes them usable in the preprocessor. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pxe: clean up C code; reimplement "Plan C"; share PXE API definitionsH. Peter Anvin2009-08-115-755/+695
|/ | | | | | | | Minor cleanups to the C code. Reimplement "Plan C" for finding the entry point. Share the PXE API definitions between com32 and the core. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: remove assembly definition of Files in iso/pxelinuxH. Peter Anvin2009-08-106-53/+42
| | | | | | | Remove the assembly definition of Files in isolinux and pxelinux. Still to do: remove dependencies on Files living in .bss16 space. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* MCONFIG: update GCCOPTH. Peter Anvin2009-08-103-0/+15
| | | | | | | Add -fwrapv, -freg-struct-return, -fno-exceptions, -fno-asynchronous-unwind-tables, -fno-strict-aliasing. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: add missing (void), drop casts for Files[], cleanupsH. Peter Anvin2009-08-102-14/+13
| | | | | | | Add missing (void) on no-argument functions, drop casts for Files (it's now a properly typed array), clean up loop forms. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ext2: fix missing (void), use standard form for loopH. Peter Anvin2009-08-101-5/+5
| | | | | | Use the standard form for a for loop; add missing (void). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge commit 'liu/master'; fix Files[] definitionH. Peter Anvin2009-08-1016-229/+202
|\ | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: core/extlinux.asm core/ldlinux.asm Merge in liu's changes, but fix Files[] to be a private structure inside the filesystem, thus we don't have to worry about the size of it in the assembly code at all. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Core:pxelinux: improves the tftp options parsingLiu Aleaxander2009-08-091-8/+5
| | | | | | | | Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
| * pxe: fix OACK packet handlingLiu Aleaxander2009-08-091-3/+8
| | | | | | | | | | | | | | | | The current code only works iff the tsize option is set. This patch fixes the handling of the OACK packet and makes the code work with all combinations of the tsize and blksize options. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
| * Core: code-cleanLiu Aleaxander2009-08-083-35/+3
| | | | | | | | | | | | removes the unused variables and functions Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
| * Core: unmangle_name convertedLiu Aleaxander2009-08-0814-97/+85
| | | | | | | | Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
| * Core:EXTLINUX: fix the bug of open_file_t struct in extlinuxLiu Aleaxander2009-08-081-1/+3
| | | | | | | | | | | | | | The size of open_file_t structure in extlinux is twice than in the others derivatiives. So we should cut the MAX_OPEN to half. Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
| * Core: move the comman externs to core.hLiu Aleaxander2009-08-085-10/+4
| | | | | | | | | | | | | | the trackbuf and Files are all uesed in all the four fs, so it would be nice to put the externs in core.h instead in each c file of the four fs Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
| * Core: add _static_ statement to all fsLiu Aleaxander2009-08-084-84/+82
| | | | | | | | | | | | This well let me far away from some werid trouble Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
| * core:PXELINUX: fix the OACK option parsing bug.Liu Aleaxander2009-08-081-13/+13
| | | | | | | | the current code can just handle one option beacuse I put the do-while loop in the wrong position.
| * Core: get the rid of the ld warningsLiu Aleaxander2009-08-083-6/+7
| | | | | | | | | | we extern the SecPerClust from diskstart.inc and used in fat.c, but we also defined another SecPerClust in ext2.c. So we should be better to make more things in _static_, just like hpa told.
* | core/diskstart.inc: make the root filesystem a configurableH. Peter Anvin2009-08-103-19/+11
| | | | | | | | | | | | | | 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: merge ldlinux.asm and extlinux.asmH. Peter Anvin2009-08-094-401/+210
| | | | | | | | | | | | | | ldlinux.asm and extlinux.asm are by now extremely similar. Merge them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'core32' into fscH. Peter Anvin2009-08-0911-95/+334
|\ \ | |/ |/|
| * core: remove hack for dynamic symbol table generationcore32H. Peter Anvin2009-08-092-15/+3
| | | | | | | | | | | | | | | | Kill hack we used to generate a dynamic symbol table. There is a much better technique for doing this which is already deployed on the "dynamic" branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Merge branch 'master' into core32H. Peter Anvin2009-08-089-80/+331
| |\
| | * NEWS: document isohybrid -id fixed.H. Peter Anvin2009-08-031-0/+1
| | |
| | * isohybrid: convert -id to a binary stringSteffen Winterfeldt2009-08-031-1/+1
| | | | | | | | | | | | | | | Shouldn't 'isohybrid -id ID' write ID as 32bit number? Currently it ends up as string messing up the mbr.
| | * memdisk: remove unnecessary %ifdefsyslinux-3.83-pre6H. Peter Anvin2009-08-021-4/+0
| | | | | | | | | | | | Remove an %ifdef that the macros take care of anyway.
| | * memdisk: don't set CX:DX for INT 13h AH=15h for floppiesH. Peter Anvin2009-08-022-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Win98SE DOS apparently hangs if INT 13h, AH=15h returns the capacity in CX:DX for floppies... *unless* EDD is enabled. Confused yet? This patch also adds some more tracing framework. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * MEMDISK: additional EDD DPT FieldsMiller, Shao2009-08-021-2/+2
| | | | | | | | | | | | | | | | | | We incorrectly used "equ" instead of "dd" (or "db") for strings in memdisk.inc. Oops! My mistake in my 'freedos' branch. Silly mistake. - Shao
| | * memdisk: correct the types for the EDD DPT, and write a real onesyslinux-3.83-pre5H. Peter Anvin2009-07-312-27/+41
| | | | | | | | | | | | | | | | | | | | | Fix the sizes of some of the fields in the EDD DPT. Write a real one to the best of our ability. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * memdisk: don't write the EDD DPT unless we are in EDD mode...H. Peter Anvin2009-07-311-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't write the EDD DPT unless we're actually in EDD mode! Otherwise we end up corrupting memory beyond the defined code. This was the reason 5ca2764460883f5e9a5bd83db00f242ea1272e33 worked, by moving variables out of the corruption zone. Debugged-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * Merge commit 'andytim/freedos'H. Peter Anvin2009-07-302-0/+20
| | |\
| | | * [memdisk] Additional EDD Device Parameter Table fieldsShao Miller2009-07-312-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Some additional fields from the EDD-4 spec. draft for the Device Parameter Table have been added into the structure in setup.c and memdisk.inc. These were added in the hopes of resolving a FreeDOS MEMDISK bug on IBM ThinkPads.
| | * | graphics: actually do 32-bit writes to VGAH. Peter Anvin2009-07-301-2/+2
| | |/ | | | | | | | | | | | | | | | Use "rep movsd" to copy data to VGA memory, not "rep movsb". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * graphics: trivial optimization of old-style graphic modesyslinux-3.83-pre4H. Peter Anvin2009-07-301-24/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Trivially optimize the old-style graphics by using another level of temporary buffering in bitplane format, thereby enabling the use of rep movsd to write the contents to the screen. This can speed things up substantially in virtualization environments. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * NEWS: document Thinkpad fixsyslinux-3.83-pre3H. Peter Anvin2009-07-301-0/+2
| | |
| | * memdisk: move temporary variables away from the EDD data blockH. Peter Anvin2009-07-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move a couple of variables away from the EDD data block. Without this change, FreeDOS doesn't boot on Thinkpads. Unfortunately, this should have been a null change, so it is really not clear why this happens. Stack overflows have been ruled out. Probably need to examine the FreeDOS kernel in some detail. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * memdisk: handle recursive INT 13h invocationH. Peter Anvin2009-07-301-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some systems, e.g. a lot of Thinkpads, invoke INT 13h recursively from within the stack itself. This is generally a bad idea as it re-runs any INT 13h hooks (including the ones that DOS installs!), but it should work. Keep a counter of recursive invocations and simply bypass the whole system including the DL shift if the invocation is recursive. With this, MS-DOS boots on a Thinkpad T61. FreeDOS is still broken, though, but apparently in a different manner... Signed-off-by: H. Peter Anvin <hpa@zytor.com>