--- trunk/mkinitrd-magellan/isolinux/cmdline.inc 2010/08/19 08:27:19 1132 +++ trunk/mkinitrd-magellan/isolinux/cmdline.inc 2010/08/19 09:50:43 1133 @@ -1,7 +1,7 @@ -;; $Id: cmdline.inc,v 1.1 2007-09-01 22:44:04 niro Exp $ ;; ----------------------------------------------------------------------- -;; -;; Copyright 2003 H. Peter Anvin - All Rights Reserved +;; +;; Copyright 2003-2009 H. Peter Anvin - All Rights Reserved +;; Copyright 2009 Intel Corporation; author: H. Peter Anvin ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -21,15 +21,18 @@ ; ; Assumes DS == CS +; make_plain_cmdline: push es ; ui.inc has already copied any APPEND options mov ax,real_mode_seg mov es,ax - mov si,[CmdOptPtr] mov di,[CmdLinePtr] - + call do_ip_append + + mov si,[CmdOptPtr] + call strcpy dec di @@ -38,4 +41,54 @@ pop es ret +; +; Actual IPAppend strings... +; +%if IS_PXELINUX + section .data + alignz 2 +IPAppends dw IPOption + dw BOOTIFStr +numIPAppends equ ($-IPAppends)/2 +%else +IPAppends equ 0 +numIPAppends equ 0 +%endif +; +; Handle "ipappend" strings, if applicable +; +; Assumes DS == CS; pushes output to ES:DI +; + section .text + +do_ip_append: +%ifndef DEPEND + %if numIPAppends > 0 + push cx + push bx + push si + + mov bx,IPAppends + mov cx,[IPAppend] + and cx,(1 << numIPAppends)-1 +.loop: + jcxz .done + mov si,[bx] + inc bx + inc bx + test cl,1 + jz .not_this + + call strcpy + mov byte [es:di-1],' ' ; Replace final null with space +.not_this: + shr cx,1 + jmp .loop +.done: + pop si + pop bx + pop cx + %endif +%endif + ret