commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[2293] remove all trailing whitespace


From: Felix Zielcke
Subject: [2293] remove all trailing whitespace
Date: Wed, 10 Jun 2009 21:04:23 +0000

Revision: 2293
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2293
Author:   fzielcke
Date:     2009-06-10 21:04:23 +0000 (Wed, 10 Jun 2009)
Log Message:
-----------
remove all trailing whitespace

Modified Paths:
--------------
    trunk/grub2/Makefile.in
    trunk/grub2/aclocal.m4
    trunk/grub2/boot/i386/pc/boot.S
    trunk/grub2/boot/i386/pc/cdboot.S
    trunk/grub2/boot/i386/pc/diskboot.S
    trunk/grub2/boot/i386/pc/lnxboot.S
    trunk/grub2/boot/i386/pc/pxeboot.S
    trunk/grub2/bus/usb/ohci.c
    trunk/grub2/bus/usb/uhci.c
    trunk/grub2/bus/usb/usb.c
    trunk/grub2/bus/usb/usbtrans.c
    trunk/grub2/commands/acpi.c
    trunk/grub2/commands/blocklist.c
    trunk/grub2/commands/boot.c
    trunk/grub2/commands/cat.c
    trunk/grub2/commands/cmp.c
    trunk/grub2/commands/echo.c
    trunk/grub2/commands/efi/acpi.c
    trunk/grub2/commands/gptsync.c
    trunk/grub2/commands/help.c
    trunk/grub2/commands/i386/pc/acpi.c
    trunk/grub2/commands/i386/pc/drivemap.c
    trunk/grub2/commands/i386/pc/play.c
    trunk/grub2/commands/i386/pc/vbeinfo.c
    trunk/grub2/commands/i386/pc/vbetest.c
    trunk/grub2/commands/loadenv.c
    trunk/grub2/commands/ls.c
    trunk/grub2/commands/parttool.c
    trunk/grub2/commands/search.c
    trunk/grub2/commands/test.c
    trunk/grub2/commands/usbtest.c
    trunk/grub2/conf/i386-pc.rmk
    trunk/grub2/conf/powerpc-ieee1275.rmk
    trunk/grub2/conf/sparc64-ieee1275.rmk
    trunk/grub2/configure.ac
    trunk/grub2/disk/ata.c
    trunk/grub2/disk/efi/efidisk.c
    trunk/grub2/disk/fs_uuid.c
    trunk/grub2/disk/host.c
    trunk/grub2/disk/i386/pc/biosdisk.c
    trunk/grub2/disk/ieee1275/ofdisk.c
    trunk/grub2/disk/loopback.c
    trunk/grub2/disk/lvm.c
    trunk/grub2/disk/memdisk.c
    trunk/grub2/disk/raid.c
    trunk/grub2/disk/scsi.c
    trunk/grub2/disk/usbms.c
    trunk/grub2/docs/grub.texi
    trunk/grub2/docs/texinfo.tex
    trunk/grub2/efiemu/i386/loadcore32.c
    trunk/grub2/efiemu/i386/loadcore64.c
    trunk/grub2/efiemu/i386/pc/cfgtables.c
    trunk/grub2/efiemu/loadcore.c
    trunk/grub2/efiemu/loadcore_common.c
    trunk/grub2/efiemu/main.c
    trunk/grub2/efiemu/mm.c
    trunk/grub2/efiemu/pnvram.c
    trunk/grub2/efiemu/prepare.c
    trunk/grub2/efiemu/runtime/efiemu.S
    trunk/grub2/efiemu/runtime/efiemu.c
    trunk/grub2/efiemu/runtime/efiemu.sh
    trunk/grub2/efiemu/symbols.c
    trunk/grub2/font/font.c
    trunk/grub2/font/font_cmd.c
    trunk/grub2/fs/affs.c
    trunk/grub2/fs/afs.c
    trunk/grub2/fs/cpio.c
    trunk/grub2/fs/ext2.c
    trunk/grub2/fs/fat.c
    trunk/grub2/fs/fshelp.c
    trunk/grub2/fs/hfs.c
    trunk/grub2/fs/hfsplus.c
    trunk/grub2/fs/iso9660.c
    trunk/grub2/fs/jfs.c
    trunk/grub2/fs/minix.c
    trunk/grub2/fs/ntfs.c
    trunk/grub2/fs/reiserfs.c
    trunk/grub2/fs/sfs.c
    trunk/grub2/fs/udf.c
    trunk/grub2/fs/ufs.c
    trunk/grub2/fs/xfs.c
    trunk/grub2/genmk.rb
    trunk/grub2/genmoddep.awk
    trunk/grub2/include/grub/acpi.h
    trunk/grub2/include/grub/autoefi.h
    trunk/grub2/include/grub/datetime.h
    trunk/grub2/include/grub/disk.h
    trunk/grub2/include/grub/efi/api.h
    trunk/grub2/include/grub/efi/memory.h
    trunk/grub2/include/grub/efi/pe32.h
    trunk/grub2/include/grub/efiemu/efiemu.h
    trunk/grub2/include/grub/fs.h
    trunk/grub2/include/grub/hfs.h
    trunk/grub2/include/grub/i386/efiemu.h
    trunk/grub2/include/grub/i386/linux.h
    trunk/grub2/include/grub/i386/pc/biosdisk.h
    trunk/grub2/include/grub/i386/pc/memory.h
    trunk/grub2/include/grub/i386/pc/vbe.h
    trunk/grub2/include/grub/i386/tsc.h
    trunk/grub2/include/grub/i386/xnu.h
    trunk/grub2/include/grub/ieee1275/ieee1275.h
    trunk/grub2/include/grub/lvm.h
    trunk/grub2/include/grub/macho.h
    trunk/grub2/include/grub/machoload.h
    trunk/grub2/include/grub/memory.h
    trunk/grub2/include/grub/multiboot.h
    trunk/grub2/include/grub/multiboot2.h
    trunk/grub2/include/grub/net.h
    trunk/grub2/include/grub/partition.h
    trunk/grub2/include/grub/parttool.h
    trunk/grub2/include/grub/term.h
    trunk/grub2/include/grub/usbdesc.h
    trunk/grub2/include/grub/video.h
    trunk/grub2/include/grub/xnu.h
    trunk/grub2/include/multiboot.h
    trunk/grub2/io/gzio.c
    trunk/grub2/kern/corecmd.c
    trunk/grub2/kern/device.c
    trunk/grub2/kern/disk.c
    trunk/grub2/kern/dl.c
    trunk/grub2/kern/efi/efi.c
    trunk/grub2/kern/efi/init.c
    trunk/grub2/kern/efi/mm.c
    trunk/grub2/kern/env.c
    trunk/grub2/kern/err.c
    trunk/grub2/kern/file.c
    trunk/grub2/kern/fs.c
    trunk/grub2/kern/generic/millisleep.c
    trunk/grub2/kern/generic/rtc_get_time_ms.c
    trunk/grub2/kern/i386/dl.c
    trunk/grub2/kern/i386/ieee1275/init.c
    trunk/grub2/kern/i386/pc/init.c
    trunk/grub2/kern/i386/pc/lzo1x.S
    trunk/grub2/kern/i386/pc/mmap.c
    trunk/grub2/kern/i386/pc/startup.S
    trunk/grub2/kern/i386/realmode.S
    trunk/grub2/kern/i386/tsc.c
    trunk/grub2/kern/ieee1275/ieee1275.c
    trunk/grub2/kern/main.c
    trunk/grub2/kern/misc.c
    trunk/grub2/kern/parser.c
    trunk/grub2/kern/partition.c
    trunk/grub2/kern/powerpc/dl.c
    trunk/grub2/kern/sparc64/dl.c
    trunk/grub2/kern/term.c
    trunk/grub2/lib/envblk.c
    trunk/grub2/lib/i386/setjmp.S
    trunk/grub2/loader/efi/chainloader.c
    trunk/grub2/loader/i386/bsd.c
    trunk/grub2/loader/i386/bsd_helper.S
    trunk/grub2/loader/i386/bsd_pagetable.c
    trunk/grub2/loader/i386/bsd_trampoline.S
    trunk/grub2/loader/i386/efi/linux.c
    trunk/grub2/loader/i386/linux.c
    trunk/grub2/loader/i386/linux_trampoline.S
    trunk/grub2/loader/i386/multiboot.c
    trunk/grub2/loader/i386/multiboot_elfxx.c
    trunk/grub2/loader/i386/multiboot_helper.S
    trunk/grub2/loader/i386/pc/chainloader.c
    trunk/grub2/loader/i386/pc/linux.c
    trunk/grub2/loader/i386/pc/multiboot2.c
    trunk/grub2/loader/i386/pc/xnu.c
    trunk/grub2/loader/i386/xnu.c
    trunk/grub2/loader/i386/xnu_helper.S
    trunk/grub2/loader/macho.c
    trunk/grub2/loader/multiboot_loader.c
    trunk/grub2/loader/powerpc/ieee1275/linux.c
    trunk/grub2/loader/xnu.c
    trunk/grub2/loader/xnu_resume.c
    trunk/grub2/mmap/efi/mmap.c
    trunk/grub2/mmap/i386/mmap.c
    trunk/grub2/mmap/i386/pc/mmap.c
    trunk/grub2/mmap/i386/pc/mmap_helper.S
    trunk/grub2/mmap/i386/uppermem.c
    trunk/grub2/mmap/mmap.c
    trunk/grub2/normal/cmdline.c
    trunk/grub2/normal/completion.c
    trunk/grub2/normal/datetime.c
    trunk/grub2/normal/main.c
    trunk/grub2/normal/menu_entry.c
    trunk/grub2/normal/menu_viewer.c
    trunk/grub2/normal/misc.c
    trunk/grub2/partmap/acorn.c
    trunk/grub2/partmap/amiga.c
    trunk/grub2/partmap/apple.c
    trunk/grub2/partmap/gpt.c
    trunk/grub2/partmap/pc.c
    trunk/grub2/partmap/sun.c
    trunk/grub2/parttool/pcpart.c
    trunk/grub2/script/sh/function.c
    trunk/grub2/script/sh/lexer.c
    trunk/grub2/term/efi/console.c
    trunk/grub2/term/gfxterm.c
    trunk/grub2/term/i386/pc/serial.c
    trunk/grub2/term/i386/pc/vesafb.c
    trunk/grub2/term/i386/pc/vga.c
    trunk/grub2/term/ieee1275/ofconsole.c
    trunk/grub2/term/terminfo.c
    trunk/grub2/term/usb_keyboard.c
    trunk/grub2/util/console.c
    trunk/grub2/util/getroot.c
    trunk/grub2/util/grub-editenv.c
    trunk/grub2/util/grub-emu.c
    trunk/grub2/util/grub-macho2img.c
    trunk/grub2/util/grub-mkconfig.in
    trunk/grub2/util/grub-mkdevicemap.c
    trunk/grub2/util/grub-probe.c
    trunk/grub2/util/grub.d/10_hurd.in
    trunk/grub2/util/grub.d/30_os-prober.in
    trunk/grub2/util/hostdisk.c
    trunk/grub2/util/hostfs.c
    trunk/grub2/util/i386/efi/grub-mkimage.c
    trunk/grub2/util/i386/pc/grub-mkimage.c
    trunk/grub2/util/i386/pc/grub-setup.c
    trunk/grub2/util/lvm.c
    trunk/grub2/util/misc.c
    trunk/grub2/util/raid.c
    trunk/grub2/util/resolve.c
    trunk/grub2/util/usb.c
    trunk/grub2/video/bitmap.c
    trunk/grub2/video/readers/tga.c
    trunk/grub2/video/video.c

Modified: trunk/grub2/Makefile.in
===================================================================
--- trunk/grub2/Makefile.in     2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/Makefile.in     2009-06-10 21:04:23 UTC (rev 2293)
@@ -124,7 +124,7 @@
 SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS)
 
 CLEANFILES =
-MOSTLYCLEANFILES = 
+MOSTLYCLEANFILES =
 DISTCLEANFILES = config.status config.cache config.log config.h \
        Makefile stamp-h include/grub/cpu include/grub/machine \
        gensymlist.sh genkernsyms.sh build_env.mk

Modified: trunk/grub2/aclocal.m4
===================================================================
--- trunk/grub2/aclocal.m4      2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/aclocal.m4      2009-06-10 21:04:23 UTC (rev 2293)
@@ -232,7 +232,7 @@
 [whether an absolute indirect call/jump must not be prefixed with an asterisk])
 AC_CACHE_VAL(grub_cv_i386_asm_absolute_without_asterisk,
 [cat > conftest.s <<\EOF
-       lcall   *(offset)       
+       lcall   *(offset)
 offset:
        .long   0
        .word   0

Modified: trunk/grub2/boot/i386/pc/boot.S
===================================================================
--- trunk/grub2/boot/i386/pc/boot.S     2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/boot/i386/pc/boot.S     2009-06-10 21:04:23 UTC (rev 2293)
@@ -19,7 +19,7 @@
 
 #include <grub/boot.h>
 #include <grub/machine/boot.h>
-       
+
 /*
  *  defines for the code go here
  */
@@ -44,7 +44,7 @@
           in real mode. */
        .code16
 
-.globl _start, start; 
+.globl _start, start;
 _start:
 start:
        /*
@@ -70,7 +70,7 @@
        /* scratch space */
 mode:
        .byte   0
-disk_address_packet:   
+disk_address_packet:
 sectors:
        .long   0
 heads:
@@ -91,7 +91,7 @@
         * End of BIOS parameter block.
         */
 
-boot_version:  
+boot_version:
        .byte   GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
 kernel_address:
        .word   GRUB_BOOT_MACHINE_KERNEL_ADDR
@@ -99,7 +99,7 @@
        .word   GRUB_BOOT_MACHINE_KERNEL_SEG
 kernel_sector:
        .long   1, 0
-boot_drive:    
+boot_drive:
        .byte 0xff      /* the disk to load kernel from */
                        /* 0xff means use the boot drive */
 root_drive:
@@ -124,7 +124,7 @@
         jnz     1f
         movb    $0x80, %dl
 1:
-       
+
        /*
         * ljmp to the next instruction because some bogus BIOSes
         * jump to 07C0:0000 instead of 0000:7C00.
@@ -136,7 +136,7 @@
        ljmp    $0, $ABS(real_start)
 #endif
 
-real_start:    
+real_start:
 
        /* set up %ds and %ss as offset from 0 */
        xorw    %ax, %ax
@@ -176,17 +176,17 @@
 #else
        movw    $ABS(disk_address_packet), %si
 #endif
-       
+
        /* do not probe LBA if the drive is a floppy */
        testb   $GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
        jz      chs_mode
-                       
+
        /* check if LBA is supported */
        movb    $0x41, %ah
        movw    $0x55aa, %bx
        int     $0x13
 
-       /* 
+       /*
         *  %dl may have been clobbered by INT 13, AH=41H.
         *  This happens, for example, with AST BIOS 1.04.
         */
@@ -200,15 +200,15 @@
 
        andw    $1, %cx
        jz      chs_mode
-       
+
 lba_mode:
        xorw    %ax, %ax
        movw    %ax, 4(%si)
 
-       incw    %ax     
+       incw    %ax
        /* set the mode to non-zero */
        movb    %al, -1(%si)
-       
+
        /* the blocks */
        movw    %ax, 2(%si)
 
@@ -249,8 +249,8 @@
 
        movw    $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
        jmp     copy_buffer
-               
-chs_mode:      
+
+chs_mode:
        /*
         *  Determine the hard disk geometry from the BIOS!
         *  We do this first, so that LS-120 IDE floppies work correctly.
@@ -272,7 +272,7 @@
        /* set the mode to zero */
        movzbl  %dh, %eax
        movb    %ah, -1(%si)
-       
+
        /* save number of heads */
        incw    %ax
        movl    %eax, 4(%si)
@@ -303,7 +303,7 @@
 
        orl     %eax, %eax
        jnz     geometry_error
-       
+
        /* load logical sector start (bottom half) */
 #ifdef APPLE_CC
        movl    (kernel_sector_abs), %eax
@@ -371,7 +371,7 @@
        jc      read_error
 
        movw    %es, %bx
-       
+
 copy_buffer:
 #ifdef APPLE_CC
        kernel_segment_abs = ABS (kernel_segment)
@@ -386,14 +386,14 @@
         */
        pusha
        pushw   %ds
-       
+
        movw    $0x100, %cx
        movw    %bx, %ds
        xorw    %si, %si
        xorw    %di, %di
-       
+
        cld
-       
+
        rep
        movsw
 
@@ -472,7 +472,7 @@
         */
 
        . = _start + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC
-nt_magic:      
+nt_magic:
        .long 0
        .word 0
 
@@ -482,7 +482,7 @@
         *  sneaky, huh?
         */
 
-part_start:    
+part_start:
        . = _start + GRUB_BOOT_MACHINE_PART_START
 
 probe_values:

Modified: trunk/grub2/boot/i386/pc/cdboot.S
===================================================================
--- trunk/grub2/boot/i386/pc/cdboot.S   2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/boot/i386/pc/cdboot.S   2009-06-10 21:04:23 UTC (rev 2293)
@@ -88,7 +88,7 @@
 
         /* Root drive will default to boot drive */
         movb    $0xFF, %dh
-        
+
        ljmp    $(DATA_ADDR >> 4), $0
 
 /*

Modified: trunk/grub2/boot/i386/pc/diskboot.S
===================================================================
--- trunk/grub2/boot/i386/pc/diskboot.S 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/boot/i386/pc/diskboot.S 2009-06-10 21:04:23 UTC (rev 2293)
@@ -17,7 +17,7 @@
  */
 
 #include <grub/machine/boot.h>
-       
+
 /*
  *  defines for the code go here
  */
@@ -26,7 +26,7 @@
           This makes the assembler generate the address without support
           from the linker. (ELF can't relocate 16-bit addresses!) */
 #define ABS(x) (x-_start+GRUB_BOOT_MACHINE_KERNEL_ADDR)
-       
+
        /* Print message string */
 #ifdef APPLE_CC
 #define MSG(x) x ## _abs = ABS(x); mov $x ## _abs, %esi; call message
@@ -44,18 +44,18 @@
 
        .globl  start, _start
 start:
-_start:        
+_start:
        /*
         * _start is loaded at 0x2000 and is jumped to with
         * CS:IP 0:0x2000 in kernel.
         */
 
-       /* 
+       /*
         * we continue to use the stack for boot.img and assume that
         * some registers are set to correct values. See boot.S
         * for more information.
         */
-       
+
        /* save drive reference first thing! */
        pushw   %dx
 
@@ -63,7 +63,7 @@
        pushw   %si
        MSG(notification_string)
        popw    %si
-       
+
        /* this sets up for the first run through "bootloop" */
 #ifdef APPLE_CC
        firstlist_off_abs = ABS (firstlist - GRUB_BOOT_MACHINE_LIST_SIZE)
@@ -84,14 +84,14 @@
        /* if zero, go to the start function */
        je      bootit
 
-setup_sectors: 
+setup_sectors:
        /* check if we use LBA or CHS */
        cmpb    $0, -1(%si)
 
        /* jump to chs_mode if zero */
        je      chs_mode
 
-lba_mode:      
+lba_mode:
        /* load logical sector start */
        movl    (%di), %ebx
        movl    4(%di), %ecx
@@ -109,7 +109,7 @@
        /* if less than, set to total */
        movw    8(%di), %ax
 
-1:     
+1:
        /* subtract from total */
        subw    %ax, 8(%di)
 
@@ -154,8 +154,8 @@
 
        movw    $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
        jmp     copy_buffer
-                       
-chs_mode:      
+
+chs_mode:
        /* load logical sector start (top half) */
        movl    4(%di), %eax
        orl     %eax, %eax
@@ -202,7 +202,7 @@
        /* if less than, set to total */
        movw    8(%di), %ax
 
-2:     
+2:
        /* subtract from total */
        subw    %ax, 8(%di)
 
@@ -258,9 +258,9 @@
 
        /* save source segment */
        movw    %es, %bx
-       
-copy_buffer:   
 
+copy_buffer:
+
        /* load addresses for copy from disk buffer to destination */
        movw    10(%di), %es    /* load destination segment */
 
@@ -291,7 +291,7 @@
        rep             /* sets a repeat */
        movsw           /* this runs the actual copy */
 
-       /* restore addressing regs and print a dot with correct DS 
+       /* restore addressing regs and print a dot with correct DS
           (MSG modifies SI, which is saved, and unused AX and BX) */
        popw    %ds
        MSG(notification_step)
@@ -339,7 +339,7 @@
 
 notification_step:     .asciz "."
 notification_done:     .asciz "\r\n"
-       
+
 geometry_error_string: .asciz "Geom"
 read_error_string:     .asciz "Read"
 general_error_string:  .asciz " Error"
@@ -379,7 +379,7 @@
        .word 0
 
        . = _start + 0x200 - GRUB_BOOT_MACHINE_LIST_SIZE
-       
+
         /* fill the first data listing with the default */
 blocklist_default_start:
        /* this is the sector start parameter, in logical sectors from
@@ -392,5 +392,5 @@
 blocklist_default_seg:
        /* this is the segment of the starting address to load the data into */
        .word (GRUB_BOOT_MACHINE_KERNEL_SEG + 0x20)
-       
+
 firstlist:     /* this label has to be after the list data!!! */

Modified: trunk/grub2/boot/i386/pc/lnxboot.S
===================================================================
--- trunk/grub2/boot/i386/pc/lnxboot.S  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/boot/i386/pc/lnxboot.S  2009-06-10 21:04:23 UTC (rev 2293)
@@ -24,7 +24,7 @@
 #include <multiboot.h>
 
         .file   "lnxboot.S"
-               
+
 #ifdef APPLE_CC
 #error Building lnxboot.img with Apple's as results in an unusable image
 #endif
@@ -50,7 +50,7 @@
        . = data_start + 0x1F1
 
 setup_sects:
-/* Apple's cc can't fill this value.  */ 
+/* Apple's cc can't fill this value.  */
 #ifdef APPLE_CC
        .byte   0
 #else
@@ -135,8 +135,8 @@
 linux_init:
 
 #ifdef APPLE_CC
-       reg_edx_rel = reg_edx - start 
-       code32_start_rel = code32_start - start 
+       reg_edx_rel = reg_edx - start
+       code32_start_rel = code32_start - start
        movw    %cs:(reg_edx_rel), %dx
        movl    %cs:(code32_start_rel), %ebp
 #else

Modified: trunk/grub2/boot/i386/pc/pxeboot.S
===================================================================
--- trunk/grub2/boot/i386/pc/pxeboot.S  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/boot/i386/pc/pxeboot.S  2009-06-10 21:04:23 UTC (rev 2293)
@@ -21,16 +21,16 @@
 
        /* Start with the prehistoric environment... */
        .code16
-       
+
        /* Let's go */
-.globl start, _start; 
+.globl start, _start;
 _start:
-start: 
+start:
 
         /* Root drive will default to boot drive */
         movb   $0xFF, %dh
         movb   $0x7F, %dl
-        
+
        /* Jump to the real world */
        ljmp    $0, $0x8200
 

Modified: trunk/grub2/bus/usb/ohci.c
===================================================================
--- trunk/grub2/bus/usb/ohci.c  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/bus/usb/ohci.c  2009-06-10 21:04:23 UTC (rev 2293)
@@ -180,13 +180,13 @@
   /* Setup the HCCA.  */
   grub_ohci_writereg32 (o, GRUB_OHCI_REG_HCCA, (grub_uint32_t) o->hcca);
   grub_dprintf ("ohci", "OHCI HCCA\n");
- 
+
   /* Enable the OHCI.  */
   grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROL,
                        (2 << 6));
   grub_dprintf ("ohci", "OHCI enable: 0x%02x\n",
                (grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL) >> 6) & 3);
- 
+
   /* Link to ohci now that initialisation is successful.  */
   o->next = ohci;
   ohci = o;
@@ -227,7 +227,7 @@
 }
 
 static void
-grub_ohci_transaction (grub_ohci_td_t td, 
+grub_ohci_transaction (grub_ohci_td_t td,
                       grub_transfer_type_t type, unsigned int toggle,
                       grub_size_t size, char *data)
 {
@@ -305,7 +305,7 @@
       grub_usb_transaction_t tr = &transfer->transactions[i];
 
       grub_ohci_transaction (&td_list[i], tr->pid, tr->toggle,
-                            tr->size, tr->data); 
+                            tr->size, tr->data);
 
       td_list[i].next_td = grub_cpu_to_le32 (&td_list[i + 1]);
     }
@@ -607,5 +607,5 @@
 
 GRUB_MOD_FINI(ohci)
 {
-  grub_usb_controller_dev_unregister (&usb_controller);  
+  grub_usb_controller_dev_unregister (&usb_controller);
 }

Modified: trunk/grub2/bus/usb/uhci.c
===================================================================
--- trunk/grub2/bus/usb/uhci.c  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/bus/usb/uhci.c  2009-06-10 21:04:23 UTC (rev 2293)
@@ -450,7 +450,7 @@
 
       td = grub_uhci_transaction (u, transfer->endpoint, tr->pid,
                                  transfer->devaddr, tr->toggle,
-                                 tr->size, tr->data); 
+                                 tr->size, tr->data);
       if (! td)
        {
          /* Terminate and free.  */
@@ -517,7 +517,7 @@
          /* Check if a babble error occurred.  */
          if (errtd->ctrl_status & (1 << 20))
            err = GRUB_USB_ERR_BABBLE;
- 
+
          /* Check if a NAK occurred.  */
          if (errtd->ctrl_status & (1 << 19))
            err = GRUB_USB_ERR_NAK;

Modified: trunk/grub2/bus/usb/usb.c
===================================================================
--- trunk/grub2/bus/usb/usb.c   2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/bus/usb/usb.c   2009-06-10 21:04:23 UTC (rev 2293)
@@ -236,7 +236,7 @@
 
       /* Skip the configuration descriptor.  */
       pos = sizeof (struct grub_usb_desc_config);
-      
+
       /* Read all interfaces.  */
       for (currif = 0; currif < dev->config[i].descconf->numif; currif++)
        {

Modified: trunk/grub2/bus/usb/usbtrans.c
===================================================================
--- trunk/grub2/bus/usb/usbtrans.c      2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/bus/usb/usbtrans.c      2009-06-10 21:04:23 UTC (rev 2293)
@@ -54,7 +54,7 @@
     max = 64;
 
   datablocks = (size + max - 1) / max;
-  
+
   /* XXX: Discriminate between different types of control
      messages.  */
   transfer->transcnt = datablocks + 2;
@@ -110,7 +110,7 @@
     transfer->transactions[datablocks + 1].pid = GRUB_USB_TRANSFER_TYPE_OUT;
   else
     transfer->transactions[datablocks + 1].pid = GRUB_USB_TRANSFER_TYPE_IN;
-  
+
   transfer->transactions[datablocks + 1].toggle = 1;
 
   err = dev->controller.dev->transfer (&dev->controller, transfer);
@@ -184,7 +184,7 @@
       tr->data = &data[i * max];
       size -= tr->size;
     }
- 
+
   err = dev->controller.dev->transfer (&dev->controller, transfer);
   grub_dprintf ("usb", "toggle=%d\n", toggle);
   dev->toggle[endpoint] = toggle;

Modified: trunk/grub2/commands/acpi.c
===================================================================
--- trunk/grub2/commands/acpi.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/acpi.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -36,22 +36,22 @@
 #endif
 
 static const struct grub_arg_option options[] = {
-  {"exclude", 'x', 0, 
-   "Don't load host tables specified by comma-separated list", 
+  {"exclude", 'x', 0,
+   "Don't load host tables specified by comma-separated list",
    0, ARG_TYPE_STRING},
-  {"load-only", 'n', 0, 
+  {"load-only", 'n', 0,
    "Load only tables specified by comma-separated list", 0, ARG_TYPE_STRING},
   {"v1", '1', 0, "Expose v1 tables", 0, ARG_TYPE_NONE},
   {"v2", '2', 0, "Expose v2 and v3 tables", 0, ARG_TYPE_NONE},
   {"oemid", 'o', 0, "Set OEMID of RSDP, XSDT and RSDT", 0, ARG_TYPE_STRING},
-  {"oemtable", 't', 0, 
-   "Set OEMTABLE ID of RSDP, XSDT and RSDT", 0, ARG_TYPE_STRING},  
-  {"oemtablerev", 'r', 0, 
-   "Set OEMTABLE revision of RSDP, XSDT and RSDT", 0, ARG_TYPE_INT},  
-  {"oemtablecreator", 'c', 0, 
-   "Set creator field of RSDP, XSDT and RSDT", 0, ARG_TYPE_STRING},  
-  {"oemtablecreatorrev", 'd', 0, 
-   "Set creator revision of RSDP, XSDT and RSDT", 0, ARG_TYPE_INT},  
+  {"oemtable", 't', 0,
+   "Set OEMTABLE ID of RSDP, XSDT and RSDT", 0, ARG_TYPE_STRING},
+  {"oemtablerev", 'r', 0,
+   "Set OEMTABLE revision of RSDP, XSDT and RSDT", 0, ARG_TYPE_INT},
+  {"oemtablecreator", 'c', 0,
+   "Set creator field of RSDP, XSDT and RSDT", 0, ARG_TYPE_STRING},
+  {"oemtablecreatorrev", 'd', 0,
+   "Set creator revision of RSDP, XSDT and RSDT", 0, ARG_TYPE_INT},
   {"no-ebda", 'e', 0, "Don't update EBDA. May fix failures or hangs on some"
    " BIOSes but makes it ineffective with OS not receiving RSDP from GRUB",
    0, ARG_TYPE_NONE},
@@ -59,7 +59,7 @@
 };
 
 /* Simple checksum by summing all bytes. Used by ACPI and SMBIOS. */
-grub_uint8_t 
+grub_uint8_t
 grub_byte_checksum (void *base, grub_size_t size)
 {
   grub_uint8_t *ptr;
@@ -70,7 +70,7 @@
   return ret;
 }
 
-/* rev1 is 1 if ACPIv1 is to be generated, 0 otherwise. 
+/* rev1 is 1 if ACPIv1 is to be generated, 0 otherwise.
    rev2 contains the revision of ACPIv2+ to generate or 0 if none. */
 static int rev1, rev2;
 /* OEMID of RSDP, RSDT and XSDT. */
@@ -128,7 +128,7 @@
   return grub_machine_acpi_get_rsdpv1 ();
 }
 
-static inline int 
+static inline int
 iszero (grub_uint8_t *reg, int size)
 {
   int i;
@@ -138,7 +138,7 @@
   return 1;
 }
 
-grub_err_t 
+grub_err_t
 grub_acpi_create_ebda (void)
 {
   int ebda_kb_len;
@@ -149,9 +149,9 @@
   grub_uint8_t *targetebda, *target;
   struct grub_acpi_rsdp_v10 *v1;
   struct grub_acpi_rsdp_v20 *v2;
-  auto int NESTED_FUNC_ATTR find_hook (grub_uint64_t, grub_uint64_t, 
+  auto int NESTED_FUNC_ATTR find_hook (grub_uint64_t, grub_uint64_t,
                                       grub_uint32_t);
-  int NESTED_FUNC_ATTR find_hook (grub_uint64_t start, grub_uint64_t size, 
+  int NESTED_FUNC_ATTR find_hook (grub_uint64_t start, grub_uint64_t size,
                                  grub_uint32_t type)
   {
     grub_uint64_t end = start + size;
@@ -164,7 +164,7 @@
       highestlow = (end - ebda_len) & (~0xf);
     return 0;
   }
-  
+
   ebda = (grub_uint8_t *) UINT_TO_PTR ((*((grub_uint16_t *)0x40e)) << 4);
   ebda_kb_len = *(grub_uint16_t *) ebda;
   if (! ebda || ebda_kb_len > 16)
@@ -177,10 +177,10 @@
   grub_dprintf ("acpi", "creating ebda @%llx\n",
                (unsigned long long) highestlow);
   if (! highestlow)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+    return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                       "couldn't find space for the new EBDA");
 
-  mmapregion = grub_mmap_register (PTR_TO_UINT64 (targetebda), ebda_len, 
+  mmapregion = grub_mmap_register (PTR_TO_UINT64 (targetebda), ebda_len,
                                   GRUB_MACHINE_MEMORY_RESERVED);
   if (! mmapregion)
     return grub_errno;
@@ -198,13 +198,13 @@
   if (v2 && v2->length > 40)
     v2 = 0;
 
-  /* First try to replace already existing rsdp. */ 
+  /* First try to replace already existing rsdp. */
   if (v2)
     {
       grub_dprintf ("acpi", "Scanning EBDA for old rsdpv2\n");
       for (; target < targetebda + 0x400 - v2->length; target += 0x10)
        if (grub_memcmp (target, "RSD PTR ", 8) == 0
-           && grub_byte_checksum (target, 
+           && grub_byte_checksum (target,
                                   sizeof (struct grub_acpi_rsdp_v10)) == 0
            && ((struct grub_acpi_rsdp_v10 *) target)->revision != 0
            && ((struct grub_acpi_rsdp_v20 *) target)->length <= v2->length)
@@ -222,10 +222,10 @@
   if (v1)
     {
       grub_dprintf ("acpi", "Scanning EBDA for old rsdpv1\n");
-      for (; target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10); 
+      for (; target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10);
           target += 0x10)
        if (grub_memcmp (target, "RSD PTR ", 8) == 0
-           && grub_byte_checksum (target, 
+           && grub_byte_checksum (target,
                                   sizeof (struct grub_acpi_rsdp_v10)) == 0)
          {
            grub_memcpy (target, v1, sizeof (struct grub_acpi_rsdp_v10));
@@ -260,7 +260,7 @@
   if (v1)
     {
       grub_dprintf ("acpi", "Scanning EBDA for block of zeros\n");
-      for (; target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10); 
+      for (; target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10);
           target += 0x10)
        if (iszero (target, sizeof (struct grub_acpi_rsdp_v10)))
          {
@@ -277,16 +277,16 @@
   if (v1 || v2)
     {
       grub_mmap_unregister (mmapregion);
-      return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+      return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                         "Couldn't find suitable spot in EBDA");
     }
 
   /* Remove any other RSDT. */
-  for (target = targetebda; 
-       target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10); 
+  for (target = targetebda;
+       target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10);
        target += 0x10)
     if (grub_memcmp (target, "RSD PTR ", 8) == 0
-       && grub_byte_checksum (target, 
+       && grub_byte_checksum (target,
                               sizeof (struct grub_acpi_rsdp_v10)) == 0
        && target != v1inebda && target != v2inebda)
       *target = 0;
@@ -312,7 +312,7 @@
   grub_free (table_dsdt);
   table_dsdt = playground_ptr;
   playground_ptr += dsdt_size;
-  
+
   /* Treat other tables. */
   for (cur = acpi_tables; cur; cur = cur->next)
     {
@@ -342,7 +342,7 @@
          fadt->hdr.checksum = 1 + ~grub_byte_checksum (fadt, fadt->hdr.length);
        }
     }
- 
+
   /* Fill RSDT entries. */
   numoftables = 0;
   for (cur = acpi_tables; cur; cur = cur->next)
@@ -365,7 +365,7 @@
 
   for (cur = acpi_tables; cur; cur = cur->next)
     *(rsdt_entry++) = PTR_TO_UINT32 (cur->addr);
-  
+
   /* Recompute checksum. */
   rsdt->checksum = 0;
   rsdt->checksum = 1 + ~grub_byte_checksum (rsdt, rsdt->length);
@@ -383,8 +383,8 @@
   rsdpv1_new->revision = 0;
   rsdpv1_new->rsdt_addr = PTR_TO_UINT32 (rsdt_addr);
   rsdpv1_new->checksum = 0;
-  rsdpv1_new->checksum = 1 + ~grub_byte_checksum (rsdpv1_new, 
-                                                 sizeof (*rsdpv1_new));  
+  rsdpv1_new->checksum = 1 + ~grub_byte_checksum (rsdpv1_new,
+                                                 sizeof (*rsdpv1_new));
   grub_dprintf ("acpi", "Generated ACPIv1 tables\n");
 }
 
@@ -421,19 +421,19 @@
   /* Create RSDPv2. */
   rsdpv2_new = (struct grub_acpi_rsdp_v20 *) playground_ptr;
   playground_ptr += sizeof (struct grub_acpi_rsdp_v20);
-  grub_memcpy (&(rsdpv2_new->rsdpv1.signature), "RSD PTR ", 
+  grub_memcpy (&(rsdpv2_new->rsdpv1.signature), "RSD PTR ",
               sizeof (rsdpv2_new->rsdpv1.signature));
-  grub_memcpy (&(rsdpv2_new->rsdpv1.oemid), root_oemid, 
+  grub_memcpy (&(rsdpv2_new->rsdpv1.oemid), root_oemid,
               sizeof (rsdpv2_new->rsdpv1.oemid));
   rsdpv2_new->rsdpv1.revision = rev2;
   rsdpv2_new->rsdpv1.rsdt_addr = PTR_TO_UINT32 (rsdt_addr);
   rsdpv2_new->rsdpv1.checksum = 0;
-  rsdpv2_new->rsdpv1.checksum = 1 + ~grub_byte_checksum 
+  rsdpv2_new->rsdpv1.checksum = 1 + ~grub_byte_checksum
     (&(rsdpv2_new->rsdpv1), sizeof (rsdpv2_new->rsdpv1));
   rsdpv2_new->length = sizeof (*rsdpv2_new);
   rsdpv2_new->xsdt_addr = PTR_TO_UINT64 (xsdt);
   rsdpv2_new->checksum = 0;
-  rsdpv2_new->checksum = 1 + ~grub_byte_checksum (rsdpv2_new, 
+  rsdpv2_new->checksum = 1 + ~grub_byte_checksum (rsdpv2_new,
                                                  rsdpv2_new->length);
   grub_dprintf ("acpi", "Generated ACPIv2 tables\n");
 }
@@ -465,7 +465,7 @@
   grub_err_t err;
   int i, mmapregion;
   int numoftables;
-  
+
   /* Default values if no RSDP is found. */
   rev1 = 1;
   rev2 = 3;
@@ -473,7 +473,7 @@
   facs_addr = 0;
   playground = playground_ptr = 0;
   playground_size = 0;
-  
+
   rsdp = (struct grub_acpi_rsdp_v10 *) grub_machine_acpi_get_rsdpv2 ();
 
   if (! rsdp)
@@ -508,37 +508,37 @@
       rsdt = (struct grub_acpi_table_header *) UINT_TO_PTR (rsdp->rsdt_addr);
       /* Load host tables. */
       for (entry_ptr = (grub_uint32_t *) (rsdt + 1);
-          entry_ptr < (grub_uint32_t *) (((grub_uint8_t *) rsdt) 
+          entry_ptr < (grub_uint32_t *) (((grub_uint8_t *) rsdt)
                                          + rsdt->length);
           entry_ptr++)
        {
          char signature[5];
          struct efiemu_acpi_table *table;
-         struct grub_acpi_table_header *curtable 
+         struct grub_acpi_table_header *curtable
            = (struct grub_acpi_table_header *) UINT_TO_PTR (*entry_ptr);
          signature[4] = 0;
          for (i = 0; i < 4;i++)
            signature[i] = grub_tolower (curtable->signature[i]);
-         
+
          /* If it's FADT it contains addresses of DSDT and FACS. */
          if (grub_strcmp (signature, "facp") == 0)
            {
              struct grub_acpi_table_header *dsdt;
              struct grub_acpi_fadt *fadt = (struct grub_acpi_fadt *) curtable;
 
-             /* Set root header variables to the same values 
+             /* Set root header variables to the same values
                 as FACP by default. */
-             grub_memcpy (&root_oemid, &(fadt->hdr.oemid), 
+             grub_memcpy (&root_oemid, &(fadt->hdr.oemid),
                           sizeof (root_oemid));
-             grub_memcpy (&root_oemtable, &(fadt->hdr.oemtable), 
+             grub_memcpy (&root_oemtable, &(fadt->hdr.oemtable),
                           sizeof (root_oemtable));
              root_oemrev = fadt->hdr.oemrev;
-             grub_memcpy (&root_creator_id, &(fadt->hdr.creator_id), 
+             grub_memcpy (&root_creator_id, &(fadt->hdr.creator_id),
                           sizeof (root_creator_id));
              root_creator_rev = fadt->hdr.creator_rev;
 
              /* Load DSDT if not excluded. */
-             dsdt = (struct grub_acpi_table_header *) 
+             dsdt = (struct grub_acpi_table_header *)
                UINT_TO_PTR (fadt->dsdt_addr);
              if (dsdt && (! exclude || ! grub_strword (exclude, "dsdt"))
                  && (! load_only || grub_strword (load_only, "dsdt"))
@@ -551,7 +551,7 @@
                      free_tables ();
                      grub_free (exclude);
                      grub_free (load_only);
-                     return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+                     return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                                         "Could allocate table");
                    }
                  grub_memcpy (table_dsdt, dsdt, dsdt->length);
@@ -560,7 +560,7 @@
              /* Save FACS address. FACS shouldn't be overridden. */
              facs_addr = fadt->facs_addr;
            }
-  
+
          /* Skip excluded tables. */
          if (exclude && grub_strword (exclude, signature))
            continue;
@@ -570,15 +570,15 @@
          /* Sanity check. */
          if (curtable->length < sizeof (*curtable))
            continue;
-         
-         table = (struct efiemu_acpi_table *) grub_malloc 
+
+         table = (struct efiemu_acpi_table *) grub_malloc
            (sizeof (struct efiemu_acpi_table));
          if (! table)
            {
              free_tables ();
              grub_free (exclude);
              grub_free (load_only);
-             return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+             return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                                 "Could allocate table structure");
            }
          table->size = curtable->length;
@@ -587,7 +587,7 @@
          if (! table->addr)
            {
              free_tables ();
-             return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+             return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                                 "Could allocate table");
            }
          table->next = acpi_tables;
@@ -595,7 +595,7 @@
          grub_memcpy (table->addr, curtable, table->size);
        }
       grub_free (exclude);
-      grub_free (load_only);      
+      grub_free (load_only);
     }
 
   /* Does user specify versions to generate? */
@@ -647,7 +647,7 @@
        {
          grub_file_close (file);
          free_tables ();
-         return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+         return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                             "couldn't read file %s", args[i]);
        }
 
@@ -657,9 +657,9 @@
          free_tables ();
          return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[i]);
        }
-      grub_file_close (file);      
+      grub_file_close (file);
 
-      if (grub_memcmp (((struct grub_acpi_table_header *) buf)->signature, 
+      if (grub_memcmp (((struct grub_acpi_table_header *) buf)->signature,
                       "DSDT", 4) == 0)
        {
          grub_free (table_dsdt);
@@ -669,12 +669,12 @@
       else
        {
          struct efiemu_acpi_table *table;
-         table = (struct efiemu_acpi_table *) grub_malloc 
+         table = (struct efiemu_acpi_table *) grub_malloc
            (sizeof (struct efiemu_acpi_table));
          if (! table)
            {
              free_tables ();
-             return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+             return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                                 "Could allocate table structure");
            }
 
@@ -698,15 +698,15 @@
   playground_size += sizeof (struct grub_acpi_table_header) + 8 * numoftables;
   /* RSDPv2. */
   playground_size += sizeof (struct grub_acpi_rsdp_v20);
-  
-  playground = playground_ptr 
+
+  playground = playground_ptr
     = grub_mmap_malign_and_register (1, playground_size, &mmapregion,
                                     GRUB_MACHINE_MEMORY_ACPI, 0);
 
   if (! playground)
     {
       free_tables ();
-      return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+      return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                         "Couldn't allocate space for ACPI tables");
     }
 
@@ -741,9 +741,9 @@
     struct grub_efi_guid acpi = GRUB_EFI_ACPI_TABLE_GUID;
     struct grub_efi_guid acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
 
-    grub_efi_system_table->boot_services->install_configuration_table 
+    grub_efi_system_table->boot_services->install_configuration_table
       (&acpi20, grub_acpi_get_rsdpv2 ());
-    grub_efi_system_table->boot_services->install_configuration_table 
+    grub_efi_system_table->boot_services->install_configuration_table
       (&acpi, grub_acpi_get_rsdpv1 ());
   }
 #endif
@@ -755,13 +755,13 @@
 
 GRUB_MOD_INIT(acpi)
 {
-  cmd = grub_register_extcmd ("acpi", grub_cmd_acpi, 
+  cmd = grub_register_extcmd ("acpi", grub_cmd_acpi,
                              GRUB_COMMAND_FLAG_BOTH,
                              "acpi [-1|-2] [--exclude=table1,table2|"
                              "--load-only=table1,table2] filename1 "
                              " [filename2] [...]",
                              "Load host acpi tables and tables "
-                             "specified by arguments", 
+                             "specified by arguments",
                              options);
 }
 

Modified: trunk/grub2/commands/blocklist.c
===================================================================
--- trunk/grub2/commands/blocklist.c    2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/blocklist.c    2009-06-10 21:04:23 UTC (rev 2293)
@@ -39,7 +39,7 @@
                            unsigned length);
   auto void NESTED_FUNC_ATTR print_blocklist (grub_disk_addr_t sector, 
unsigned num,
                             unsigned offset, unsigned length);
-  
+
   void NESTED_FUNC_ATTR read_blocklist (grub_disk_addr_t sector, unsigned 
offset,
                       unsigned length)
     {
@@ -51,7 +51,7 @@
              num_sectors++;
              return;
            }
-         
+
          print_blocklist (start_sector, num_sectors, 0, 0);
          num_sectors = 0;
        }
@@ -64,7 +64,7 @@
       else
        print_blocklist (sector, 0, offset, length);
     }
-  
+
   void NESTED_FUNC_ATTR print_blocklist (grub_disk_addr_t sector, unsigned num,
                        unsigned offset, unsigned length)
     {
@@ -77,7 +77,7 @@
       if (offset != 0 || length != 0)
        grub_printf ("[%u-%u]", offset, offset + length);
     }
-  
+
   if (argc < 1)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "no file specified");
 
@@ -91,7 +91,7 @@
 
   if (file->device->disk->partition)
     part_start = grub_partition_get_start (file->device->disk->partition);
-  
+
   file->read_hook = read_blocklist;
 
   while (grub_file_read (file, buf, sizeof (buf)) > 0)
@@ -99,7 +99,7 @@
 
   if (num_sectors > 0)
     print_blocklist (start_sector, num_sectors, 0, 0);
-  
+
   grub_file_close (file);
 
   return grub_errno;

Modified: trunk/grub2/commands/boot.c
===================================================================
--- trunk/grub2/commands/boot.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/boot.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -38,7 +38,7 @@
 };
 
 static int grub_loader_loaded;
-static struct grub_preboot_t *preboots_head = 0, 
+static struct grub_preboot_t *preboots_head = 0,
   *preboots_tail = 0;
 
 int
@@ -58,7 +58,7 @@
   if (! preboot_func && ! preboot_rest_func)
     return 0;
 
-  new_preboot = (struct grub_preboot_t *) 
+  new_preboot = (struct grub_preboot_t *)
     grub_malloc (sizeof (struct grub_preboot_t));
   if (! new_preboot)
     {
@@ -92,7 +92,7 @@
   return new_preboot;
 }
 
-void 
+void
 grub_loader_unregister_preboot_hook (void *hnd)
 {
   struct grub_preboot_t *preb = hnd;
@@ -116,11 +116,11 @@
 {
   if (grub_loader_loaded && grub_loader_unload_func)
     grub_loader_unload_func ();
-  
+
   grub_loader_boot_func = boot;
   grub_loader_unload_func = unload;
   grub_loader_noreturn = noreturn;
-  
+
   grub_loader_loaded = 1;
 }
 
@@ -129,7 +129,7 @@
 {
   if (grub_loader_loaded && grub_loader_unload_func)
     grub_loader_unload_func ();
-  
+
   grub_loader_boot_func = 0;
   grub_loader_unload_func = 0;
 
@@ -161,7 +161,7 @@
   err = (grub_loader_boot_func) ();
 
   for (cur = preboots_tail; cur; cur = cur->prev)
-    if (! err) 
+    if (! err)
       err = cur->preboot_rest_func ();
     else
       cur->preboot_rest_func ();

Modified: trunk/grub2/commands/cat.c
===================================================================
--- trunk/grub2/commands/cat.c  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/cat.c  2009-06-10 21:04:23 UTC (rev 2293)
@@ -41,16 +41,16 @@
   file = grub_gzfile_open (args[0], 1);
   if (! file)
     return 0;
-  
+
   while ((size = grub_file_read (file, buf, sizeof (buf))) > 0
         && key != GRUB_TERM_ESC)
     {
       int i;
-      
+
       for (i = 0; i < size; i++)
        {
          unsigned char c = buf[i];
-         
+
          if ((grub_isprint (c) || grub_isspace (c)) && c != '\r')
            grub_putchar (c);
          else
@@ -69,7 +69,7 @@
   grub_putchar ('\n');
   grub_refresh ();
   grub_file_close (file);
-  
+
   return 0;
 }
 

Modified: trunk/grub2/commands/cmp.c
===================================================================
--- trunk/grub2/commands/cmp.c  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/cmp.c  2009-06-10 21:04:23 UTC (rev 2293)
@@ -49,7 +49,7 @@
     goto cleanup;
 
   if (grub_file_size (file1) != grub_file_size (file2))
-    grub_printf ("Differ in size: %llu [%s], %llu [%s]\n", 
+    grub_printf ("Differ in size: %llu [%s], %llu [%s]\n",
                 (unsigned long long) grub_file_size (file1), args[0],
                 (unsigned long long) grub_file_size (file2), args[1]);
   else
@@ -58,14 +58,14 @@
 
       buf1 = grub_malloc (BUFFER_SIZE);
       buf2 = grub_malloc (BUFFER_SIZE);
-      
+
       if (! buf1 || ! buf2)
         goto cleanup;
-      
+
       do
        {
          int i;
-         
+
          rd1 = grub_file_read (file1, buf1, BUFFER_SIZE);
          rd2 = grub_file_read (file2, buf2, BUFFER_SIZE);
 
@@ -83,15 +83,15 @@
                }
            }
          pos += BUFFER_SIZE;
-         
+
        }
       while (rd2);
-      
+
       grub_printf ("The files are identical.\n");
     }
 
 cleanup:
-  
+
   if (buf1)
     grub_free (buf1);
   if (buf2)

Modified: trunk/grub2/commands/echo.c
===================================================================
--- trunk/grub2/commands/echo.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/echo.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -90,7 +90,7 @@
              arg++;
              continue;
            }
-         
+
          /* This was not an escaped character, or escaping is not
             enabled.  */
          grub_printf ("%c", *arg);

Modified: trunk/grub2/commands/efi/acpi.c
===================================================================
--- trunk/grub2/commands/efi/acpi.c     2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/efi/acpi.c     2009-06-10 21:04:23 UTC (rev 2293)
@@ -34,7 +34,7 @@
        &grub_efi_system_table->configuration_table[i].vendor_guid;
 
       if (! grub_memcmp (guid, &acpi_guid, sizeof (grub_efi_guid_t)))
-       return (struct grub_acpi_rsdp_v10 *) 
+       return (struct grub_acpi_rsdp_v10 *)
          grub_efi_system_table->configuration_table[i].vendor_table;
     }
   return 0;
@@ -52,7 +52,7 @@
        &grub_efi_system_table->configuration_table[i].vendor_guid;
 
       if (! grub_memcmp (guid, &acpi20_guid, sizeof (grub_efi_guid_t)))
-       return (struct grub_acpi_rsdp_v20 *) 
+       return (struct grub_acpi_rsdp_v20 *)
          grub_efi_system_table->configuration_table[i].vendor_table;
     }
   return 0;

Modified: trunk/grub2/commands/gptsync.c
===================================================================
--- trunk/grub2/commands/gptsync.c      2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/gptsync.c      2009-06-10 21:04:23 UTC (rev 2293)
@@ -30,33 +30,33 @@
 
 /* Convert a LBA address to a CHS address in the INT 13 format.  */
 /* Taken from grub1. */
-/* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63. 
+/* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63.
    Is it a problem?
 */
-static void 
-lba_to_chs (int lba, grub_uint8_t *cl, grub_uint8_t *ch, 
+static void
+lba_to_chs (int lba, grub_uint8_t *cl, grub_uint8_t *ch,
            grub_uint8_t *dh)
 {
   int cylinder, head, sector;
   int sectors = 63, heads = 255, cylinders = 1024;
-  
+
   sector = lba % sectors + 1;
   head = (lba / sectors) % heads;
   cylinder = lba / (sectors * heads);
-  
+
   if (cylinder >= cylinders)
     {
       *cl = *ch = *dh = 0xff;
       return;
     }
-  
+
   *cl = sector | ((cylinder & 0x300) >> 2);
   *ch = cylinder & 0xFF;
   *dh = head;
 }
 
 static grub_err_t
-grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)), 
+grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)),
                  int argc, char **args)
 {
   grub_device_t dev;
@@ -74,11 +74,11 @@
   if (args[0][0] == '(' && args[0][grub_strlen (args[0]) - 1] == ')')
     {
       args[0][grub_strlen (args[0]) - 1] = 0;
-      dev = grub_device_open (args[0] + 1); 
+      dev = grub_device_open (args[0] + 1);
       args[0][grub_strlen (args[0])] = ')';
     }
   else
-    dev = grub_device_open (args[0]); 
+    dev = grub_device_open (args[0]);
 
   if (! dev)
     return grub_errno;
@@ -99,7 +99,7 @@
   /* Check if it is valid.  */
   if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE))
     {
-      grub_device_close (dev);    
+      grub_device_close (dev);
       return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature");
     }
 
@@ -109,7 +109,7 @@
       grub_device_close (dev);
       return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map 
found");
     }
-  
+
   int i;
   first_sector = dev->disk->total_sectors;
   for (i = 1; i < argc; i++)
@@ -128,20 +128,20 @@
       if (separator)
        *separator = csep;
       if (! partition)
-       {  
+       {
          grub_device_close (dev);
          return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such partition");
        }
 
       if (partition->start + partition->len > 0xffffffff)
-       {  
+       {
          grub_device_close (dev);
-         return grub_error (GRUB_ERR_OUT_OF_RANGE, 
+         return grub_error (GRUB_ERR_OUT_OF_RANGE,
                             "only partitions resding in the first 2TB "
                             "can be presen in hybrid MBR");
        }
-       
 
+
       if (first_sector > partition->start)
        first_sector = partition->start;
 
@@ -182,17 +182,17 @@
          if (numactive == 2)
            {
              grub_device_close (dev);
-             return grub_error (GRUB_ERR_BAD_ARGUMENT, 
+             return grub_error (GRUB_ERR_BAD_ARGUMENT,
                                 "only one partition can be active");
            }
        }
       mbr.entries[i].type = type;
       mbr.entries[i].start = grub_cpu_to_le32 (partition->start);
-      lba_to_chs (partition->start, 
+      lba_to_chs (partition->start,
                  &(mbr.entries[i].start_sector),
                  &(mbr.entries[i].start_cylinder),
                  &(mbr.entries[i].start_head));
-      lba_to_chs (partition->start + partition->len - 1, 
+      lba_to_chs (partition->start + partition->len - 1,
                  &(mbr.entries[i].end_sector),
                  &(mbr.entries[i].end_cylinder),
                  &(mbr.entries[i].end_head));
@@ -210,11 +210,11 @@
   mbr.entries[0].flag = 0;
   mbr.entries[0].type = GRUB_PC_PARTITION_TYPE_GPT_DISK;
   mbr.entries[0].start = grub_cpu_to_le32 (1);
-  lba_to_chs (1, 
+  lba_to_chs (1,
              &(mbr.entries[0].start_sector),
              &(mbr.entries[0].start_cylinder),
              &(mbr.entries[0].start_head));
-  lba_to_chs (first_sector, 
+  lba_to_chs (first_sector,
              &(mbr.entries[0].end_sector),
              &(mbr.entries[0].end_cylinder),
              &(mbr.entries[0].end_head));
@@ -239,8 +239,8 @@
 GRUB_MOD_INIT(gptsync)
 {
   (void) mod;                  /* To stop warning. */
-  cmd = grub_register_command ("gptsync", grub_cmd_gptsync, 
-                              "gptsync DEVICE [PARTITION[+/-[TYPE]]] ...", 
+  cmd = grub_register_command ("gptsync", grub_cmd_gptsync,
+                              "gptsync DEVICE [PARTITION[+/-[TYPE]]] ...",
                               "Fill hybrid MBR of GPT drive DEVICE. "
                               "specified partitions will be a part "
                               "of hybrid mbr. Up to 3 partitions are "

Modified: trunk/grub2/commands/help.c
===================================================================
--- trunk/grub2/commands/help.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/help.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -28,7 +28,7 @@
 {
   int cnt = 0;
   char *currarg;
-  
+
   auto int print_command_info (grub_command_t cmd);
   auto int print_command_help (grub_command_t cmd);
 
@@ -61,7 +61,7 @@
            {
              if (cnt++ > 0)
                grub_printf ("\n\n");
-             
+
              if (cmd->flags & GRUB_COMMAND_FLAG_EXTCMD)
                grub_arg_show_help ((grub_extcmd_t) cmd->data);
              else
@@ -71,20 +71,20 @@
        }
       return 0;
     }
-  
+
   if (argc == 0)
     grub_command_iterate (print_command_info);
   else
     {
       int i;
-      
+
       for (i = 0; i < argc; i++)
        {
          currarg = args[i];
          grub_command_iterate (print_command_help);
        }
     }
-  
+
   return 0;
 }
 

Modified: trunk/grub2/commands/i386/pc/acpi.c
===================================================================
--- trunk/grub2/commands/i386/pc/acpi.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/i386/pc/acpi.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -26,7 +26,7 @@
   int ebda_len;
   grub_uint8_t *ebda, *ptr;
 
-  grub_dprintf ("acpi", "Looking for RSDP. Scanning EBDA\n");  
+  grub_dprintf ("acpi", "Looking for RSDP. Scanning EBDA\n");
   ebda = (grub_uint8_t *) ((* ((grub_uint16_t *) 0x40e)) << 4);
   ebda_len = * (grub_uint16_t *) ebda;
   if (! ebda_len)
@@ -37,7 +37,7 @@
        && ((struct grub_acpi_rsdp_v10 *) ptr)->revision == 0)
       return (struct grub_acpi_rsdp_v10 *) ptr;
 
-  grub_dprintf ("acpi", "Looking for RSDP. Scanning BIOS\n");  
+  grub_dprintf ("acpi", "Looking for RSDP. Scanning BIOS\n");
   for (ptr = (grub_uint8_t *) 0xe0000; ptr < (grub_uint8_t *) 0x100000;
        ptr += 16)
     if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
@@ -53,7 +53,7 @@
   int ebda_len;
   grub_uint8_t *ebda, *ptr;
 
-  grub_dprintf ("acpi", "Looking for RSDP. Scanning EBDA\n");  
+  grub_dprintf ("acpi", "Looking for RSDP. Scanning EBDA\n");
   ebda = (grub_uint8_t *) ((* ((grub_uint16_t *) 0x40e)) << 4);
   ebda_len = * (grub_uint16_t *) ebda;
   if (! ebda_len)
@@ -67,7 +67,7 @@
        == 0)
       return (struct grub_acpi_rsdp_v20 *) ptr;
 
-  grub_dprintf ("acpi", "Looking for RSDP. Scanning BIOS\n");  
+  grub_dprintf ("acpi", "Looking for RSDP. Scanning BIOS\n");
   for (ptr = (grub_uint8_t *) 0xe0000; ptr < (grub_uint8_t *) 0x100000;
        ptr += 16)
     if (grub_memcmp (ptr, "RSD PTR ", 8) == 0

Modified: trunk/grub2/commands/i386/pc/drivemap.c
===================================================================
--- trunk/grub2/commands/i386/pc/drivemap.c     2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/commands/i386/pc/drivemap.c     2009-06-10 21:04:23 UTC (rev 
2293)
@@ -184,7 +184,7 @@
     {
       grub_printf ("%cD #%-3u (0x%02x)       %cd%d\n",
                   (curnode->newdrive & 0x80) ? 'H' : 'F',
-                  curnode->newdrive & 0x7F, curnode->newdrive, 
+                  curnode->newdrive & 0x7F, curnode->newdrive,
                   (curnode->redirto & 0x80) ? 'h' : 'f',
                   curnode->redirto & 0x7F
                   );

Modified: trunk/grub2/commands/i386/pc/play.c
===================================================================
--- trunk/grub2/commands/i386/pc/play.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/i386/pc/play.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -171,7 +171,7 @@
                          sizeof (struct note)) == sizeof (struct note)
          && buf.pitch != T_FINE && grub_checkkey () < 0)
     {
-      
+
       grub_dprintf ("play", "pitch = %d, duration = %d\n", buf.pitch,
                     buf.duration);
 

Modified: trunk/grub2/commands/i386/pc/vbeinfo.c
===================================================================
--- trunk/grub2/commands/i386/pc/vbeinfo.c      2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/commands/i386/pc/vbeinfo.c      2009-06-10 21:04:23 UTC (rev 
2293)
@@ -66,14 +66,14 @@
   p = video_mode_list = real2pm (controller_info.video_mode_ptr);
   while (*p++ != 0xFFFF)
     ;
-  
+
   video_mode_list_size = (grub_addr_t) p - (grub_addr_t) video_mode_list;
   saved_video_mode_list = grub_malloc (video_mode_list_size);
   if (! saved_video_mode_list)
     return grub_errno;
 
   grub_memcpy (saved_video_mode_list, video_mode_list, video_mode_list_size);
-  
+
   grub_printf ("List of compatible video modes:\n");
   grub_printf ("Legend: P=Packed pixel, D=Direct color, "
               "mask/pos=R/G/B/reserved\n");
@@ -83,7 +83,7 @@
     {
       const char *memory_model = 0;
       grub_uint32_t mode = (grub_uint32_t) *p;
-      
+
       err = grub_vbe_get_video_mode_info (mode, &mode_info_tmp);
       if (err != GRUB_ERR_NONE)
        {
@@ -127,7 +127,7 @@
       if (! memory_model)
        continue;
 
-      grub_printf ("0x%03x:  %4d x %4d x %2d  %s", 
+      grub_printf ("0x%03x:  %4d x %4d x %2d  %s",
                    mode,
                    mode_info_tmp.x_resolution,
                    mode_info_tmp.y_resolution,
@@ -149,7 +149,7 @@
     }
 
   grub_free (saved_video_mode_list);
-  
+
   /* Check existence of vbe_mode environment variable.  */
   modevar = grub_env_get ("vbe_mode");
 

Modified: trunk/grub2/commands/i386/pc/vbetest.c
===================================================================
--- trunk/grub2/commands/i386/pc/vbetest.c      2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/commands/i386/pc/vbetest.c      2009-06-10 21:04:23 UTC (rev 
2293)
@@ -73,7 +73,7 @@
     grub_printf ("Old video mode = %04x\n", old_mode);
   else
     grub_errno = GRUB_ERR_NONE;
-  
+
   /* Check existence of vbe_mode environment variable.  */
   modevar = grub_env_get ("vbe_mode");
   if (modevar != 0)
@@ -90,7 +90,7 @@
   err = grub_vbe_get_video_mode_info (use_mode, &mode_info);
   if (err != GRUB_ERR_NONE)
     return err;
-  
+
   /* Dump out details about the mode being tested.  */
   grub_printf ("mode: 0x%03x\n",
                use_mode);

Modified: trunk/grub2/commands/loadenv.c
===================================================================
--- trunk/grub2/commands/loadenv.c      2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/loadenv.c      2009-06-10 21:04:23 UTC (rev 2293)
@@ -51,7 +51,7 @@
           filename = grub_malloc (len + 1 + sizeof (GRUB_ENVBLK_DEFCFG));
           if (! filename)
             return 0;
-          
+
           grub_strcpy (filename, prefix);
           filename[len] = '/';
           grub_strcpy (filename + len + 1, GRUB_ENVBLK_DEFCFG);
@@ -80,7 +80,7 @@
   buf = grub_malloc (size);
   if (! buf)
     return 0;
-  
+
   while (size > 0)
     {
       grub_ssize_t ret;
@@ -124,7 +124,7 @@
     grub_env_set (name, value);
     return 0;
   }
-  
+
   file = open_envblk_file ((state[0].set) ? state[0].arg : 0);
   if (! file)
     return grub_errno;
@@ -135,7 +135,7 @@
 
   grub_envblk_iterate (envblk, set_var);
   grub_envblk_close (envblk);
-  
+
  fail:
   grub_file_close (file);
   return grub_errno;
@@ -157,7 +157,7 @@
       grub_printf ("%s=%s\n", name, value);
       return 0;
     }
- 
+
   file = open_envblk_file ((state[0].set) ? state[0].arg : 0);
   if (! file)
     return grub_errno;
@@ -168,7 +168,7 @@
 
   grub_envblk_iterate (envblk, print_var);
   grub_envblk_close (envblk);
-  
+
  fail:
   grub_file_close (file);
   return grub_errno;
@@ -205,7 +205,7 @@
   grub_disk_addr_t part_start;
   struct blocklist *p;
   char *buf;
-  
+
   /* Sanity checks.  */
   total_length = 0;
   for (p = blocklists; p; p = p->next)
@@ -222,10 +222,10 @@
               return 0;
             }
         }
-      
+
       total_length += p->length;
     }
-  
+
   if (total_length != grub_file_size (file))
     {
       /* Maybe sparse, unallocated sectors. No way in GRUB.  */
@@ -245,7 +245,7 @@
   for (p = blocklists, index = 0; p; p = p->next, index += p->length)
     {
       char blockbuf[GRUB_DISK_SECTOR_SIZE];
-      
+
       if (grub_disk_read (disk, p->sector - part_start,
                           p->offset, p->length, blockbuf))
         return 0;
@@ -269,7 +269,7 @@
   grub_disk_addr_t part_start;
   struct blocklist *p;
   grub_size_t index;
-  
+
   buf = grub_envblk_buffer (envblk);
   disk = file->device->disk;
   if (disk->partition)
@@ -296,7 +296,7 @@
   grub_envblk_t envblk;
   struct blocklist *head = 0;
   struct blocklist *tail = 0;
-  
+
   /* Store blocklists in a linked list.  */
   auto void NESTED_FUNC_ATTR read_hook (grub_disk_addr_t sector,
                                         unsigned offset,
@@ -309,7 +309,7 @@
       if (offset + length > GRUB_DISK_SECTOR_SIZE)
         /* Seemingly a bug.  */
         return;
-      
+
       block = grub_malloc (sizeof (*block));
       if (! block)
         return;
@@ -348,7 +348,7 @@
 
   if (! check_blocklists (envblk, head, file))
     goto fail;
-  
+
   while (argc)
     {
       char *value;
@@ -368,7 +368,7 @@
     }
 
   write_blocklists (envblk, head, file);
-  
+
  fail:
   if (envblk)
     grub_envblk_close (envblk);

Modified: trunk/grub2/commands/ls.c
===================================================================
--- trunk/grub2/commands/ls.c   2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/ls.c   2009-06-10 21:04:23 UTC (rev 2293)
@@ -51,10 +51,10 @@
        grub_normal_print_device_info (name);
       else
        grub_printf ("(%s) ", name);
-  
+
       return 0;
     }
-  
+
   grub_device_iterate (grub_ls_print_devices);
   grub_putchar ('\n');
   grub_refresh ();
@@ -70,20 +70,20 @@
   const char *path;
   grub_device_t dev;
 
-  auto int print_files (const char *filename, 
+  auto int print_files (const char *filename,
                        const struct grub_dirhook_info *info);
-  auto int print_files_long (const char *filename, 
+  auto int print_files_long (const char *filename,
                             const struct grub_dirhook_info *info);
-  
+
   int print_files (const char *filename, const struct grub_dirhook_info *info)
     {
       if (all || filename[0] != '.')
        grub_printf ("%s%s ", filename, info->dir ? "/" : "");
-      
+
       return 0;
     }
-     
-  int print_files_long (const char *filename, 
+
+  int print_files_long (const char *filename,
                        const struct grub_dirhook_info *info)
     {
       char pathname[grub_strlen (dirname) + grub_strlen (filename) + 1];
@@ -94,7 +94,7 @@
       if (! info->dir)
        {
          grub_file_t file;
-         
+
          if (dirname[grub_strlen (dirname) - 1] == '/')
            grub_sprintf (pathname, "%s%s", dirname, filename);
          else
@@ -117,7 +117,7 @@
              int fsz = file->size;
              int units = 0;
              char buf[20];
-             
+
              while (fsz / 1024)
                {
                  fsize = (fsize + 512) / 1024;
@@ -136,7 +136,7 @@
                }
              else
                grub_printf ("%-12llu", (unsigned long long) file->size);
-             
+
            }
          grub_file_close (file);
        }
@@ -150,13 +150,13 @@
          if (human)
            grub_printf (" %d-%02d-%02d %02d:%02d:%02d %-11s ",
                         datetime.year, datetime.month, datetime.day,
-                        datetime.hour, datetime.minute, 
+                        datetime.hour, datetime.minute,
                         datetime.second,
                         grub_get_weekday_name (&datetime));
          else
            grub_printf (" %04d%02d%02d%02d%02d%02d ",
-                        datetime.year, datetime.month, 
-                        datetime.day, datetime.hour, 
+                        datetime.year, datetime.month,
+                        datetime.day, datetime.hour,
                         datetime.minute, datetime.second);
        }
       grub_printf ("%s%s\n", filename, info->dir ? "/" : "");
@@ -175,13 +175,13 @@
     path = dirname;
   else
     path++;
-  
+
   if (! path && ! device_name)
     {
       grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
       goto fail;
     }
-      
+
   if (! *path)
     {
       if (grub_errno == GRUB_ERR_UNKNOWN_FS)
@@ -204,13 +204,13 @@
          grub_file_t file;
          struct grub_dirhook_info info;
          grub_errno = 0;
-         
+
          file = grub_file_open (dirname);
          if (! file)
            goto fail;
-         
+
          grub_file_close (file);
-         
+
          p = grub_strrchr (dirname, '/') + 1;
          dirname = grub_strndup (dirname, p - dirname);
          if (! dirname)
@@ -228,14 +228,14 @@
 
       if (grub_errno == GRUB_ERR_NONE)
        grub_putchar ('\n');
-      
+
       grub_refresh ();
     }
 
  fail:
   if (dev)
     grub_device_close (dev);
-      
+
   grub_free (device_name);
 
   return 0;

Modified: trunk/grub2/commands/parttool.c
===================================================================
--- trunk/grub2/commands/parttool.c     2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/parttool.c     2009-06-10 21:04:23 UTC (rev 2293)
@@ -38,8 +38,8 @@
   "Use \"parttool PARTITION help\" for the list "
   "of available commands";
 
-int 
-grub_parttool_register(const char *part_name, 
+int
+grub_parttool_register(const char *part_name,
                       const grub_parttool_function_t func,
                       const struct grub_parttool_argdesc *args)
 {
@@ -55,11 +55,11 @@
   cur->handle = curhandle++;
   for (nargs = 0; args[nargs].name != 0; nargs++);
   cur->nargs = nargs;
-  cur->args = (struct grub_parttool_argdesc *) 
+  cur->args = (struct grub_parttool_argdesc *)
     grub_malloc ((nargs + 1) * sizeof (struct grub_parttool_argdesc));
-  grub_memcpy (cur->args, args, 
+  grub_memcpy (cur->args, args,
               (nargs + 1) * sizeof (struct grub_parttool_argdesc));
-  
+
   cur->func = func;
   parts = cur;
   return cur->handle;
@@ -113,22 +113,22 @@
          for (curarg = cur->args; curarg->name; curarg++)
            {
              int spacing = 20;
-             
+
              spacing -= grub_strlen (curarg->name);
              grub_printf ("%s", curarg->name);
-             
+
              switch (curarg->type)
                {
                case GRUB_PARTTOOL_ARG_BOOL:
                  grub_printf ("+/-");
                  spacing -= 3;
                  break;
-                 
-               case GRUB_PARTTOOL_ARG_VAL:                   
+
+               case GRUB_PARTTOOL_ARG_VAL:
                  grub_printf ("=VAL");
                  spacing -= 4;
                  break;
-                 
+
                    case GRUB_PARTTOOL_ARG_END:
                      break;
                }
@@ -138,7 +138,7 @@
            }
        }
     if (! found)
-      grub_printf ("Sorry no parttool is available for %s\n", 
+      grub_printf ("Sorry no parttool is available for %s\n",
                   dev->disk->partition->partmap->name);
     return GRUB_ERR_NONE;
   }
@@ -152,11 +152,11 @@
   if (args[0][0] == '(' && args[0][grub_strlen (args[0]) - 1] == ')')
     {
       args[0][grub_strlen (args[0]) - 1] = 0;
-      dev = grub_device_open (args[0] + 1); 
+      dev = grub_device_open (args[0] + 1);
       args[0][grub_strlen (args[0]) - 1] = ')';
     }
   else
-    dev = grub_device_open (args[0]); 
+    dev = grub_device_open (args[0]);
 
   if (! dev)
     return grub_errno;
@@ -186,7 +186,7 @@
        if (filename)
          {
            grub_file_t file;
-           
+
            grub_sprintf (filename, "%s/parttool.lst", prefix);
            file = grub_file_open (filename);
            if (file)
@@ -197,36 +197,36 @@
                    char *p, *name;
 
                    buf = grub_file_getline (file);
-                   
+
                    if (! buf)
                      break;
-                 
+
                    name = buf;
 
                    if (! grub_isgraph (name[0]))
                      continue;
-                   
+
                    p = grub_strchr (name, ':');
                    if (! p)
                      continue;
-                   
+
                    *p = '\0';
                    while (*++p == ' ')
                      ;
 
                    if (! grub_isgraph (*p))
                      continue;
-                   
+
                    if (grub_strcmp (name, dev->disk->partition->partmap->name)
                        != 0)
                      continue;
-                   
+
                    grub_dl_load (p);
                  }
-               
+
                grub_file_close (file);
              }
-           
+
            grub_free (filename);
          }
       }
@@ -254,15 +254,15 @@
          if (grub_strcmp (dev->disk->partition->partmap->name, cur->name) == 0)
            {
              for (curarg = cur->args; curarg->name; curarg++)
-               if (grub_strncmp (curarg->name, args[i], 
+               if (grub_strncmp (curarg->name, args[i],
                                  grub_strlen (curarg->name)) == 0
-                   && ((curarg->type == GRUB_PARTTOOL_ARG_BOOL 
-                        && (args[i][grub_strlen (curarg->name)] == '+' 
+                   && ((curarg->type == GRUB_PARTTOOL_ARG_BOOL
+                        && (args[i][grub_strlen (curarg->name)] == '+'
                             || args[i][grub_strlen (curarg->name)] == '-'
                             || args[i][grub_strlen (curarg->name)] == 0))
                        || (curarg->type == GRUB_PARTTOOL_ARG_VAL
                            && args[i][grub_strlen (curarg->name)] == '=')))
-                   
+
                  break;
              if (curarg->name)
                break;
@@ -271,18 +271,18 @@
          return grub_error (GRUB_ERR_BAD_ARGUMENT, "unrecognised argument %s",
                             args[i]);
        ptool = cur;
-       pargs = (struct grub_parttool_args *) 
+       pargs = (struct grub_parttool_args *)
          grub_malloc (ptool->nargs * sizeof (struct grub_parttool_args));
-       grub_memset (pargs, 0, 
+       grub_memset (pargs, 0,
                     ptool->nargs * sizeof (struct grub_parttool_args));
        for (j = i; j < argc; j++)
          if (! parsed[j])
            {
              for (curarg = ptool->args; curarg->name; curarg++)
-               if (grub_strncmp (curarg->name, args[i], 
+               if (grub_strncmp (curarg->name, args[i],
                                   grub_strlen (curarg->name)) == 0
-                   && ((curarg->type == GRUB_PARTTOOL_ARG_BOOL 
-                        && (args[j][grub_strlen (curarg->name)] == '+' 
+                   && ((curarg->type == GRUB_PARTTOOL_ARG_BOOL
+                        && (args[j][grub_strlen (curarg->name)] == '+'
                             || args[j][grub_strlen (curarg->name)] == '-'
                             || args[j][grub_strlen (curarg->name)] == 0))
                        || (curarg->type == GRUB_PARTTOOL_ARG_VAL
@@ -293,15 +293,15 @@
                    switch (curarg->type)
                      {
                      case GRUB_PARTTOOL_ARG_BOOL:
-                       pargs[curarg - ptool->args].bool 
+                       pargs[curarg - ptool->args].bool
                          = (args[j][grub_strlen (curarg->name)] != '-');
                        break;
 
                      case GRUB_PARTTOOL_ARG_VAL:
-                       pargs[curarg - ptool->args].str 
+                       pargs[curarg - ptool->args].str
                          = (args[j] + grub_strlen (curarg->name) + 1);
                        break;
-                       
+
                      case GRUB_PARTTOOL_ARG_END:
                        break;
                      }
@@ -324,8 +324,8 @@
 GRUB_MOD_INIT(parttool)
 {
   mymod = mod;
-  cmd = grub_register_command ("parttool", grub_cmd_parttool, 
-                              "parttool PARTITION COMMANDS", 
+  cmd = grub_register_command ("parttool", grub_cmd_parttool,
+                              "parttool PARTITION COMMANDS",
                               helpmsg);
 }
 

Modified: trunk/grub2/commands/search.c
===================================================================
--- trunk/grub2/commands/search.c       2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/search.c       2009-06-10 21:04:23 UTC (rev 2293)
@@ -42,7 +42,7 @@
 {
   int count = 0;
   auto int iterate_device (const char *name);
-  
+
   int iterate_device (const char *name)
     {
       grub_device_t dev;
@@ -53,12 +53,12 @@
          name[0] == 'f' && name[1] == 'd' &&
          name[2] >= '0' && name[2] <= '9')
        return 0;
-      
+
       dev = grub_device_open (name);
       if (dev)
        {
          grub_fs_t fs;
-         
+
          fs = grub_fs_probe (dev);
 
 #define QUID(x)        (is_uuid ? (x)->uuid : (x)->label)
@@ -66,7 +66,7 @@
          if (fs && QUID(fs))
            {
              char *quid;
-             
+
              (QUID(fs)) (dev, &quid);
              if (grub_errno == GRUB_ERR_NONE && quid)
                {
@@ -82,20 +82,20 @@
                      else
                          grub_printf (" %s", name);
                    }
-                 
+
                  grub_free (quid);
                }
            }
-         
+
          grub_device_close (dev);
        }
-      
+
       grub_errno = GRUB_ERR_NONE;
       return abort;
     }
-  
+
   grub_device_iterate (iterate_device);
-  
+
   if (count == 0)
     grub_error (GRUB_ERR_FILE_NOT_FOUND, "no such device: %s", key);
 }
@@ -113,13 +113,13 @@
       char *p;
       grub_file_t file;
       int abort = 0;
-      
+
       /* Skip floppy drives when requested.  */
       if (no_floppy &&
          name[0] == 'f' && name[1] == 'd' &&
          name[2] >= '0' && name[2] <= '9')
        return 0;
-      
+
       len = grub_strlen (name) + 2 + grub_strlen (key) + 1;
       p = grub_realloc (buf, len);
       if (! p)
@@ -127,7 +127,7 @@
 
       buf = p;
       grub_sprintf (buf, "(%s)%s", name, key);
-      
+
       file = grub_file_open (buf);
       if (file)
        {
@@ -143,15 +143,15 @@
 
          grub_file_close (file);
        }
-      
+
       grub_errno = GRUB_ERR_NONE;
       return abort;
     }
-  
+
   grub_device_iterate (iterate_device);
-  
+
   grub_free (buf);
-  
+
   if (grub_errno == GRUB_ERR_NONE && count == 0)
     grub_error (GRUB_ERR_FILE_NOT_FOUND, "no such device");
 }
@@ -161,13 +161,13 @@
 {
   struct grub_arg_list *state = cmd->state;
   const char *var = 0;
-  
+
   if (argc == 0)
     return grub_error (GRUB_ERR_INVALID_COMMAND, "no argument specified");
 
   if (state[3].set)
     var = state[3].arg ? state[3].arg : "root";
-  
+
   if (state[1].set)
     search_fs (args[0], var, state[4].set, 0);
   else if (state[2].set)

Modified: trunk/grub2/commands/test.c
===================================================================
--- trunk/grub2/commands/test.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/test.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -63,9 +63,9 @@
     grub_device_t dev;
 
     /* A hook for iterating directories. */
-    auto int find_file (const char *cur_filename, 
+    auto int find_file (const char *cur_filename,
                        const struct grub_dirhook_info *info);
-    int find_file (const char *cur_filename, 
+    int find_file (const char *cur_filename,
                   const struct grub_dirhook_info *info)
     {
       if ((info->case_insensitive ? grub_strcasecmp (cur_filename, filename)
@@ -77,7 +77,7 @@
        }
       return 0;
     }
-    
+
     file_exists = 0;
     device_name = grub_file_get_device_name (path);
     dev = grub_device_open (device_name);
@@ -93,7 +93,7 @@
       pathname = path;
     else
       pathname++;
-    
+
     /* Remove trailing '/'. */
     while (*pathname && pathname[grub_strlen (pathname) - 1] == '/')
       pathname[grub_strlen (pathname) - 1] = 0;
@@ -132,7 +132,7 @@
     else
       (fs->dir) (dev, path, find_file);
 
-    grub_device_close (dev); 
+    grub_device_close (dev);
     grub_free (path);
     grub_free (device_name);
   }
@@ -158,7 +158,7 @@
              (*argn) += 3;
              continue;
            }
-         
+
          /* GRUB extension: lexicographical sorting. */
          if (grub_strcmp (args[*argn + 1], "<") == 0)
            {
@@ -166,21 +166,21 @@
              (*argn) += 3;
              continue;
            }
-         
+
          if (grub_strcmp (args[*argn + 1], "<=") == 0)
            {
              update_val (grub_strcmp (args[*argn], args[*argn + 2]) <= 0);
              (*argn) += 3;
              continue;
            }
-         
+
          if (grub_strcmp (args[*argn + 1], ">") == 0)
            {
              update_val (grub_strcmp (args[*argn], args[*argn + 2]) > 0);
              (*argn) += 3;
              continue;
            }
-         
+
          if (grub_strcmp (args[*argn + 1], ">=") == 0)
            {
              update_val (grub_strcmp (args[*argn], args[*argn + 2]) >= 0);
@@ -191,7 +191,7 @@
          /* Number tests. */
          if (grub_strcmp (args[*argn + 1], "-eq") == 0)
            {
-             update_val (grub_strtosl (args[*argn], 0, 0) 
+             update_val (grub_strtosl (args[*argn], 0, 0)
                          == grub_strtosl (args[*argn + 2], 0, 0));
              (*argn) += 3;
              continue;
@@ -199,15 +199,15 @@
 
          if (grub_strcmp (args[*argn + 1], "-ge") == 0)
            {
-             update_val (grub_strtosl (args[*argn], 0, 0) 
+             update_val (grub_strtosl (args[*argn], 0, 0)
                          >= grub_strtosl (args[*argn + 2], 0, 0));
              (*argn) += 3;
              continue;
            }
-         
+
          if (grub_strcmp (args[*argn + 1], "-gt") == 0)
            {
-             update_val (grub_strtosl (args[*argn], 0, 0) 
+             update_val (grub_strtosl (args[*argn], 0, 0)
                          > grub_strtosl (args[*argn + 2], 0, 0));
              (*argn) += 3;
              continue;
@@ -215,55 +215,55 @@
 
          if (grub_strcmp (args[*argn + 1], "-le") == 0)
            {
-             update_val (grub_strtosl (args[*argn], 0, 0) 
+             update_val (grub_strtosl (args[*argn], 0, 0)
                      <= grub_strtosl (args[*argn + 2], 0, 0));
              (*argn) += 3;
              continue;
            }
-         
+
          if (grub_strcmp (args[*argn + 1], "-lt") == 0)
            {
-             update_val (grub_strtosl (args[*argn], 0, 0) 
+             update_val (grub_strtosl (args[*argn], 0, 0)
                          < grub_strtosl (args[*argn + 2], 0, 0));
              (*argn) += 3;
              continue;
            }
-         
+
          if (grub_strcmp (args[*argn + 1], "-ne") == 0)
            {
-             update_val (grub_strtosl (args[*argn], 0, 0) 
+             update_val (grub_strtosl (args[*argn], 0, 0)
                          != grub_strtosl (args[*argn + 2], 0, 0));
              (*argn) += 3;
              continue;
            }
 
-         /* GRUB extension: compare numbers skipping prefixes. 
+         /* GRUB extension: compare numbers skipping prefixes.
             Useful for comparing versions. E.g. vmlinuz-2 -plt vmlinuz-11. */
          if (grub_strcmp (args[*argn + 1], "-pgt") == 0
              || grub_strcmp (args[*argn + 1], "-plt") == 0)
            {
              int i;
              /* Skip common prefix. */
-             for (i = 0; args[*argn][i] == args[*argn + 2][i] 
+             for (i = 0; args[*argn][i] == args[*argn + 2][i]
                     && args[*argn][i]; i++);
-             
+
              /* Go the digits back. */
              i--;
              while (grub_isdigit (args[*argn][i]) && i > 0)
                i--;
              i++;
-             
+
              if (grub_strcmp (args[*argn + 1], "-pgt") == 0)
-               update_val (grub_strtoul (args[*argn] + i, 0, 0) 
+               update_val (grub_strtoul (args[*argn] + i, 0, 0)
                            > grub_strtoul (args[*argn + 2] + i, 0, 0));
              else
-               update_val (grub_strtoul (args[*argn] + i, 0, 0) 
+               update_val (grub_strtoul (args[*argn] + i, 0, 0)
                            < grub_strtoul (args[*argn + 2] + i, 0, 0));
              (*argn) += 3;
              continue;
            }
 
-         /* -nt and -ot tests. GRUB extension: when doing -?t<bias> bias 
+         /* -nt and -ot tests. GRUB extension: when doing -?t<bias> bias
             will be added to the first mtime. */
          if (grub_memcmp (args[*argn + 1], "-nt", 3) == 0
              || grub_memcmp (args[*argn + 1], "-ot", 3) == 0)
@@ -271,16 +271,16 @@
              struct grub_dirhook_info file1;
              int file1exists;
              int bias = 0;
-             
+
              /* Fetch fileinfo. */
              get_fileinfo (args[*argn]);
              file1 = file_info;
              file1exists = file_exists;
              get_fileinfo (args[*argn + 2]);
-             
+
              if (args[*argn + 1][3])
                bias = grub_strtosl (args[*argn + 1] + 3, 0, 0);
-             
+
              if (grub_memcmp (args[*argn + 1], "-nt", 3) == 0)
                update_val ((file1exists && ! file_exists)
                            || (file1.mtimeset && file_info.mtimeset
@@ -305,7 +305,7 @@
              (*argn) += 2;
              return ret;
            }
-         
+
          if (grub_strcmp (args[*argn], "-e") == 0)
            {
              get_fileinfo (args[*argn + 1]);
@@ -322,7 +322,7 @@
              (*argn) += 2;
              return ret;
            }
-         
+
          if (grub_strcmp (args[*argn], "-s") == 0)
            {
              grub_file_t file;
@@ -334,12 +334,12 @@
              (*argn) += 2;
              return ret;
            }
-         
+
          /* String tests. */
          if (grub_strcmp (args[*argn], "-n") == 0)
            {
              update_val (args[*argn + 1][0]);
-             
+
              (*argn) += 2;
              continue;
            }
@@ -352,7 +352,7 @@
        }
 
       /* Special modifiers. */
-      
+
       /* End of expression. return to parent. */
       if (grub_strcmp (args[*argn], ")") == 0)
        {
@@ -366,7 +366,7 @@
          update_val (test_parse (args, argn, argc));
          continue;
        }
-      
+
       if (grub_strcmp (args[*argn], "!") == 0)
        {
          invert = ! invert;
@@ -404,7 +404,7 @@
   if (argc >= 1 && grub_strcmp (args[argc - 1], "]") == 0)
     argc--;
 
-  return test_parse (args, &argn, argc) ? GRUB_ERR_NONE 
+  return test_parse (args, &argn, argc) ? GRUB_ERR_NONE
     : grub_error (GRUB_ERR_TEST_FAILURE, "false");
 }
 

Modified: trunk/grub2/commands/usbtest.c
===================================================================
--- trunk/grub2/commands/usbtest.c      2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/commands/usbtest.c      2009-06-10 21:04:23 UTC (rev 2293)
@@ -51,7 +51,7 @@
     "Interrupt"
   };
 
-static const char *usb_devspeed[] = 
+static const char *usb_devspeed[] =
   {
     "",
     "Low",
@@ -84,7 +84,7 @@
   usb_print_str ("Product", dev, descdev->strprod);
   usb_print_str ("Vendor", dev, descdev->strvendor);
   usb_print_str ("Serial", dev, descdev->strserial);
-  
+
   if (descdev->class > 0 && descdev->class <= 0x0E)
     grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
                 descdev->class, usb_classes[descdev->class],

Modified: trunk/grub2/conf/i386-pc.rmk
===================================================================
--- trunk/grub2/conf/i386-pc.rmk        2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/conf/i386-pc.rmk        2009-06-10 21:04:23 UTC (rev 2293)
@@ -162,7 +162,7 @@
        commands/parttool.c parttool/pcpart.c                           \
        grub_emu_init.c
 
-grub_emu_LDFLAGS = $(LIBCURSES) 
+grub_emu_LDFLAGS = $(LIBCURSES)
 
 ifeq ($(enable_grub_emu_usb), yes)
 grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c      \

Modified: trunk/grub2/conf/powerpc-ieee1275.rmk
===================================================================
--- trunk/grub2/conf/powerpc-ieee1275.rmk       2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/conf/powerpc-ieee1275.rmk       2009-06-10 21:04:23 UTC (rev 
2293)
@@ -33,7 +33,7 @@
 ifeq ($(enable_grub_emu), yes)
 sbin_UTILITIES += grub-emu
 endif
- 
+
 # For grub-mkdevicemap.
 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
        util/devicemap.c util/misc.c
@@ -144,7 +144,7 @@
                          loader/multiboot2.c \
                          loader/multiboot_loader.c
 multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
-multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS) 
+multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
 # For memdisk.mod.
 memdisk_mod_SOURCES = disk/memdisk.c

Modified: trunk/grub2/conf/sparc64-ieee1275.rmk
===================================================================
--- trunk/grub2/conf/sparc64-ieee1275.rmk       2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/conf/sparc64-ieee1275.rmk       2009-06-10 21:04:23 UTC (rev 
2293)
@@ -66,7 +66,7 @@
 
 # For grub-mkimage.
 grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
-        util/resolve.c 
+        util/resolve.c
 
 # For grub-setup.
 util/sparc64/ieee1275/grub-setup.c_DEPENDENCIES = grub_setup_init.h

Modified: trunk/grub2/configure.ac
===================================================================
--- trunk/grub2/configure.ac    2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/configure.ac    2009-06-10 21:04:23 UTC (rev 2293)
@@ -354,7 +354,7 @@
   ])
   if test "x$grub_cv_cc_mcmodel" = xno; then
     CFLAGS="$SAVED_CFLAGS -m64 -DMCMODEL_SMALL=1"
-    TARGET_CFLAGS="$TARGET_CFLAGS -DMCMODEL_SMALL=1"    
+    TARGET_CFLAGS="$TARGET_CFLAGS -DMCMODEL_SMALL=1"
     AC_MSG_WARN([-mcmodel=large not supported. You wan't be able to use the 
memory over 4GiB. Upgrade your gcc])
   else
     TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
@@ -451,7 +451,7 @@
 #
 
 # Memory manager debugging.
-AC_ARG_ENABLE([mm-debug], 
+AC_ARG_ENABLE([mm-debug],
              AS_HELP_STRING([--enable-mm-debug],
                              [include memory manager debugging]),
               [AC_DEFINE([MM_DEBUG], [1],

Modified: trunk/grub2/disk/ata.c
===================================================================
--- trunk/grub2/disk/ata.c      2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/ata.c      2009-06-10 21:04:23 UTC (rev 2293)
@@ -357,7 +357,7 @@
   /* Try to detect if the port is in use by writing to it,
      waiting for a while and reading it again.  If the value
      was preserved, there is a device connected.  */
-  grub_ata_regset (dev, GRUB_ATA_REG_SECTORS, 0x5A);  
+  grub_ata_regset (dev, GRUB_ATA_REG_SECTORS, 0x5A);
   grub_ata_wait ();
   grub_uint8_t sec = grub_ata_regget (dev, GRUB_ATA_REG_SECTORS);
   grub_dprintf ("ata", "sectors=0x%x\n", sec);
@@ -435,7 +435,7 @@
          bar2 = grub_pci_read (addr);
 
          /* Check if the BARs describe an IO region.  */
-         if ((bar1 & 1) && (bar2 & 1))   
+         if ((bar1 & 1) && (bar2 & 1))
            {
              rega = bar1 & ~3;
              regb = bar2 & ~3;
@@ -682,7 +682,7 @@
   disk->total_sectors = dev->size;
 
   disk->id = (unsigned long) dev;
-  
+
   disk->has_partitions = 1;
   disk->data = dev;
 
@@ -692,7 +692,7 @@
 static void
 grub_ata_close (grub_disk_t disk __attribute__((unused)))
 {
-  
+
 }
 
 static grub_err_t
@@ -841,7 +841,7 @@
     .close = grub_atapi_close,
     .read = grub_atapi_read,
     .write = grub_atapi_write
-  }; 
+  };
 
 
 
@@ -854,7 +854,7 @@
       grub_disk_firmware_fini ();
       grub_disk_firmware_fini = NULL;
     }
-  
+
   /* ATA initialization.  */
   grub_ata_initialize ();
 

Modified: trunk/grub2/disk/efi/efidisk.c
===================================================================
--- trunk/grub2/disk/efi/efidisk.c      2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/efi/efidisk.c      2009-06-10 21:04:23 UTC (rev 2293)
@@ -51,7 +51,7 @@
 {
   grub_efi_device_path_t *p;
   grub_size_t total_size = 0;
-  
+
   for (p = (grub_efi_device_path_t *) dp;
        ;
        p = GRUB_EFI_NEXT_DEVICE_PATH (p))
@@ -94,14 +94,14 @@
   if (! dp1 || ! dp2)
     /* Return non-zero.  */
     return 1;
-  
+
   while (1)
     {
       grub_efi_uint8_t type1, type2;
       grub_efi_uint8_t subtype1, subtype2;
       grub_efi_uint16_t len1, len2;
       int ret;
-      
+
       type1 = GRUB_EFI_DEVICE_PATH_TYPE (dp1);
       type2 = GRUB_EFI_DEVICE_PATH_TYPE (dp2);
 
@@ -110,7 +110,7 @@
 
       subtype1 = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp1);
       subtype2 = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp2);
-      
+
       if (subtype1 != subtype2)
        return (int) subtype1 - (int) subtype2;
 
@@ -141,7 +141,7 @@
   grub_efi_handle_t *handles;
   grub_efi_handle_t *handle;
   struct grub_efidisk_data *devices = 0;
-  
+
   /* Find handles which support the disk io interface.  */
   handles = grub_efi_locate_handle (GRUB_EFI_BY_PROTOCOL, &disk_io_guid,
                                    0, &num_handles);
@@ -156,7 +156,7 @@
       struct grub_efidisk_data *d;
       grub_efi_block_io_t *bio;
       grub_efi_disk_io_t *dio;
-      
+
       dp = grub_efi_get_device_path (*handle);
       if (! dp)
        continue;
@@ -165,7 +165,7 @@
       if (! ldp)
        /* This is empty. Why?  */
        continue;
-      
+
       bio = grub_efi_open_protocol (*handle, &block_io_guid,
                                    GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL);
       dio = grub_efi_open_protocol (*handle, &disk_io_guid,
@@ -173,7 +173,7 @@
       if (! bio || ! dio)
        /* This should not happen... Why?  */
        continue;
-       
+
       d = grub_malloc (sizeof (*d));
       if (! d)
        {
@@ -192,7 +192,7 @@
     }
 
   grub_free (handles);
-  
+
   return devices;
 }
 
@@ -203,7 +203,7 @@
 {
   grub_efi_device_path_t *dp, *ldp;
   struct grub_efidisk_data *parent;
-  
+
   dp = duplicate_device_path (d->device_path);
   if (! dp)
     return 0;
@@ -219,13 +219,13 @@
       /* Ignore itself.  */
       if (parent == d)
        continue;
-      
+
       if (compare_device_paths (parent->device_path, dp) == 0)
        {
          /* Found.  */
          if (! parent->last_device_path)
            parent = 0;
-         
+
          break;
        }
     }
@@ -240,7 +240,7 @@
                       int (*hook) (struct grub_efidisk_data *child))
 {
   struct grub_efidisk_data *p;
-  
+
   for (p = devices; p; p = p->next)
     {
       grub_efi_device_path_t *dp, *ldp;
@@ -248,13 +248,13 @@
       dp = duplicate_device_path (p->device_path);
       if (! dp)
        return 0;
-      
+
       ldp = find_last_device_path (dp);
       ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
       ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
       ldp->length[0] = sizeof (*ldp);
       ldp->length[1] = 0;
-      
+
       if (compare_device_paths (dp, d->device_path) == 0)
        if (hook (p))
          {
@@ -304,7 +304,7 @@
 name_devices (struct grub_efidisk_data *devices)
 {
   struct grub_efidisk_data *d;
-  
+
   /* First, identify devices by media device paths.  */
   for (d = devices; d; d = d->next)
     {
@@ -313,11 +313,11 @@
       dp = d->last_device_path;
       if (! dp)
        continue;
-      
+
       if (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE)
        {
          int is_hard_drive = 0;
-         
+
          switch (GRUB_EFI_DEVICE_PATH_SUBTYPE (dp))
            {
            case GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE:
@@ -346,7 +346,7 @@
 #endif
                        add_device (&cd_devices, parent);
                      }
-                   
+
                    /* Mark the parent as used.  */
                    parent->last_device_path = 0;
                  }
@@ -367,7 +367,7 @@
     {
       grub_efi_device_path_t *dp;
       grub_efi_block_io_media_t *m;
-      
+
       dp = d->last_device_path;
       if (! dp)
        continue;
@@ -409,7 +409,7 @@
 free_devices (struct grub_efidisk_data *devices)
 {
   struct grub_efidisk_data *p, *q;
-  
+
   for (p = devices; p; p = q)
     {
       q = p->next;
@@ -422,11 +422,11 @@
 enumerate_disks (void)
 {
   struct grub_efidisk_data *devices;
-  
+
   devices = make_devices ();
   if (! devices)
     return;
-  
+
   name_devices (devices);
   free_devices (devices);
 }
@@ -437,7 +437,7 @@
   struct grub_efidisk_data *d;
   char buf[16];
   int count;
-  
+
   for (d = fd_devices, count = 0; d; d = d->next, count++)
     {
       grub_sprintf (buf, "fd%d", count);
@@ -445,7 +445,7 @@
       if (hook (buf))
        return 1;
     }
-  
+
   for (d = hd_devices, count = 0; d; d = d->next, count++)
     {
       grub_sprintf (buf, "hd%d", count);
@@ -453,7 +453,7 @@
       if (hook (buf))
        return 1;
     }
-  
+
   for (d = cd_devices, count = 0; d; d = d->next, count++)
     {
       grub_sprintf (buf, "cd%d", count);
@@ -506,7 +506,7 @@
   grub_efi_block_io_media_t *m;
 
   grub_dprintf ("efidisk", "opening %s\n", name);
-  
+
   num = get_drive_number (name);
   if (num < 0)
     return grub_errno;
@@ -565,7 +565,7 @@
   grub_efi_disk_io_t *dio;
   grub_efi_block_io_t *bio;
   grub_efi_status_t status;
-  
+
   d = disk->data;
   dio = d->disk_io;
   bio = d->block_io;
@@ -573,14 +573,14 @@
   grub_dprintf ("efidisk",
                "reading 0x%lx sectors at the sector 0x%llx from %s\n",
                (unsigned long) size, (unsigned long long) sector, disk->name);
-  
+
   status = efi_call_5 (dio->read, dio, bio->media->media_id,
                      (grub_efi_uint64_t) sector << GRUB_DISK_SECTOR_BITS,
                      (grub_efi_uintn_t) size << GRUB_DISK_SECTOR_BITS,
                      buf);
   if (status != GRUB_EFI_SUCCESS)
     return grub_error (GRUB_ERR_READ_ERROR, "efidisk read error");
-  
+
   return GRUB_ERR_NONE;
 }
 
@@ -593,22 +593,22 @@
   grub_efi_disk_io_t *dio;
   grub_efi_block_io_t *bio;
   grub_efi_status_t status;
-  
+
   d = disk->data;
   dio = d->disk_io;
   bio = d->block_io;
-  
+
   grub_dprintf ("efidisk",
                "writing 0x%lx sectors at the sector 0x%llx to %s\n",
                (unsigned long) size, (unsigned long long) sector, disk->name);
-  
+
   status = efi_call_5 (dio->write, dio, bio->media->media_id,
                       (grub_efi_uint64_t) sector << GRUB_DISK_SECTOR_BITS,
                       (grub_efi_uintn_t) size << GRUB_DISK_SECTOR_BITS,
                       (void *) buf);
   if (status != GRUB_EFI_SUCCESS)
     return grub_error (GRUB_ERR_WRITE_ERROR, "efidisk write error");
-  
+
   return GRUB_ERR_NONE;
 }
 
@@ -646,13 +646,13 @@
 {
   struct grub_efidisk_data *d;
   char type;
-  
+
   if (disk->dev->id != GRUB_DISK_DEVICE_EFIDISK_ID)
     return 0;
-  
+
   d = disk->data;
   type = disk->name[0];
-  
+
   switch (type)
     {
     case 'f':
@@ -679,7 +679,7 @@
            grub_efi_hard_drive_device_path_t hd;
 
            grub_memcpy (&hd, c->last_device_path, sizeof (hd));
-           
+
            if ((GRUB_EFI_DEVICE_PATH_TYPE (c->last_device_path)
                 == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE)
                && (GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path)
@@ -692,14 +692,14 @@
                handle = c->handle;
                return 1;
              }
-             
+
            return 0;
          }
-       
+
        devices = make_devices ();
        iterate_child_devices (devices, d, find_partition);
        free_devices (devices);
-       
+
        if (handle != 0)
          return handle;
       }
@@ -708,7 +708,7 @@
     default:
       break;
     }
-  
+
   return 0;
 }
 
@@ -750,7 +750,7 @@
          if (disk->dev->id == GRUB_DISK_DEVICE_EFIDISK_ID)
            {
              struct grub_efidisk_data *d;
-             
+
              d = disk->data;
              if (compare_device_paths (d->device_path, dup_dp) == 0)
                {
@@ -798,7 +798,7 @@
       /* Find a partition which matches the hard drive device path.  */
       grub_memcpy (&hd, ldp, sizeof (hd));
       grub_partition_iterate (parent, find_partition);
-      
+
       if (! partition_name)
        {
          grub_disk_close (parent);
@@ -824,11 +824,11 @@
       /* This should be an entire disk.  */
       auto int find_disk (const char *name);
       char *device_name = 0;
-      
+
       int find_disk (const char *name)
        {
          grub_disk_t disk;
-         
+
          disk = grub_disk_open (name);
          if (! disk)
            return 1;
@@ -836,7 +836,7 @@
          if (disk->id == GRUB_DISK_DEVICE_EFIDISK_ID)
            {
              struct grub_efidisk_data *d;
-             
+
              d = disk->data;
              if (compare_device_paths (d->device_path, dp) == 0)
                {
@@ -848,9 +848,9 @@
 
          grub_disk_close (disk);
          return 0;
-         
+
        }
-      
+
       grub_efidisk_iterate (find_disk);
       return device_name;
     }

Modified: trunk/grub2/disk/fs_uuid.c
===================================================================
--- trunk/grub2/disk/fs_uuid.c  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/fs_uuid.c  2009-06-10 21:04:23 UTC (rev 2293)
@@ -42,12 +42,12 @@
       if (dev)
        {
          grub_fs_t fs;
-         
+
          fs = grub_fs_probe (dev);
          if (fs && fs->uuid)
            {
              char *uuid;
-             
+
              (fs->uuid) (dev, &uuid);
              if (grub_errno == GRUB_ERR_NONE && uuid)
                {
@@ -62,16 +62,16 @@
                  grub_free (uuid);
                }
            }
-         
+
          grub_device_close (dev);
        }
 
       grub_errno = GRUB_ERR_NONE;
       return 0;
     }
-  
+
   grub_device_iterate (iterate_device);
-  
+
   return ret;
 }
 

Modified: trunk/grub2/disk/host.c
===================================================================
--- trunk/grub2/disk/host.c     2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/host.c     2009-06-10 21:04:23 UTC (rev 2293)
@@ -42,7 +42,7 @@
 
   disk->total_sectors = 0;
   disk->id = (unsigned long) "host";
-  
+
   disk->has_partitions = 0;
   disk->data = 0;
 

Modified: trunk/grub2/disk/i386/pc/biosdisk.c
===================================================================
--- trunk/grub2/disk/i386/pc/biosdisk.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/i386/pc/biosdisk.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -36,14 +36,14 @@
 
   if ((name[0] != 'f' && name[0] != 'h') || name[1] != 'd')
     goto fail;
-    
+
   drive = grub_strtoul (name + 2, 0, 10);
   if (grub_errno != GRUB_ERR_NONE)
     goto fail;
 
   if (name[0] == 'h')
     drive += 0x80;
-  
+
   return (int) drive ;
 
  fail:
@@ -75,7 +75,7 @@
          grub_dprintf ("disk", "Read error when probing drive 0x%2x\n", drive);
          break;
        }
-      
+
       if (grub_biosdisk_call_hook (hook, drive))
        return 1;
     }
@@ -108,11 +108,11 @@
 
   disk->has_partitions = ((drive & 0x80) && (drive != cd_drive));
   disk->id = drive;
-  
+
   data = (struct grub_biosdisk_data *) grub_malloc (sizeof (*data));
   if (! data)
     return grub_errno;
-  
+
   data->drive = drive;
   data->flags = 0;
 
@@ -126,7 +126,7 @@
     {
       /* HDD */
       int version;
-      
+
       version = grub_biosdisk_check_int13_extensions (drive);
       if (version)
        {
@@ -162,9 +162,9 @@
            {
              data->sectors = 63;
              data->heads = 255;
-             data->cylinders 
-               = grub_divmod64 (total_sectors 
-                                + data->heads * data->sectors - 1, 
+             data->cylinders
+               = grub_divmod64 (total_sectors
+                                + data->heads * data->sectors - 1,
                                 data->heads * data->sectors, 0);
            }
          else
@@ -180,7 +180,7 @@
 
   disk->total_sectors = total_sectors;
   disk->data = data;
-  
+
   return GRUB_ERR_NONE;
 }
 
@@ -202,11 +202,11 @@
                  unsigned segment)
 {
   struct grub_biosdisk_data *data = disk->data;
-  
+
   if (data->flags & GRUB_BIOSDISK_FLAG_LBA)
     {
       struct grub_biosdisk_dap *dap;
-      
+
       dap = (struct grub_biosdisk_dap *) (GRUB_MEMORY_MACHINE_SCRATCH_ADDR
                                          + (data->sectors
                                             << GRUB_DISK_SECTOR_BITS));
@@ -246,7 +246,7 @@
     {
       unsigned coff, hoff, soff;
       unsigned head;
-      
+
       /* It is impossible to reach over 8064 MiB (a bit less than LBA24) with
         the traditional CHS access.  */
       if (sector >

Modified: trunk/grub2/disk/ieee1275/ofdisk.c
===================================================================
--- trunk/grub2/disk/ieee1275/ofdisk.c  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/ieee1275/ofdisk.c  2009-06-10 21:04:23 UTC (rev 2293)
@@ -251,7 +251,7 @@
   if (actual != actual)
     return grub_error (GRUB_ERR_READ_ERROR, "Read error on block: %llu",
                       (long long) sector);
-    
+
   return 0;
 }
 

Modified: trunk/grub2/disk/loopback.c
===================================================================
--- trunk/grub2/disk/loopback.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/loopback.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -32,7 +32,7 @@
   struct grub_loopback *next;
 };
 
-static struct grub_loopback *loopback_list; 
+static struct grub_loopback *loopback_list;
 
 static const struct grub_arg_option options[] =
   {
@@ -54,17 +54,17 @@
        prev = &dev->next, dev = dev->next)
     if (grub_strcmp (dev->devname, name) == 0)
       break;
-  
+
   if (! dev)
     return grub_error (GRUB_ERR_BAD_DEVICE, "Device not found");
-  
+
   /* Remove the device from the list.  */
   *prev = dev->next;
 
   grub_free (dev->devname);
   grub_free (dev->filename);
   grub_free (dev);
-  
+
   return 0;
 }
 
@@ -75,56 +75,56 @@
   struct grub_arg_list *state = state = cmd->state;
   grub_file_t file;
   struct grub_loopback *newdev;
-  
+
   if (argc < 1)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
-  
+
   /* Check if `-d' was used.  */
   if (state[0].set)
       return delete_loopback (args[0]);
-  
+
   if (argc < 2)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
 
   file = grub_file_open (args[1]);
   if (! file)
     return grub_errno;
-  
+
   /* Close the file, the only reason for opening it is validation.  */
   grub_file_close (file);
-  
+
   /* First try to replace the old device.  */
   for (newdev = loopback_list; newdev; newdev = newdev->next)
     if (grub_strcmp (newdev->devname, args[0]) == 0)
       break;
-  
+
   if (newdev)
     {
       char *newname = grub_strdup (args[1]);
       if (! newname)
        return grub_errno;
-      
+
       grub_free (newdev->filename);
       newdev->filename = newname;
-      
+
       /* Set has_partitions when `--partitions' was used.  */
       newdev->has_partitions = state[1].set;
-      
+
       return 0;
     }
-  
+
   /* Unable to replace it, make a new entry.  */
   newdev = grub_malloc (sizeof (struct grub_loopback));
   if (! newdev)
     return grub_errno;
-  
+
   newdev->devname = grub_strdup (args[0]);
   if (! newdev->devname)
     {
       grub_free (newdev);
       return grub_errno;
     }
-  
+
   newdev->filename = grub_strdup (args[1]);
   if (! newdev->filename)
     {
@@ -132,14 +132,14 @@
       grub_free (newdev);
       return grub_errno;
     }
-  
+
   /* Set has_partitions when `--partitions' was used.  */
   newdev->has_partitions = state[1].set;
-  
+
   /* Add the new entry to the list.  */
   newdev->next = loopback_list;
   loopback_list = newdev;
-  
+
   return 0;
 }
 
@@ -161,26 +161,26 @@
 {
   grub_file_t file;
   struct grub_loopback *dev;
-    
+
   for (dev = loopback_list; dev; dev = dev->next)
     if (grub_strcmp (dev->devname, name) == 0)
       break;
-  
+
   if (! dev)
     return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't open device");
 
   file = grub_file_open (dev->filename);
   if (! file)
     return grub_errno;
-  
+
   /* Use the filesize for the disk size, round up to a complete sector.  */
   disk->total_sectors = ((file->size + GRUB_DISK_SECTOR_SIZE - 1)
                         / GRUB_DISK_SECTOR_SIZE);
   disk->id = (unsigned long) dev;
-  
+
   disk->has_partitions = dev->has_partitions;
   disk->data = file;
-  
+
   return 0;
 }
 
@@ -188,7 +188,7 @@
 grub_loopback_close (grub_disk_t disk)
 {
   grub_file_t file = (grub_file_t) disk->data;
-  
+
   grub_file_close (file);
 }
 
@@ -198,13 +198,13 @@
 {
   grub_file_t file = (grub_file_t) disk->data;
   grub_off_t pos;
-  
+
   grub_file_seek (file, sector << GRUB_DISK_SECTOR_BITS);
-  
+
   grub_file_read (file, buf, size << GRUB_DISK_SECTOR_BITS);
   if (grub_errno)
     return grub_errno;
-  
+
   /* In case there is more data read than there is available, in case
      of files that are not a multiple of GRUB_DISK_SECTOR_SIZE, fill
      the rest with zeros.  */
@@ -214,7 +214,7 @@
       grub_size_t amount = pos - file->size;
       grub_memset (buf + (size << GRUB_DISK_SECTOR_BITS) - amount, 0, amount);
     }
-  
+
   return 0;
 }
 

Modified: trunk/grub2/disk/lvm.c
===================================================================
--- trunk/grub2/disk/lvm.c      2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/lvm.c      2009-06-10 21:04:23 UTC (rev 2293)
@@ -101,7 +101,7 @@
   disk->id = lv->number;
   disk->data = lv;
   disk->total_sectors = lv->size;
-  
+
   return 0;
 }
 
@@ -174,7 +174,7 @@
 
       stripe += stripenr;
       pv = stripe->pv;
-      
+
       seg_offset = ((grub_uint64_t) stripe->start
                    * (grub_uint64_t) vg->extent_size) + pv->start;
 
@@ -189,7 +189,7 @@
   else
     err = grub_error (GRUB_ERR_UNKNOWN_DEVICE,
                      "Physical volume %s not found", pv->name);
-  
+
   return err;
 }
 
@@ -220,7 +220,7 @@
   unsigned int i, j, vgname_len;
   struct grub_lvm_vg *vg;
   struct grub_lvm_pv *pv;
-  
+
   disk = grub_disk_open (name);
   if (!disk)
     return 0;
@@ -231,7 +231,7 @@
       err = grub_disk_read (disk, i, 0, sizeof(buf), buf);
       if (err)
        goto fail;
-      
+
       if ((! grub_strncmp ((char *)lh->id, GRUB_LVM_LABEL_ID,
                           sizeof (lh->id)))
          && (! grub_strncmp ((char *)lh->type, GRUB_LVM_LVM2_LABEL,
@@ -242,7 +242,7 @@
   /* Return if we didn't find a label. */
   if (i == GRUB_LVM_LABEL_SCAN_SECTORS)
     goto fail;
-  
+
   pvh = (struct grub_lvm_pv_header *) (buf + grub_le_to_cpu32(lh->offset_xl));
 
   for (i = 0, j = 0; i < GRUB_LVM_ID_LEN; i++)
@@ -264,7 +264,7 @@
     {
       grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
                  "We don't support multiple LVM data areas");
-                 
+
       goto fail;
     }
 
@@ -272,12 +272,12 @@
   mda_offset = grub_le_to_cpu64 (dlocn->offset);
   mda_size = grub_le_to_cpu64 (dlocn->size);
   dlocn++;
-  
+
   if (dlocn->offset)
     {
       grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
                  "We don't support multiple LVM metadata areas");
-                 
+
       goto fail;
     }
 
@@ -361,39 +361,39 @@
       if (p)
        {
          p += sizeof ("physical_volumes {") - 1;
-         
+
          /* Add all the pvs to the volume group. */
          while (1)
            {
              int s;
              while (grub_isspace (*p))
                p++;
-             
+
              if (*p == '}')
                break;
-             
+
              pv = grub_malloc (sizeof (*pv));
              q = p;
              while (*q != ' ')
                q++;
-             
+
              s = q - p;
              pv->name = grub_malloc (s + 1);
              grub_memcpy (pv->name, p, s);
              pv->name[s] = '\0';
-             
+
              p = grub_strstr (p, "id = \"");
              if (p == NULL)
                goto pvs_fail;
              p += sizeof("id = \"") - 1;
-             
+
              grub_memcpy (pv->id, p, GRUB_LVM_ID_STRLEN);
              pv->id[GRUB_LVM_ID_STRLEN] = '\0';
-             
+
              pv->start = grub_lvm_getvalue (&p, "pe_start = ");
              if (p == NULL)
                goto pvs_fail;
-             
+
              p = grub_strchr (p, '}');
              if (p == NULL)
                goto pvs_fail;
@@ -402,7 +402,7 @@
              pv->disk = NULL;
              pv->next = vg->pvs;
              vg->pvs = pv;
-             
+
              continue;
            pvs_fail:
              grub_free (pv->name);
@@ -415,49 +415,49 @@
       if (p)
        {
          p += 18;
-         
+
          /* And add all the lvs to the volume group. */
          while (1)
            {
              int s;
              struct grub_lvm_lv *lv;
              struct grub_lvm_segment *seg;
-             
+
              while (grub_isspace (*p))
                p++;
-             
+
              if (*p == '}')
                break;
-             
+
              lv = grub_malloc (sizeof (*lv));
-             
+
              q = p;
              while (*q != ' ')
                q++;
-             
+
              s = q - p;
              lv->name = grub_malloc (vgname_len + 1 + s + 1);
              grub_memcpy (lv->name, vgname, vgname_len);
              lv->name[vgname_len] = '-';
              grub_memcpy (lv->name + vgname_len + 1, p, s);
              lv->name[vgname_len + 1 + s] = '\0';
-             
+
              lv->size = 0;
-             
+
              lv->segment_count = grub_lvm_getvalue (&p, "segment_count = ");
              if (p == NULL)
                goto lvs_fail;
              lv->segments = grub_malloc (sizeof (*seg) * lv->segment_count);
              seg = lv->segments;
-             
+
              for (i = 0; i < lv->segment_count; i++)
                {
                  struct grub_lvm_stripe *stripe;
-                 
+
                  p = grub_strstr (p, "segment");
                  if (p == NULL)
                    goto lvs_segment_fail;
-                 
+
                  seg->start_extent = grub_lvm_getvalue (&p, "start_extent = ");
                  if (p == NULL)
                    goto lvs_segment_fail;
@@ -467,25 +467,25 @@
                  seg->stripe_count = grub_lvm_getvalue (&p, "stripe_count = ");
                  if (p == NULL)
                    goto lvs_segment_fail;
-                 
+
                  lv->size += seg->extent_count * vg->extent_size;
-                 
+
                  if (seg->stripe_count != 1)
                    seg->stripe_size = grub_lvm_getvalue (&p, "stripe_size = ");
-                 
+
                  seg->stripes = grub_malloc (sizeof (*stripe)
                                              * seg->stripe_count);
                  stripe = seg->stripes;
-                 
+
                  p = grub_strstr (p, "stripes = [");
                  if (p == NULL)
                    goto lvs_segment_fail2;
                  p += sizeof("stripes = [") - 1;
-                 
+
                  for (j = 0; j < seg->stripe_count; j++)
                    {
                      char *pvname;
-                     
+
                      p = grub_strchr (p, '"');
                      if (p == NULL)
                        continue;
@@ -494,14 +494,14 @@
                        q++;
 
                      s = q - p;
-                     
+
                      pvname = grub_malloc (s + 1);
                       if (pvname == NULL)
                         goto lvs_segment_fail2;
-                      
+
                      grub_memcpy (pvname, p, s);
                      pvname[s] = '\0';
-                     
+
                      if (vg->pvs)
                        for (pv = vg->pvs; pv; pv = pv->next)
                          {
@@ -511,16 +511,16 @@
                                break;
                              }
                          }
-                     
+
                      grub_free(pvname);
-                     
+
                      stripe->start = grub_lvm_getvalue (&p, ",");
                      if (p == NULL)
                        continue;
-                     
+
                      stripe++;
                    }
-                 
+
                  seg++;
 
                  continue;
@@ -535,7 +535,7 @@
              if (p == NULL)
                goto lvs_fail;
              p += 3;
-             
+
              lv->number = lv_count++;
              lv->vg = vg;
              lv->next = vg->lvs;

Modified: trunk/grub2/disk/memdisk.c
===================================================================
--- trunk/grub2/disk/memdisk.c  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/memdisk.c  2009-06-10 21:04:23 UTC (rev 2293)
@@ -104,7 +104,7 @@
 
       return 0;
     }
-  
+
   grub_module_iterate (hook);
 }
 

Modified: trunk/grub2/disk/raid.c
===================================================================
--- trunk/grub2/disk/raid.c     2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/raid.c     2009-06-10 21:04:23 UTC (rev 2293)
@@ -77,7 +77,7 @@
 grub_raid_iterate (int (*hook) (const char *name))
 {
   struct grub_raid_array *array;
-  
+
   for (array = array_list; array != NULL; array = array->next)
     {
       if (grub_is_array_readable (array))
@@ -95,7 +95,7 @@
   struct grub_raid_array *array = disk->data;
   grub_disk_memberlist_t list = NULL, tmp;
   unsigned int i;
-  
+
   for (i = 0; i < array->total_devs; i++)
     if (array->device[i])
       {
@@ -104,7 +104,7 @@
         tmp->next = list;
         list = tmp;
       }
-  
+
   return list;
 }
 #endif
@@ -114,7 +114,7 @@
 {
   struct grub_raid_array *array;
   unsigned n;
-  
+
   for (array = array_list; array != NULL; array = array->next)
     {
       if (!grub_strcmp (array->name, name))
@@ -161,7 +161,7 @@
 
   grub_dprintf ("raid", "%s: level=%d, total_sectors=%lld\n", name,
                array->level, (unsigned long long) disk->total_sectors);
-  
+
   return 0;
 }
 
@@ -348,7 +348,7 @@
           p = array->total_devs - n;
 
        read_sector *= array->chunk_size;
-       
+
        while (1)
          {
             grub_size_t read_size;
@@ -405,7 +405,7 @@
                 if (err)
                   break;
               }
-           
+
            buf += read_size << GRUB_DISK_SECTOR_BITS;
            size -= read_size;
            if (! size)
@@ -460,7 +460,7 @@
       }
       break;
     }
-  
+
   return err;
 }
 
@@ -478,7 +478,7 @@
               const char *scanner_name)
 {
   struct grub_raid_array *array = 0, *p;
-  
+
   /* See whether the device is part of an array we have already seen a
      device from. */
   for (p = array_list; p != NULL; p = p->next)
@@ -524,7 +524,7 @@
       *array = *new_array;
       array->nr_devs = 0;
       grub_memset (&array->device, 0, sizeof (array->device));
-      
+
       /* Check whether we don't have multiple arrays with the same number. */
       for (p = array_list; p != NULL; p = p->next)
         {
@@ -635,7 +635,7 @@
 
       return 0;
     }
-  
+
   grub_device_iterate (&hook);
 }
 
@@ -649,7 +649,7 @@
     {
       struct grub_raid_array *p;
       int i;
-         
+
       p = array;
       array = array->next;
 
@@ -664,7 +664,7 @@
 
   array_list = 0;
 }
-  
+
 void
 grub_raid_register (grub_raid_t raid)
 {

Modified: trunk/grub2/disk/scsi.c
===================================================================
--- trunk/grub2/disk/scsi.c     2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/scsi.c     2009-06-10 21:04:23 UTC (rev 2293)
@@ -301,7 +301,7 @@
                                 << GRUB_DISK_SECTOR_BITS);
 
          grub_dprintf ("scsi", "capacity=%llu, blksize=%d\n",
-                       (unsigned long long) disk->total_sectors, 
+                       (unsigned long long) disk->total_sectors,
                        scsi->blocksize);
 
          return GRUB_ERR_NONE;

Modified: trunk/grub2/disk/usbms.c
===================================================================
--- trunk/grub2/disk/usbms.c    2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/disk/usbms.c    2009-06-10 21:04:23 UTC (rev 2293)
@@ -267,7 +267,7 @@
                             "can't read from USB Mass Storage device");
        }
     }
-  else 
+  else
     {
       err = grub_usb_bulk_write (dev->dev, dev->in->endp_addr & 15, size, buf);
       grub_dprintf ("usb", "write: %d %d\n", err, GRUB_USB_ERR_STALL);
@@ -379,7 +379,7 @@
     .close = grub_usbms_close,
     .read = grub_usbms_read,
     .write = grub_usbms_write
-  }; 
+  };
 
 GRUB_MOD_INIT(usbms)
 {

Modified: trunk/grub2/docs/grub.texi
===================================================================
--- trunk/grub2/docs/grub.texi  2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/docs/grub.texi  2009-06-10 21:04:23 UTC (rev 2293)
@@ -664,7 +664,7 @@
 which can cause compatibility problems.
 
 For booting from a CD-ROM, GRUB uses a special Stage 2 called
address@hidden The only GRUB files you need to have in your 
address@hidden The only GRUB files you need to have in your
 bootable CD-ROM are this @file{stage2_eltorito} and optionally a config file
 @file{menu.lst}. You don't need to use @file{stage1} or @file{stage2},
 because El Torito is quite different from the standard boot process.
@@ -702,13 +702,13 @@
 
 This produces a file named @file{grub.iso}, which then can be burned
 into a CD (or a DVD).  @kbd{mkisofs} has already set up the disc to boot
-from the @kbd{boot/grub/stage2_eltorito} file, so there is no need to 
+from the @kbd{boot/grub/stage2_eltorito} file, so there is no need to
 setup GRUB on the disc.  (Note that the @kbd{-boot-load-size 4} bit is
 required for compatibility with the BIOS on many older machines.)
 
 You can use the device @samp{(cd)} to access a CD-ROM in your
-config file. This is not required; GRUB automatically sets the root device 
-to @samp{(cd)} when booted from a CD-ROM. It is only necessary to refer to 
+config file. This is not required; GRUB automatically sets the root device
+to @samp{(cd)} when booted from a CD-ROM. It is only necessary to refer to
 @samp{(cd)} if you want to access other drives as well.
 
 
@@ -2414,7 +2414,7 @@
 be in the range 5-8 and stop bits must be 1 or 2. Default is 8 data
 bits and one stop bit. @var{parity} is one of @samp{no}, @samp{odd},
 @samp{even} and defaults to @samp{no}. The option @option{--device}
-can only be used in the grub shell and is used to specify the 
+can only be used in the grub shell and is used to specify the
 tty device to be used in the host operating system (@pxref{Invoking the
 grub shell}).
 
@@ -2431,8 +2431,8 @@
 
 @deffn Command setkey [to_key from_key]
 Change the keyboard map. The key @var{from_key} is mapped to the key
address@hidden If no argument is specified, reset key mappings. Note that 
-this command @emph{does not} exchange the keys. If you want to exchange 
address@hidden If no argument is specified, reset key mappings. Note that
+this command @emph{does not} exchange the keys. If you want to exchange
 the keys, run this command again with the arguments exchanged, like this:
 
 @example

Modified: trunk/grub2/docs/texinfo.tex
===================================================================
--- trunk/grub2/docs/texinfo.tex        2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/docs/texinfo.tex        2009-06-10 21:04:23 UTC (rev 2293)
@@ -354,7 +354,7 @@
                % We don't want .vr (or whatever) entries like this:
                % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
                % "\acronym" won't work when it's read back in;
-               % it needs to be 
+               % it needs to be
                % {\code {{\tt \backslashcurfont }acronym}
     \shipout\vbox{%
       % Do this early so pdf references go to the beginning of the page.
@@ -705,7 +705,7 @@
 \def\?{?\spacefactor=\endofsentencespacefactor\space}
 
 % @frenchspacing on|off  says whether to put extra space after punctuation.
-% 
+%
 \def\onword{on}
 \def\offword{off}
 %
@@ -1260,7 +1260,7 @@
 % that's what we do).
 
 % double active backslashes.
-% 
+%
 address@hidden \catcode`\\=\active
  @address@hidden
    @address@hidden@active
@@ -1272,11 +1272,11 @@
 % us) handles it with this amazing macro to replace tokens, with minor
 % changes for Texinfo.  It is included here under the GPL by permission
 % from the author, Heiko Oberdiek.
-% 
+%
 % #1 is the tokens to replace.
 % #2 is the replacement.
 % #3 is the control sequence with the string.
-% 
+%
 \def\HyPsdSubst#1#2#3{%
   \def\HyPsdReplace##1#1##2\END{%
     ##1%
@@ -1542,7 +1542,7 @@
       % tried to figure out what each command should do in the context
       % of @url.  for now, just make @/ a no-op, that's the only one
       % people have actually reported a problem with.
-      % 
+      %
       \normalturnoffactive
       address@hidden@}%
       \let\/=\empty
@@ -1939,7 +1939,7 @@
 
 % Definitions for a main text size of 11pt.  This is the default in
 % Texinfo.
-% 
+%
 \def\definetextfontsizexi{%
 % Text fonts (11.2pt, magstep1).
 \def\textnominalsize{11pt}
@@ -2072,7 +2072,7 @@
 % section, chapter, etc., sizes following suit.  This is for the GNU
 % Press printing of the Emacs 22 manual.  Maybe other manuals in the
 % future.  Used with @smallbook, which sets the leading to 12pt.
-% 
+%
 \def\definetextfontsizex{%
 % Text fonts (10pt).
 \def\textnominalsize{10pt}
@@ -2163,7 +2163,7 @@
 \setfont\secsf\sfbshape{12}{1000}{OT1}
 \let\secbf\secrm
 \setfont\secsc\scbshape{10}{\magstep1}{OT1}
-\font\seci=cmmi12 
+\font\seci=cmmi12
 \font\secsy=cmsy10 scaled \magstep1
 \def\sececsize{1200}
 
@@ -2207,7 +2207,7 @@
 % We provide the user-level command
 %   @fonttextsize 10
 % (or 11) to redefine the text font size.  pt is assumed.
-% 
+%
 \def\xword{10}
 \def\xiword{11}
 %
@@ -2217,7 +2217,7 @@
   %
   % Set \globaldefs so that documents can use this inside @tex, since
   % makeinfo 4.8 does not support it, but we need it nonetheless.
-  % 
+  %
  \begingroup \globaldefs=1
   \ifx\textsizearg\xword \definetextfontsizex
   \else \ifx\textsizearg\xiword \definetextfontsizexi
@@ -2503,7 +2503,7 @@
 % each of the four underscores in __typeof__.  This is undesirable in
 % some manuals, especially if they don't have long identifiers in
 % general.  @allowcodebreaks provides a way to control this.
-% 
+%
 \newif\ifallowcodebreaks  \allowcodebreakstrue
 
 \def\keywordtrue{true}
@@ -2634,7 +2634,7 @@
 % @acronym for "FBI", "NATO", and the like.
 % We print this one point size smaller, since it's intended for
 % all-uppercase.
-% 
+%
 \def\acronym#1{\doacronym #1,,\finish}
 \def\doacronym#1,#2,#3\finish{%
   {\selectfonts\lsize #1}%
@@ -2646,7 +2646,7 @@
 
 % @abbr for "Comput. J." and the like.
 % No font change, but don't do end-of-sentence spacing.
-% 
+%
 \def\abbr#1{\doabbr #1,,\finish}
 \def\doabbr#1,#2,#3\finish{%
   {\plainfrenchspacing #1}%
@@ -2665,43 +2665,43 @@
 % Theiling, which support regular, slanted, bold and bold slanted (and
 % "outlined" (blackboard board, sort of) versions, which we don't need).
 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
-% 
+%
 % Although only regular is the truly official Euro symbol, we ignore
 % that.  The Euro is designed to be slightly taller than the regular
 % font height.
-% 
+%
 % feymr - regular
 % feymo - slanted
 % feybr - bold
 % feybo - bold slanted
-% 
+%
 % There is no good (free) typewriter version, to my knowledge.
 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
 % Hmm.
-% 
+%
 % Also doesn't work in math.  Do we need to do math with euro symbols?
 % Hope not.
-% 
-% 
+%
+%
 \def\euro{{\eurofont e}}
 \def\eurofont{%
   % We set the font at each command, rather than predefining it in
   % \textfonts and the other font-switching commands, so that
   % installations which never need the symbol don't have to have the
   % font installed.
-  % 
+  %
   % There is only one designed size (nominal 10pt), so we always scale
   % that to the current nominal size.
-  % 
+  %
   % By the way, simply using "at 1em" works for cmr10 and the like, but
   % does not work for cmbx10 and other extended/shrunken fonts.
-  % 
+  %
   \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
   %
-  \ifx\curfontstyle\bfstylename 
+  \ifx\curfontstyle\bfstylename
     % bold:
     \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
-  \else 
+  \else
     % regular:
     \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
   \fi
@@ -2754,7 +2754,7 @@
 % Laurent Siebenmann reports \Orb undefined with:
 %  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
 % so we'll define it if necessary.
-% 
+%
 \ifx\Orb\undefined
 \def\Orb{\mathhexbox20D}
 \fi
@@ -3102,7 +3102,7 @@
     % cause the example and the item to crash together.  So we use this
     % bizarre value of 10001 as a signal to \aboveenvbreak to insert
     % \parskip glue after all.  Section titles are handled this way also.
-    % 
+    %
     \penalty 10001
     \endgroup
     \itemxneedsnegativevskipfalse
@@ -3898,7 +3898,7 @@
   % processing continues to some further point.  On the other hand, it
   % seems \endinput does not hurt in the printed index arg, since that
   % is still getting written without apparent harm.
-  % 
+  %
   % Sample source (mac-idx3.tex, reported by Graham Percival to
   % help-texinfo, 22may06):
   % @macro funindex {WORD}
@@ -3906,12 +3906,12 @@
   % @end macro
   % ...
   % @funindex commtest
-  % 
+  %
   % The above is not enough to reproduce the bug, but it gives the flavor.
-  % 
+  %
   % Sample whatsit resulting:
   % address@hidden@folio address@hidden address@hidden }}}
-  % 
+  %
   % So:
   \let\endinput = \empty
   %
@@ -4167,11 +4167,11 @@
   % makeinfo does not expand macros in the argument to @deffn, which ends up
   % writing an index entry, and texindex isn't prepared for an index sort entry
   % that starts with \.
-  % 
+  %
   % Since macro invocations are followed by braces, we can just redefine them
   % to take a single TeX argument.  The case of a macro invocation that
   % goes to end-of-line is not handled.
-  % 
+  %
   \macrolist
 }
 
@@ -4299,7 +4299,7 @@
     % to re-insert the same penalty (values >10000 are used for various
     % signals); since we just inserted a non-discardable item, any
     % following glue (such as a \parskip) would be a breakpoint.  For example:
-    % 
+    %
     %   @deffn deffn-whatever
     %   @vindex index-whatever
     %   Description.
@@ -5365,11 +5365,11 @@
   % glue accumulate.  (Not a breakpoint because it's preceded by a
   % discardable item.)
   \vskip-\parskip
-  % 
+  %
   % This is purely so the last item on the list is a known \penalty >
   % 10000.  This is so \startdefun can avoid allowing breakpoints after
   % section headings.  Otherwise, it would insert a valid breakpoint between:
-  % 
+  %
   %   @section sec-whatever
   %   @deffn def-whatever
   \penalty 10001
@@ -5427,7 +5427,7 @@
 % These characters do not print properly in the Computer Modern roman
 % fonts, so we must take special care.  This is more or less redundant
 % with the Texinfo input format setup at the end of this file.
-% 
+%
 \def\activecatcodes{%
   \catcode`\"=\active
   \catcode`\$=\active
@@ -5477,7 +5477,7 @@
 
 % redefined for the two-volume lispref.  We always output on
 % \jobname.toc even if this is redefined.
-% 
+%
 \def\tocreadfilename{\jobname.toc}
 
 % Normal (long) toc.
@@ -6032,8 +6032,8 @@
 % from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
 % the default, but it works for pasting with more pdf viewers (at least
 % evince), the lilypond developers report.  xpdf does work with the
-% regular 0x27.  
-% 
+% regular 0x27.
+%
 \def\codequoteright{%
   \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
     \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
@@ -6045,7 +6045,7 @@
 % and a similar option for the left quote char vs. a grave accent.
 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
 % the code environments to do likewise.
-% 
+%
 \def\codequoteleft{%
   \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
     \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
@@ -6576,7 +6576,7 @@
 % This does \let #1 = #2, with \csnames; that is,
 %   \let \csname#1\endcsname = \csname#2\endcsname
 % (except of course we have to play expansion games).
-% 
+%
 \def\cslet#1#2{%
   \expandafter\let
   \csname#1\expandafter\endcsname
@@ -7734,7 +7734,7 @@
 %
 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
 % try txi-de.tex.
-% 
+%
 \def\documentlanguagetrywithoutunderscore#1_#2\finish{%
   \openin 1 txi-#1.tex
   \ifeof 1
@@ -7790,7 +7790,7 @@
      \setnonasciicharscatcode\active
      \lattwochardefs
   %
-  \else \ifx \declaredencoding \latone 
+  \else \ifx \declaredencoding \latone
      \setnonasciicharscatcode\active
      \latonechardefs
   %
@@ -7802,7 +7802,7 @@
      \setnonasciicharscatcode\active
      \utfeightchardefs
   %
-  \else 
+  \else
     \message{Unknown document encoding #1, ignoring.}%
   %
   \fi % utfeight
@@ -7814,7 +7814,7 @@
 
 % A message to be logged when using a character that isn't available
 % the default font encoding (OT1).
-% 
+%
 \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
 
 % Take account of \c (plain) vs. \, (Texinfo) difference.
@@ -7827,21 +7827,21 @@
 %
 % Latin1 (ISO-8859-1) character definitions.
 \def\latonechardefs{%
-  \gdef^^a0{~} 
+  \gdef^^a0{~}
   \gdef^^a1{\exclamdown}
-  \gdef^^a2{\missingcharmsg{CENT SIGN}} 
+  \gdef^^a2{\missingcharmsg{CENT SIGN}}
   \gdef^^a3{{\pounds}}
   \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
   \gdef^^a5{\missingcharmsg{YEN SIGN}}
-  \gdef^^a6{\missingcharmsg{BROKEN BAR}} 
+  \gdef^^a6{\missingcharmsg{BROKEN BAR}}
   \gdef^^a7{\S}
-  \gdef^^a8{\"{}} 
-  \gdef^^a9{\copyright} 
+  \gdef^^a8{\"{}}
+  \gdef^^a9{\copyright}
   \gdef^^aa{\ordf}
-  \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} 
+  \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}}
   \gdef^^ac{$\lnot$}
-  \gdef^^ad{\-} 
-  \gdef^^ae{\registeredsymbol} 
+  \gdef^^ad{\-}
+  \gdef^^ae{\registeredsymbol}
   \gdef^^af{\={}}
   %
   \gdef^^b0{\textdegree}
@@ -7868,7 +7868,7 @@
   \gdef^^c2{\^A}
   \gdef^^c3{\~A}
   \gdef^^c4{\"A}
-  \gdef^^c5{\ringaccent A} 
+  \gdef^^c5{\ringaccent A}
   \gdef^^c6{\AE}
   \gdef^^c7{\cedilla C}
   \gdef^^c8{\`E}
@@ -8009,7 +8009,7 @@
   \gdef^^d6{\"O}
   \gdef^^d7{$\times$}
   \gdef^^d8{\v R}
-  \gdef^^d9{\ringaccent U} 
+  \gdef^^d9{\ringaccent U}
   \gdef^^da{\'U}
   \gdef^^db{\H U}
   \gdef^^dc{\"U}
@@ -8053,11 +8053,11 @@
 }
 
 % UTF-8 character definitions.
-% 
+%
 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
 % changes for Texinfo conventions.  It is included here under the GPL by
 % permission from Frank Mittelbach and the LaTeX team.
-% 
+%
 \newcount\countUTFx
 \newcount\countUTFy
 \newcount\countUTFz
@@ -8897,7 +8897,7 @@
 
 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
 % the literal character `\'.
-% 
+%
 @address@hidden
   @address@hidden
   @let"address@hidden

Modified: trunk/grub2/efiemu/i386/loadcore32.c
===================================================================
--- trunk/grub2/efiemu/i386/loadcore32.c        2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/efiemu/i386/loadcore32.c        2009-06-10 21:04:23 UTC (rev 
2293)
@@ -38,7 +38,7 @@
 
 /* Relocate symbols.  */
 grub_err_t
-grub_arch_efiemu_relocate_symbols32 (grub_efiemu_segment_t segs, 
+grub_arch_efiemu_relocate_symbols32 (grub_efiemu_segment_t segs,
                                     struct grub_efiemu_elf_sym *elfsyms,
                                     void *ehdr)
 {
@@ -66,7 +66,7 @@
        if (seg)
          {
            Elf32_Rel *rel, *max;
-           
+
            for (rel = (Elf32_Rel *) ((char *) e + s->sh_offset),
                   max = rel + s->sh_size / s->sh_entsize;
                 rel < max;
@@ -77,31 +77,31 @@
                if (seg->size < rel->r_offset)
                  return grub_error (GRUB_ERR_BAD_MODULE,
                                     "reloc offset is out of the segment");
-               
-               addr = (Elf32_Word *) 
-                 ((char *) grub_efiemu_mm_obtain_request (seg->handle) 
+
+               addr = (Elf32_Word *)
+                 ((char *) grub_efiemu_mm_obtain_request (seg->handle)
                   + seg->off + rel->r_offset);
                sym = elfsyms[ELF32_R_SYM (rel->r_info)];
-               
+
                switch (ELF32_R_TYPE (rel->r_info))
                  {
                  case R_386_32:
-                   if ((err = grub_efiemu_write_value 
-                        (addr, sym.off + *addr, sym.handle, 0, 
+                   if ((err = grub_efiemu_write_value
+                        (addr, sym.off + *addr, sym.handle, 0,
                          seg->ptv_rel_needed, sizeof (grub_uint32_t))))
                      return err;
-                   
+
                    break;
 
                  case R_386_PC32:
                    if ((err = grub_efiemu_write_value
-                        (addr, sym.off + *addr - rel->r_offset 
-                         - seg->off, sym.handle, seg->handle, 
+                        (addr, sym.off + *addr - rel->r_offset
+                         - seg->off, sym.handle, seg->handle,
                          seg->ptv_rel_needed, sizeof (grub_uint32_t))))
                      return err;
                    break;
                  default:
-                   return grub_error (GRUB_ERR_BAD_OS, 
+                   return grub_error (GRUB_ERR_BAD_OS,
                                       "unrecognised relocation");
                  }
              }

Modified: trunk/grub2/efiemu/i386/loadcore64.c
===================================================================
--- trunk/grub2/efiemu/i386/loadcore64.c        2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/efiemu/i386/loadcore64.c        2009-06-10 21:04:23 UTC (rev 
2293)
@@ -37,7 +37,7 @@
 
 /* Relocate symbols.  */
 grub_err_t
-grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs, 
+grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
                                     struct grub_efiemu_elf_sym *elfsyms,
                                     void *ehdr)
 {
@@ -62,9 +62,9 @@
        if (seg)
          {
            Elf64_Rela *rel, *max;
-           
+
            for (rel = (Elf64_Rela *) ((char *) e + s->sh_offset),
-                  max = rel + (unsigned long) s->sh_size 
+                  max = rel + (unsigned long) s->sh_size
                   / (unsigned long)s->sh_entsize;
                 rel < max;
                 rel++)
@@ -76,40 +76,40 @@
                if (seg->size < rel->r_offset)
                  return grub_error (GRUB_ERR_BAD_MODULE,
                                     "reloc offset is out of the segment");
-               
+
                addr =
-                 ((char *) grub_efiemu_mm_obtain_request (seg->handle) 
+                 ((char *) grub_efiemu_mm_obtain_request (seg->handle)
                   + seg->off + rel->r_offset);
                addr32 = (grub_uint32_t *) addr;
                addr64 = (grub_uint64_t *) addr;
                sym = elfsyms[ELF64_R_SYM (rel->r_info)];
-               
+
                switch (ELF64_R_TYPE (rel->r_info))
                  {
                  case R_X86_64_64:
-                   if ((err = grub_efiemu_write_value 
-                        (addr, *addr64 + rel->r_addend + sym.off, sym.handle, 
+                   if ((err = grub_efiemu_write_value
+                        (addr, *addr64 + rel->r_addend + sym.off, sym.handle,
                          0, seg->ptv_rel_needed, sizeof (grub_uint64_t))))
                      return err;
                    break;
 
                  case R_X86_64_PC32:
                    if ((err = grub_efiemu_write_value
-                        (addr, *addr32 + rel->r_addend + sym.off 
-                         - rel->r_offset - seg->off, sym.handle, seg->handle, 
+                        (addr, *addr32 + rel->r_addend + sym.off
+                         - rel->r_offset - seg->off, sym.handle, seg->handle,
                          seg->ptv_rel_needed, sizeof (grub_uint32_t))))
                      return err;
                    break;
 
                   case R_X86_64_32:
                   case R_X86_64_32S:
-                   if ((err = grub_efiemu_write_value 
-                        (addr, *addr32 + rel->r_addend + sym.off, sym.handle, 
+                   if ((err = grub_efiemu_write_value
+                        (addr, *addr32 + rel->r_addend + sym.off, sym.handle,
                          0, seg->ptv_rel_needed, sizeof (grub_uint32_t))))
                      return err;
                     break;
                  default:
-                   return grub_error (GRUB_ERR_BAD_OS, 
+                   return grub_error (GRUB_ERR_BAD_OS,
                                       "unrecognised relocation");
                  }
              }

Modified: trunk/grub2/efiemu/i386/pc/cfgtables.c
===================================================================
--- trunk/grub2/efiemu/i386/pc/cfgtables.c      2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/efiemu/i386/pc/cfgtables.c      2009-06-10 21:04:23 UTC (rev 
2293)
@@ -59,7 +59,7 @@
        return err;
     }
 
-  for (ptr = (grub_uint8_t *) 0xf0000; ptr < (grub_uint8_t *) 0x100000; 
+  for (ptr = (grub_uint8_t *) 0xf0000; ptr < (grub_uint8_t *) 0x100000;
        ptr += 16)
     if (grub_memcmp (ptr, "_SM_", 4) == 0
        && grub_byte_checksum (ptr, *(ptr + 5)) == 0)

Modified: trunk/grub2/efiemu/loadcore.c
===================================================================
--- trunk/grub2/efiemu/loadcore.c       2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/efiemu/loadcore.c       2009-06-10 21:04:23 UTC (rev 2293)
@@ -40,7 +40,7 @@
     if (seg->section == n)
       {
        *handle = seg->handle;
-       *off = seg->off;        
+       *off = seg->off;
        return GRUB_ERR_NONE;
       }
 
@@ -86,7 +86,7 @@
   grub_efiemu_segment_t cur;
 
   grub_dprintf ("efiemu", "loading segments\n");
-  
+
   for (cur=segs; cur; cur = cur->next)
     {
       s = (Elf_Shdr *)cur->srcptr;
@@ -94,10 +94,10 @@
       if ((s->sh_flags & SHF_ALLOC) && s->sh_size)
        {
          void *addr;
-         
-         addr = (grub_uint8_t *) grub_efiemu_mm_obtain_request (cur->handle) 
+
+         addr = (grub_uint8_t *) grub_efiemu_mm_obtain_request (cur->handle)
            + cur->off;
-         
+
          switch (s->sh_type)
            {
            case SHT_PROGBITS:
@@ -145,11 +145,11 @@
          seg = (grub_efiemu_segment_t) grub_malloc (sizeof (*seg));
          if (! seg)
            return grub_errno;
-         
+
          if (s->sh_size)
            {
-             seg->handle 
-               = grub_efiemu_request_memalign 
+             seg->handle
+               = grub_efiemu_request_memalign
                (s->sh_addralign, s->sh_size,
                 s->sh_flags & SHF_EXECINSTR ? GRUB_EFI_RUNTIME_SERVICES_CODE
                 : GRUB_EFI_RUNTIME_SERVICES_DATA);
@@ -157,12 +157,12 @@
                return grub_errno;
              seg->off = 0;
            }
-         
-         /* 
+
+         /*
             .text-physical doesn't need to be relocated when switching to
             virtual mode
           */
-         if (!grub_strcmp (grub_efiemu_get_string (s->sh_name, e), 
+         if (!grub_strcmp (grub_efiemu_get_string (s->sh_name, e),
                            ".text-physical"))
            seg->ptv_rel_needed = 0;
          else
@@ -174,7 +174,7 @@
          *segs = seg;
        }
     }
-  
+
   return GRUB_ERR_NONE;
 }
 
@@ -185,7 +185,7 @@
   unsigned i;
   Elf_Shdr *s;
   int num = 0;
-  
+
   /* Symbols */
   for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
        i < e->e_shnum;
@@ -197,7 +197,7 @@
     return grub_error (GRUB_ERR_BAD_OS, "no symbol table");
 
   grub_efiemu_nelfsyms = (unsigned) s->sh_size / (unsigned) s->sh_entsize;
-  grub_efiemu_elfsyms = (struct grub_efiemu_elf_sym *) 
+  grub_efiemu_elfsyms = (struct grub_efiemu_elf_sym *)
     grub_malloc (sizeof (struct grub_efiemu_elf_sym) * grub_efiemu_nelfsyms);
 
   /* Relocators */
@@ -221,7 +221,7 @@
   Elf_Sym *sym;
   const char *str;
   Elf_Word size, entsize;
-  
+
   grub_dprintf ("efiemu", "resolving symbols\n");
 
   for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
@@ -267,7 +267,7 @@
          break;
 
        case STT_OBJECT:
-         if ((err = grub_efiemu_get_section_addr 
+         if ((err = grub_efiemu_get_section_addr
               (segs, sym->st_shndx, &handle, &off)))
            return err;
 
@@ -280,7 +280,7 @@
          break;
 
        case STT_FUNC:
-         if ((err = grub_efiemu_get_section_addr 
+         if ((err = grub_efiemu_get_section_addr
               (segs, sym->st_shndx, &handle, &off)))
            return err;
 
@@ -293,12 +293,12 @@
          break;
 
        case STT_SECTION:
-         if ((err = grub_efiemu_get_section_addr 
+         if ((err = grub_efiemu_get_section_addr
               (segs, sym->st_shndx, &handle, &off)))
            {
              grub_efiemu_elfsyms[i].handle = 0;
              grub_efiemu_elfsyms[i].off = 0;
-             grub_errno = GRUB_ERR_NONE; 
+             grub_errno = GRUB_ERR_NONE;
              break;
            }
 
@@ -346,8 +346,8 @@
 
 /* Load runtime definitively */
 grub_err_t
-SUFFIX (grub_efiemu_loadcore_load) (void *core, 
-                                   grub_size_t core_size 
+SUFFIX (grub_efiemu_loadcore_load) (void *core,
+                                   grub_size_t core_size
                                    __attribute__ ((unused)),
                                    grub_efiemu_segment_t segments)
 {
@@ -356,10 +356,10 @@
     return err;
   if ((err = grub_efiemu_resolve_symbols (segments, core)))
     return err;
-  if ((err = SUFFIX (grub_arch_efiemu_relocate_symbols) (segments, 
+  if ((err = SUFFIX (grub_arch_efiemu_relocate_symbols) (segments,
                                                         grub_efiemu_elfsyms,
                                                         core)))
     return err;
-    
+
   return GRUB_ERR_NONE;
 }

Modified: trunk/grub2/efiemu/loadcore_common.c
===================================================================
--- trunk/grub2/efiemu/loadcore_common.c        2009-06-10 21:01:29 UTC (rev 
2292)
+++ trunk/grub2/efiemu/loadcore_common.c        2009-06-10 21:04:23 UTC (rev 
2293)
@@ -45,7 +45,7 @@
 
 /* Check the header and set mode */
 static grub_err_t
-grub_efiemu_check_header (void *ehdr, grub_size_t size, 
+grub_efiemu_check_header (void *ehdr, grub_size_t size,
                          grub_efiemu_mode_t *mode)
 {
   /* Check the magic numbers.  */
@@ -91,7 +91,7 @@
     case GRUB_EFIEMU64:
       grub_efiemu_loadcore_unload64 ();
       break;
-      
+
     default:
       break;
     }
@@ -109,7 +109,7 @@
   return GRUB_ERR_NONE;
 }
 
-/* Load runtime file and do some initial preparations */ 
+/* Load runtime file and do some initial preparations */
 grub_err_t
 grub_efiemu_loadcore_init (grub_file_t file)
 {
@@ -121,7 +121,7 @@
   if (! efiemu_core)
     return grub_errno;
 
-  if (grub_file_read (file, efiemu_core, efiemu_core_size) 
+  if (grub_file_read (file, efiemu_core, efiemu_core_size)
       != (int) efiemu_core_size)
     {
       grub_free (efiemu_core);
@@ -129,7 +129,7 @@
       return grub_errno;
     }
 
-  if (grub_efiemu_check_header (efiemu_core, efiemu_core_size, 
+  if (grub_efiemu_check_header (efiemu_core, efiemu_core_size,
                                &grub_efiemu_mode))
     {
       grub_free (efiemu_core);
@@ -160,7 +160,7 @@
          return err;
        }
       break;
-      
+
     default:
       return grub_error (GRUB_ERR_BAD_OS, "unknown EFI runtime");
     }

Modified: trunk/grub2/efiemu/main.c
===================================================================
--- trunk/grub2/efiemu/main.c   2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/efiemu/main.c   2009-06-10 21:04:23 UTC (rev 2293)
@@ -17,8 +17,8 @@
  */
 
 /* This is an emulation of EFI runtime services.
-   This allows a more uniform boot on i386 machines. 
-   As it emulates only runtime service it isn't able 
+   This allows a more uniform boot on i386 machines.
+   As it emulates only runtime service it isn't able
    to chainload EFI bootloader on non-EFI system. */
 
 
@@ -112,7 +112,7 @@
 
 grub_err_t
 grub_efiemu_register_prepare_hook (grub_err_t (*hook) (void *data),
-                                  void (*unload) (void *data), 
+                                  void (*unload) (void *data),
                                   void *data)
 {
   struct grub_efiemu_prepare_hook *nhook;
@@ -129,20 +129,20 @@
   return GRUB_ERR_NONE;
 }
 
-/* Register a configuration table either supplying the address directly 
+/* Register a configuration table either supplying the address directly
    or with a hook
 */
 grub_err_t
-grub_efiemu_register_configuration_table (grub_efi_guid_t guid, 
+grub_efiemu_register_configuration_table (grub_efi_guid_t guid,
                                          void * (*get_table) (void *data),
-                                         void (*unload) (void *data), 
+                                         void (*unload) (void *data),
                                          void *data)
 {
   struct grub_efiemu_configuration_table *tbl;
   grub_err_t err;
- 
+
  if (! get_table && ! data)
-    return grub_error (GRUB_ERR_BAD_ARGUMENT, 
+    return grub_error (GRUB_ERR_BAD_ARGUMENT,
                       "you must set at least get_table or data");
   if ((err = grub_efiemu_unregister_configuration_table (guid)))
     return err;
@@ -163,7 +163,7 @@
 
 static grub_err_t
 grub_cmd_efiemu_unload (grub_command_t cmd __attribute__ ((unused)),
-                       int argc __attribute__ ((unused)), 
+                       int argc __attribute__ ((unused)),
                        char *args[] __attribute__ ((unused)))
 {
   return grub_efiemu_unload ();
@@ -171,7 +171,7 @@
 
 static grub_err_t
 grub_cmd_efiemu_prepare (grub_command_t cmd __attribute__ ((unused)),
-                        int argc __attribute__ ((unused)), 
+                        int argc __attribute__ ((unused)),
                         char *args[] __attribute__ ((unused)))
 {
   return grub_efiemu_prepare ();
@@ -180,15 +180,15 @@
 
 
 
-int 
-grub_efiemu_exit_boot_services (grub_efi_uintn_t map_key 
+int
+grub_efiemu_exit_boot_services (grub_efi_uintn_t map_key
                                __attribute__ ((unused)))
 {
   /* Nothing to do here yet */
   return 1;
 }
 
-int 
+int
 grub_efiemu_finish_boot_services (void)
 {
   /* Nothing to do here yet */
@@ -201,11 +201,11 @@
 {
   grub_file_t file;
   grub_err_t err;
-  
+
   file = grub_file_open (filename);
   if (! file)
     return 0;
-  
+
   err = grub_efiemu_mm_init ();
   if (err)
     {
@@ -244,19 +244,19 @@
     return GRUB_ERR_NONE;
 
   prefix = grub_env_get ("prefix");
-  
+
   if (! prefix)
-    return grub_error (GRUB_ERR_FILE_NOT_FOUND, 
+    return grub_error (GRUB_ERR_FILE_NOT_FOUND,
                       "couldn't find efiemu core because prefix "
                       "isn't set");
-  
+
   suffix = grub_efiemu_get_default_core_name ();
-  
+
   filename = grub_malloc (grub_strlen (prefix) + grub_strlen (suffix) + 2);
   if (! filename)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+    return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                       "couldn't allocate temporary space");
-  
+
   grub_sprintf (filename, "%s/%s", prefix, suffix);
 
   err = grub_efiemu_load_file (filename);
@@ -277,7 +277,7 @@
 {
   grub_err_t err;
 
-  grub_dprintf ("efiemu", "Preparing %d-bit efiemu\n", 
+  grub_dprintf ("efiemu", "Preparing %d-bit efiemu\n",
                8 * grub_efiemu_sizeof_uintn_t ());
 
   err = grub_efiemu_autocore ();
@@ -321,16 +321,16 @@
 
 GRUB_MOD_INIT(efiemu)
 {
-  cmd_loadcore = grub_register_command ("efiemu_loadcore", 
-                                       grub_cmd_efiemu_load, 
-                                      "efiemu_loadcore FILE", 
+  cmd_loadcore = grub_register_command ("efiemu_loadcore",
+                                       grub_cmd_efiemu_load,
+                                      "efiemu_loadcore FILE",
                                       "Load and initialize EFI emulator");
-  cmd_prepare = grub_register_command ("efiemu_prepare", 
-                                      grub_cmd_efiemu_prepare, 
-                                      "efiemu_prepare", 
+  cmd_prepare = grub_register_command ("efiemu_prepare",
+                                      grub_cmd_efiemu_prepare,
+                                      "efiemu_prepare",
                                       "Finalize loading of EFI emulator");
-  cmd_unload = grub_register_command ("efiemu_unload", grub_cmd_efiemu_unload, 
-                                     "efiemu_unload", 
+  cmd_unload = grub_register_command ("efiemu_unload", grub_cmd_efiemu_unload,
+                                     "efiemu_unload",
                                      "Unload  EFI emulator");
   grub_efiemu_pnvram_cmd_register ();
 }

Modified: trunk/grub2/efiemu/mm.c
===================================================================
--- trunk/grub2/efiemu/mm.c     2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/efiemu/mm.c     2009-06-10 21:04:23 UTC (rev 2293)
@@ -17,10 +17,10 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 /*
-  To keep efiemu runtime contiguous this mm is special. 
+  To keep efiemu runtime contiguous this mm is special.
   It uses deferred allocation.
   In the first stage you may request memory with grub_efiemu_request_memalign
-  It will give you a handle with which in the second phase you can access your 
+  It will give you a handle with which in the second phase you can access your
   memory with grub_efiemu_mm_obtain_request (handle). It's guaranteed that
   subsequent calls with the same handle return the same result. You can't 
request any additional memory once you're in the second phase
 */
@@ -32,7 +32,7 @@
 #include <grub/machine/memory.h>
 #include <grub/efiemu/efiemu.h>
 
-struct grub_efiemu_memrequest 
+struct grub_efiemu_memrequest
 {
   struct grub_efiemu_memrequest *next;
   grub_efi_memory_type_t type;
@@ -54,7 +54,7 @@
 
 /* Add a memory region to map*/
 static grub_err_t
-grub_efiemu_add_to_mmap (grub_uint64_t start, grub_uint64_t size, 
+grub_efiemu_add_to_mmap (grub_uint64_t start, grub_uint64_t size,
                         grub_efi_memory_type_t type)
 {
   grub_uint64_t page_start, npages;
@@ -63,10 +63,10 @@
   if (mmap_num >= mmap_reserved_size)
     {
       efiemu_mmap = (grub_efi_memory_descriptor_t *)
-       grub_realloc (efiemu_mmap, (++mmap_reserved_size) 
+       grub_realloc (efiemu_mmap, (++mmap_reserved_size)
                      * sizeof (grub_efi_memory_descriptor_t));
       if (!efiemu_mmap)
-       return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+       return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                           "Not enough space for memory map");
     }
 
@@ -74,9 +74,9 @@
   page_start = start - (start % GRUB_EFIEMU_PAGESIZE);
   npages = (size + (start % GRUB_EFIEMU_PAGESIZE) + GRUB_EFIEMU_PAGESIZE - 1)
     / GRUB_EFIEMU_PAGESIZE;
-  efiemu_mmap[mmap_num].physical_start = page_start; 
-  efiemu_mmap[mmap_num].virtual_start = page_start; 
-  efiemu_mmap[mmap_num].num_pages = npages; 
+  efiemu_mmap[mmap_num].physical_start = page_start;
+  efiemu_mmap[mmap_num].virtual_start = page_start;
+  efiemu_mmap[mmap_num].num_pages = npages;
   efiemu_mmap[mmap_num].type = type;
   mmap_num++;
 
@@ -84,11 +84,11 @@
 }
 
 /* Request a resident memory of type TYPE of size SIZE aligned at ALIGN
-   ALIGN must be a divisor of page size (if it's a divisor of 4096 
+   ALIGN must be a divisor of page size (if it's a divisor of 4096
    it should be ok on all platforms)
  */
 int
-grub_efiemu_request_memalign (grub_size_t align, grub_size_t size, 
+grub_efiemu_request_memalign (grub_size_t align, grub_size_t size,
                              grub_efi_memory_type_t type)
 {
   grub_size_t align_overhead;
@@ -113,8 +113,8 @@
   ret->val = 0;
   ret->next = 0;
   prev = 0;
-  
-  /* Add request to the end of the chain. 
+
+  /* Add request to the end of the chain.
      It should be at the end because otherwise alignment isn't guaranteed */
   for (cur = memrequests; cur; prev = cur, cur = cur->next);
   if (prev)
@@ -155,20 +155,20 @@
       GRUB_EFI_RUNTIME_SERVICES_CODE,
       GRUB_EFI_RUNTIME_SERVICES_DATA,
       GRUB_EFI_ACPI_MEMORY_NVS,
-      
-      /* And then unavailable memory types. This is more for a completeness. 
+
+      /* And then unavailable memory types. This is more for a completeness.
         You should double think before allocating memory of any of these types
        */
       GRUB_EFI_UNUSABLE_MEMORY,
       GRUB_EFI_MEMORY_MAPPED_IO,
       GRUB_EFI_MEMORY_MAPPED_IO_PORT_SPACE,
-      GRUB_EFI_PAL_CODE 
+      GRUB_EFI_PAL_CODE
     };
 
   /* Compute total memory needed */
   for (i = 0; i < sizeof (reqorder) / sizeof (reqorder[0]); i++)
     {
-      align_overhead = GRUB_EFIEMU_PAGESIZE 
+      align_overhead = GRUB_EFIEMU_PAGESIZE
        - (requested_memory[reqorder[i]] % GRUB_EFIEMU_PAGESIZE);
       if (align_overhead == GRUB_EFIEMU_PAGESIZE)
        align_overhead = 0;
@@ -178,7 +178,7 @@
   /* Allocate the whole memory in one block */
   resident_memory = grub_memalign (GRUB_EFIEMU_PAGESIZE, total_alloc);
   if (!resident_memory)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+    return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                       "couldn't allocate resident memory");
 
   /* Split the memory into blocks by type */
@@ -199,14 +199,14 @@
          }
 
       /* Ensure that the regions are page-aligned */
-      align_overhead = GRUB_EFIEMU_PAGESIZE 
+      align_overhead = GRUB_EFIEMU_PAGESIZE
        - (requested_memory[reqorder[i]] % GRUB_EFIEMU_PAGESIZE);
       if (align_overhead == GRUB_EFIEMU_PAGESIZE)
        align_overhead = 0;
       curptr = ((grub_uint8_t *)curptr) + align_overhead;
-      
+
       /* Add the region to memory map */
-      grub_efiemu_add_to_mmap (PTR_TO_UINT64 (typestart), 
+      grub_efiemu_add_to_mmap (PTR_TO_UINT64 (typestart),
                               curptr - typestart, reqorder[i]);
     }
 
@@ -270,7 +270,7 @@
 static grub_err_t
 grub_efiemu_mmap_init (void)
 {
-  auto int NESTED_FUNC_ATTR bounds_hook (grub_uint64_t, grub_uint64_t, 
+  auto int NESTED_FUNC_ATTR bounds_hook (grub_uint64_t, grub_uint64_t,
                                         grub_uint32_t);
   int NESTED_FUNC_ATTR bounds_hook (grub_uint64_t addr __attribute__ 
((unused)),
                                    grub_uint64_t size __attribute__ ((unused)),
@@ -302,7 +302,7 @@
 {
   if (!efiemu_mmap)
     {
-      grub_error (GRUB_ERR_INVALID_COMMAND, 
+      grub_error (GRUB_ERR_INVALID_COMMAND,
                  "you need to first launch efiemu_prepare");
       return -1;
     }
@@ -373,26 +373,26 @@
       switch (type)
        {
        case GRUB_MACHINE_MEMORY_AVAILABLE:
-         return grub_efiemu_add_to_mmap (addr, size, 
+         return grub_efiemu_add_to_mmap (addr, size,
                                          GRUB_EFI_CONVENTIONAL_MEMORY);
 
 #ifdef GRUB_MACHINE_MEMORY_ACPI
        case GRUB_MACHINE_MEMORY_ACPI:
-         return grub_efiemu_add_to_mmap (addr, size, 
+         return grub_efiemu_add_to_mmap (addr, size,
                                          GRUB_EFI_ACPI_RECLAIM_MEMORY);
 #endif
 
 #ifdef GRUB_MACHINE_MEMORY_NVS
        case GRUB_MACHINE_MEMORY_NVS:
-         return grub_efiemu_add_to_mmap (addr, size, 
+         return grub_efiemu_add_to_mmap (addr, size,
                                          GRUB_EFI_ACPI_MEMORY_NVS);
 #endif
 
        default:
          grub_printf ("Unknown memory type %d. Marking as unusable\n", type);
        case GRUB_MACHINE_MEMORY_RESERVED:
-         return grub_efiemu_add_to_mmap (addr, size, 
-                                         GRUB_EFI_UNUSABLE_MEMORY);      
+         return grub_efiemu_add_to_mmap (addr, size,
+                                         GRUB_EFI_UNUSABLE_MEMORY);
        }
     }
 
@@ -404,8 +404,8 @@
 }
 
 grub_err_t
-grub_efiemu_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, 
-                                                       grub_uint64_t, 
+grub_efiemu_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t,
+                                                       grub_uint64_t,
                                                        grub_uint32_t))
 {
   unsigned i;
@@ -414,10 +414,10 @@
     switch (efiemu_mmap[i].type)
       {
       case GRUB_EFI_RUNTIME_SERVICES_CODE:
-       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096, 
+       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
              GRUB_EFIEMU_MEMORY_CODE);
        break;
-       
+
       case GRUB_EFI_RESERVED_MEMORY_TYPE:
       case GRUB_EFI_RUNTIME_SERVICES_DATA:
       case GRUB_EFI_UNUSABLE_MEMORY:
@@ -425,30 +425,30 @@
       case GRUB_EFI_MEMORY_MAPPED_IO_PORT_SPACE:
       case GRUB_EFI_PAL_CODE:
       case GRUB_EFI_MAX_MEMORY_TYPE:
-       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096, 
+       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
              GRUB_EFIEMU_MEMORY_RESERVED);
        break;
-       
+
       case GRUB_EFI_LOADER_CODE:
       case GRUB_EFI_LOADER_DATA:
       case GRUB_EFI_BOOT_SERVICES_CODE:
       case GRUB_EFI_BOOT_SERVICES_DATA:
       case GRUB_EFI_CONVENTIONAL_MEMORY:
-       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096, 
+       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
              GRUB_EFIEMU_MEMORY_AVAILABLE);
        break;
-       
+
       case GRUB_EFI_ACPI_RECLAIM_MEMORY:
-       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096, 
+       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
              GRUB_EFIEMU_MEMORY_ACPI);
        break;
-       
+
       case GRUB_EFI_ACPI_MEMORY_NVS:
-       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096, 
+       hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
              GRUB_EFIEMU_MEMORY_NVS);
        break;
       }
-  
+
   return 0;
 }
 
@@ -459,8 +459,8 @@
 static grub_err_t
 grub_efiemu_mmap_sort_and_uniq (void)
 {
-  /* If same page is used by multiple types it's resolved 
-     according to priority 
+  /* If same page is used by multiple types it's resolved
+     according to priority
      0 - free memory
      1 - memory immediately usable after ExitBootServices
      2 - memory usable after loading ACPI tables
@@ -512,20 +512,20 @@
 
   /* Initialize variables*/
   grub_memset (present, 0, sizeof (int) * GRUB_EFI_MAX_MEMORY_TYPE);
-  scanline_events = (struct grub_efiemu_mmap_scan *) 
+  scanline_events = (struct grub_efiemu_mmap_scan *)
     grub_malloc (sizeof (struct grub_efiemu_mmap_scan) * 2 * mmap_num);
 
   /* Number of chunks can't increase more than by factor of 2 */
-  result = (grub_efi_memory_descriptor_t *) 
+  result = (grub_efi_memory_descriptor_t *)
     grub_malloc (sizeof (grub_efi_memory_descriptor_t) * 2 * mmap_num);
   if (!result || !scanline_events)
     {
       grub_free (result);
       grub_free (scanline_events);
-      return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+      return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                         "couldn't allocate space for new memory map");
     }
-   
+
   /* Register scanline events */
   for (i = 0; i < mmap_num; i++)
     {
@@ -538,8 +538,8 @@
       scanline_events[2 * i + 1].memtype = efiemu_mmap[i].type;
     }
 
-  /* Primitive bubble sort. It has complexity O(n^2) but since we're 
-     unlikely to have more than 100 chunks it's probably one of the 
+  /* Primitive bubble sort. It has complexity O(n^2) but since we're
+     unlikely to have more than 100 chunks it's probably one of the
      fastest for one purpose */
   done = 1;
   while (done)
@@ -574,29 +574,29 @@
          curtype = k;
 
       /* Add memory region to resulting map if necessary */
-      if ((curtype == -1 || curtype != lasttype) 
+      if ((curtype == -1 || curtype != lasttype)
          && lastaddr != scanline_events[i].pos
          && lasttype != -1)
        {
          result[j].virtual_start = result[j].physical_start = lastaddr;
-         result[j].num_pages = (scanline_events[i].pos - lastaddr) 
+         result[j].num_pages = (scanline_events[i].pos - lastaddr)
            / GRUB_EFIEMU_PAGESIZE;
          result[j].type = lasttype;
 
          /* We set runtime attribute on pages we need to be mapped */
-         result[j].attribute 
+         result[j].attribute
            = (lasttype == GRUB_EFI_RUNTIME_SERVICES_CODE
                   || lasttype == GRUB_EFI_RUNTIME_SERVICES_DATA)
            ? GRUB_EFI_MEMORY_RUNTIME : 0;
-         grub_dprintf ("efiemu", 
-                       "mmap entry: type %d start 0x%llx 0x%llx pages\n", 
+         grub_dprintf ("efiemu",
+                       "mmap entry: type %d start 0x%llx 0x%llx pages\n",
                        result[j].type,
                        result[j].physical_start, result[j].num_pages);
          j++;
        }
 
       /* Update last values if necessary */
-      if (curtype == -1 || curtype != lasttype) 
+      if (curtype == -1 || curtype != lasttype)
        {
          lasttype = curtype;
          lastaddr = scanline_events[i].pos;
@@ -605,7 +605,7 @@
 
   grub_free (scanline_events);
 
-  /* Shrink resulting memory map to really used size and replace efiemu_mmap 
+  /* Shrink resulting memory map to really used size and replace efiemu_mmap
      by new value */
   grub_free (efiemu_mmap);
   efiemu_mmap = grub_realloc (result, j * sizeof (*result));
@@ -619,7 +619,7 @@
   grub_err_t err;
 
   /* Preallocate mmap */
-  efiemu_mmap = (grub_efi_memory_descriptor_t *) 
+  efiemu_mmap = (grub_efi_memory_descriptor_t *)
     grub_malloc (mmap_reserved_size * sizeof (grub_efi_memory_descriptor_t));
   if (!efiemu_mmap)
     {
@@ -632,4 +632,4 @@
   if ((err = grub_efiemu_mmap_fill ()))
     return err;
   return grub_efiemu_mmap_sort_and_uniq ();
-} 
+}

Modified: trunk/grub2/efiemu/pnvram.c
===================================================================
--- trunk/grub2/efiemu/pnvram.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/efiemu/pnvram.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -45,13 +45,13 @@
 static const struct grub_arg_option options[] = {
   {"size", 's', 0, "number of bytes to reserve for pseudo NVRAM", 0,
    ARG_TYPE_INT},
-  {"high-monotonic-count", 'm', 0, 
+  {"high-monotonic-count", 'm', 0,
    "Initial value of high monotonic count", 0, ARG_TYPE_INT},
-  {"timezone", 't', 0, 
+  {"timezone", 't', 0,
    "Timezone, offset in minutes from GMT", 0, ARG_TYPE_INT},
-  {"accuracy", 'a', 0, 
+  {"accuracy", 'a', 0,
    "Accuracy of clock, in 1e-12 units", 0, ARG_TYPE_INT},
-  {"daylight", 'd', 0, 
+  {"daylight", 'd', 0,
    "Daylight value, as per EFI specifications", 0, ARG_TYPE_INT},
   {0, 0, 0, 0, 0, 0}
 };
@@ -68,14 +68,14 @@
 /* Export stuff for efiemu */
 static grub_err_t
 nvram_set (void * data __attribute__ ((unused)))
-{      
+{
   /* Take definitive pointers */
   grub_uint8_t *nvram_def = grub_efiemu_mm_obtain_request (nvram_handle);
-  grub_uint32_t *nvramsize_def 
+  grub_uint32_t *nvramsize_def
     = grub_efiemu_mm_obtain_request (nvramsize_handle);
   grub_uint32_t *high_monotonic_count_def
     = grub_efiemu_mm_obtain_request (high_monotonic_count_handle);
-  grub_int16_t *timezone_def 
+  grub_int16_t *timezone_def
     = grub_efiemu_mm_obtain_request (timezone_handle);
   grub_uint8_t *daylight_def
     = grub_efiemu_mm_obtain_request (daylight_handle);
@@ -94,11 +94,11 @@
   /* Register symbols */
   grub_efiemu_register_symbol ("efiemu_variables", nvram_handle, 0);
   grub_efiemu_register_symbol ("efiemu_varsize", nvramsize_handle, 0);
-  grub_efiemu_register_symbol ("efiemu_high_monotonic_count", 
+  grub_efiemu_register_symbol ("efiemu_high_monotonic_count",
                               high_monotonic_count_handle, 0);
   grub_efiemu_register_symbol ("efiemu_time_zone", timezone_handle, 0);
   grub_efiemu_register_symbol ("efiemu_time_daylight", daylight_handle, 0);
-  grub_efiemu_register_symbol ("efiemu_time_accuracy", 
+  grub_efiemu_register_symbol ("efiemu_time_accuracy",
                               accuracy_handle, 0);
 
   return GRUB_ERR_NONE;
@@ -134,7 +134,7 @@
   struct efi_variable *efivar;
   grub_size_t guidlen, datalen;
   unsigned i, j;
-  
+
   file = grub_file_open (filename);
   if (!file)
     return grub_error (GRUB_ERR_BAD_OS, "couldn't read pnvram");
@@ -157,17 +157,17 @@
 
       efivar = (struct efi_variable *) nvramptr;
       if (nvramptr - nvram + sizeof (struct efi_variable) > nvramsize)
-       return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+       return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                           "file is too large for reserved variable space");
 
       nvramptr += sizeof (struct efi_variable);
 
       /* look ahow long guid field is*/
-      guidlen = 0;      
-      for (ptr2 = ptr; (grub_isspace (*ptr2) 
+      guidlen = 0;
+      for (ptr2 = ptr; (grub_isspace (*ptr2)
                        || (*ptr2 >= '0' && *ptr2 <= '9')
                        || (*ptr2 >= 'a' && *ptr2 <= 'f')
-                       || (*ptr2 >= 'A' && *ptr2 <= 'F')); 
+                       || (*ptr2 >= 'A' && *ptr2 <= 'F'));
           ptr2++)
        if (!grub_isspace (*ptr2))
          guidlen++;
@@ -175,7 +175,7 @@
 
       /* Read guid */
       if (guidlen != sizeof (efivar->guid))
-       {   
+       {
          grub_free (buf);
          return grub_error (GRUB_ERR_BAD_OS, "can't parse %s", filename);
        }
@@ -190,14 +190,14 @@
            hex = *ptr - 'a' + 10;
          if (*ptr >= 'A' && *ptr <= 'F')
            hex = *ptr - 'A' + 10;
-         
+
          if (i%2 == 0)
            ((grub_uint8_t *)&(efivar->guid))[i/2] = hex << 4;
          else
            ((grub_uint8_t *)&(efivar->guid))[i/2] |= hex;
          ptr++;
        }
-      
+
       while (grub_isspace (*ptr))
        ptr++;
       if (*ptr != ':')
@@ -230,23 +230,23 @@
        {
          /* Look the length */
          datalen = 0;
-         for (ptr2 = ptr; *ptr2 && (grub_isspace (*ptr2) 
+         for (ptr2 = ptr; *ptr2 && (grub_isspace (*ptr2)
                                     || (*ptr2 >= '0' && *ptr2 <= '9')
                                     || (*ptr2 >= 'a' && *ptr2 <= 'f')
-                                    || (*ptr2 >= 'A' && *ptr2 <= 'F')); 
+                                    || (*ptr2 >= 'A' && *ptr2 <= 'F'));
               ptr2++)
            if (!grub_isspace (*ptr2))
              datalen++;
          datalen /= 2;
-        
+
          if (nvramptr - nvram + datalen > nvramsize)
            {
              grub_free (buf);
-             return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+             return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                                 "file is too large for reserved "
                                 " variable space");
            }
-         
+
          for (i = 0; i < 2 * datalen; i++)
            {
              int hex = 0;
@@ -258,7 +258,7 @@
                hex = *ptr - 'a' + 10;
              if (*ptr >= 'A' && *ptr <= 'F')
                hex = *ptr - 'A' + 10;
-             
+
              if (i%2 == 0)
                nvramptr[i/2] = hex << 4;
              else
@@ -278,7 +278,7 @@
            efivar->size = datalen;
          else
            efivar->namelen = datalen;
-         
+
          ptr++;
        }
     }
@@ -304,23 +304,23 @@
       grub_free (nvram);
       return err;
     }
-  nvram_handle 
-    = grub_efiemu_request_memalign (1, nvramsize, 
+  nvram_handle
+    = grub_efiemu_request_memalign (1, nvramsize,
                                    GRUB_EFI_RUNTIME_SERVICES_DATA);
-  nvramsize_handle 
-    = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t), 
+  nvramsize_handle
+    = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t),
                                    GRUB_EFI_RUNTIME_SERVICES_DATA);
   high_monotonic_count_handle
-    = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t), 
+    = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t),
                                    GRUB_EFI_RUNTIME_SERVICES_DATA);
   timezone_handle
-    = grub_efiemu_request_memalign (1, sizeof (grub_uint16_t), 
+    = grub_efiemu_request_memalign (1, sizeof (grub_uint16_t),
                                    GRUB_EFI_RUNTIME_SERVICES_DATA);
   daylight_handle
-    = grub_efiemu_request_memalign (1, sizeof (grub_uint8_t), 
+    = grub_efiemu_request_memalign (1, sizeof (grub_uint8_t),
                                    GRUB_EFI_RUNTIME_SERVICES_DATA);
   accuracy_handle
-    = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t), 
+    = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t),
                                    GRUB_EFI_RUNTIME_SERVICES_DATA);
 
   grub_efiemu_request_symbols (6);
@@ -341,7 +341,7 @@
 
   nvram = grub_malloc (nvramsize);
   if (!nvram)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+    return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                       "Couldn't allocate space for temporary pnvram storage");
   grub_memset (nvram, 0, nvramsize);
 
@@ -360,16 +360,16 @@
 
   nvramsize = state[0].set ? grub_strtoul (state[0].arg, 0, 0) : 2048;
   high_monotonic_count = state[1].set ? grub_strtoul (state[1].arg, 0, 0) : 1;
-  timezone = state[2].set ? grub_strtosl (state[2].arg, 0, 0) 
+  timezone = state[2].set ? grub_strtosl (state[2].arg, 0, 0)
     : GRUB_EFI_UNSPECIFIED_TIMEZONE;
   accuracy = state[3].set ? grub_strtoul (state[3].arg, 0, 0) : 50000000;
   daylight = state[4].set ? grub_strtoul (state[4].arg, 0, 0) : 0;
-  
+
   nvram = grub_malloc (nvramsize);
   if (!nvram)
-    return grub_error (GRUB_ERR_OUT_OF_MEMORY, 
+    return grub_error (GRUB_ERR_OUT_OF_MEMORY,
                       "Couldn't allocate space for temporary pnvram storage");
-  grub_memset (nvram, 0, nvramsize);  
+  grub_memset (nvram, 0, nvramsize);
 
   if (argc == 1 && (err = read_pnvram (args[0])))
     {
@@ -387,11 +387,11 @@
 void
 grub_efiemu_pnvram_cmd_register (void)
 {
-  cmd = grub_register_extcmd ("efiemu_pnvram", grub_cmd_efiemu_pnvram, 
+  cmd = grub_register_extcmd ("efiemu_pnvram", grub_cmd_efiemu_pnvram,
                              GRUB_COMMAND_FLAG_BOTH,
                              "efiemu_pnvram [FILENAME]",
                              "Initialise pseudo-NVRAM and load variables "
-                             "from FILE", 
+                             "from FILE",
                              options);
 }
 

Modified: trunk/grub2/efiemu/prepare.c
===================================================================
--- trunk/grub2/efiemu/prepare.c        2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/efiemu/prepare.c        2009-06-10 21:04:23 UTC (rev 2293)
@@ -1,4 +1,4 @@
-/* Prepare efiemu. E.g. allocate memory, load the runtime 
+/* Prepare efiemu. E.g. allocate memory, load the runtime
    to appropriate place, etc */
 /*
  *  GRUB  --  GRand Unified Bootloader
@@ -26,7 +26,7 @@
 
 grub_err_t
 SUFFIX (grub_efiemu_prepare) (struct grub_efiemu_prepare_hook *prepare_hooks,
-                             struct grub_efiemu_configuration_table 
+                             struct grub_efiemu_configuration_table
                              *config_tables)
 {
   grub_err_t err;
@@ -46,8 +46,8 @@
   /* Request space for the list of configuration tables */
   for (cur = config_tables; cur; cur = cur->next)
     cntconftables++;
-  conftable_handle 
-    = grub_efiemu_request_memalign (GRUB_EFIEMU_PAGESIZE, 
+  conftable_handle
+    = grub_efiemu_request_memalign (GRUB_EFIEMU_PAGESIZE,
                                    cntconftables * sizeof (*conftables),
                                    GRUB_EFI_RUNTIME_SERVICES_DATA);
 
@@ -69,31 +69,31 @@
       return err;
     }
 
-  if ((err = grub_efiemu_resolve_symbol ("efiemu_system_table", 
+  if ((err = grub_efiemu_resolve_symbol ("efiemu_system_table",
                                         &handle, &off)))
     {
       grub_efiemu_unload ();
       return err;
     }
 
-  SUFFIX (grub_efiemu_system_table)  
-    = (TYPE (grub_efi_system_table) *) 
+  SUFFIX (grub_efiemu_system_table)
+    = (TYPE (grub_efi_system_table) *)
     ((grub_uint8_t *)grub_efiemu_mm_obtain_request (handle) + off);
 
   /* compute CRC32 of runtime_services */
-  if ((err = grub_efiemu_resolve_symbol ("efiemu_runtime_services", 
+  if ((err = grub_efiemu_resolve_symbol ("efiemu_runtime_services",
                                         &handle, &off)))
     return err;
   runtime_services = (TYPE (grub_efiemu_runtime_services) *)
        ((grub_uint8_t *)grub_efiemu_mm_obtain_request (handle) + off);
   runtime_services->hdr.crc32 = 0;
-  runtime_services->hdr.crc32 = grub_getcrc32 
+  runtime_services->hdr.crc32 = grub_getcrc32
     (0, runtime_services, runtime_services->hdr.header_size);
 
   /* Put pointer to the list of configuration tables in system table */
   grub_efiemu_write_value
-    (&(SUFFIX (grub_efiemu_system_table)->configuration_table), 0, 
-     conftable_handle, 0, 1, 
+    (&(SUFFIX (grub_efiemu_system_table)->configuration_table), 0,
+     conftable_handle, 0, 1,
      sizeof (SUFFIX (grub_efiemu_system_table)->configuration_table));
   SUFFIX(grub_efiemu_system_table)->num_table_entries = cntconftables;
 
@@ -103,7 +103,7 @@
   i = 0;
   for (cur = config_tables; cur; cur = cur->next, i++)
     {
-      grub_memcpy (&(conftables[i].vendor_guid), &(cur->guid), 
+      grub_memcpy (&(conftables[i].vendor_guid), &(cur->guid),
                       sizeof (cur->guid));
       if (cur->get_table)
        conftables[i].vendor_table
@@ -114,13 +114,13 @@
 
   /* compute CRC32 of system table */
   SUFFIX (grub_efiemu_system_table)->hdr.crc32 = 0;
-  SUFFIX (grub_efiemu_system_table)->hdr.crc32 
-    = grub_getcrc32 (0, SUFFIX (grub_efiemu_system_table), 
+  SUFFIX (grub_efiemu_system_table)->hdr.crc32
+    = grub_getcrc32 (0, SUFFIX (grub_efiemu_system_table),
                     SUFFIX (grub_efiemu_system_table)->hdr.header_size);
 
   grub_dprintf ("efiemu","system_table = %p, runtime_services = %p,"
                " conftables = %p (%d entries)\n",
-               SUFFIX (grub_efiemu_system_table), runtime_services, 
+               SUFFIX (grub_efiemu_system_table), runtime_services,
                conftables, cntconftables);
 
   return GRUB_ERR_NONE;

Modified: trunk/grub2/efiemu/runtime/efiemu.S
===================================================================
--- trunk/grub2/efiemu/runtime/efiemu.S 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/efiemu/runtime/efiemu.S 2009-06-10 21:04:23 UTC (rev 2293)
@@ -29,10 +29,10 @@
  *   %rcx,  %rdx,  %r8,  %r9,  32(%rsp), 40(%rsp), 48(%rsp), ...
  *
  */
-       
+
         .file   "efiemu.S"
        .text
-       
+
 FUNCTION (efiemu_get_time)
        push %rdi
        push %rsi
@@ -104,7 +104,7 @@
        mov %rcx, %rdi
        mov %rdx, %rsi
        mov %r8, %rdx
-       mov %r9, %rcx   
+       mov %r9, %rcx
        mov 56(%rsp), %r8
        call efiemu_set_variable_real
        pop %rsi
@@ -133,8 +133,8 @@
        ret
 
        /* The following functions are always called in physical mode */
-       .section ".text-physical", "ax"         
-       
+       .section ".text-physical", "ax"
+
 FUNCTION (efiemu_set_virtual_address_map)
        push %rdi
        push %rsi

Modified: trunk/grub2/efiemu/runtime/efiemu.c
===================================================================
--- trunk/grub2/efiemu/runtime/efiemu.c 2009-06-10 21:01:29 UTC (rev 2292)
+++ trunk/grub2/efiemu/runtime/efiemu.c 2009-06-10 21:04:23 UTC (rev 2293)
@@ -17,8 +17,8 @@
  */
 
 /* This is an emulation of EFI runtime services.
-   This allows a more uniform boot on i386 machines. 
-   As it emulates only runtime serviceit isn't able 
+   This allows a more uniform boot on i386 machines.
+   As it emulates only runtime serviceit isn't able
    to chainload EFI bootloader on non-EFI system (TODO) */
 
 #include <grub/symbol.h>
@@ -26,7 +26,7 @@
 #include <grub/efi/api.h>
 #include <grub/efiemu/runtime.h>
 
-grub_efi_status_t 
+grub_efi_status_t
 efiemu_get_time (grub_efi_time_t *time,
                 grub_efi_time_capabilities_t *capabilities);
 grub_efi_status_t
@@ -54,7 +54,7 @@
   PHYSICAL_ATTRIBUTE;
 
 grub_efi_status_t
-efiemu_convert_pointer (grub_efi_uintn_t debug_disposition, 
+efiemu_convert_pointer (grub_efi_uintn_t debug_disposition,
                        void **address)
   PHYSICAL_ATTRIBUTE;
 
@@ -84,14 +84,14 @@
                     grub_efi_uintn_t data_size,
                     grub_efi_char16_t *reset_data);
 
-grub_efi_status_t 
+grub_efi_status_t
 EFI_FUNC (efiemu_set_virtual_address_map) (grub_efi_uintn_t,
                                              grub_efi_uintn_t,
                                              grub_efi_uint32_t,
                                              grub_efi_memory_descriptor_t *)
      PHYSICAL_ATTRIBUTE;
 grub_efi_status_t
-EFI_FUNC (efiemu_convert_pointer) (grub_efi_uintn_t debug_disposition, 
+EFI_FUNC (efiemu_convert_pointer) (grub_efi_uintn_t debug_disposition,
                                      void **address)
      PHYSICAL_ATTRIBUTE;
 static grub_uint32_t
@@ -100,15 +100,15 @@
 static void
 init_crc32_table (void)
      PHYSICAL_ATTRIBUTE;
-static grub_uint32_t 
+static grub_uint32_t
 reflect (grub_uint32_t ref, int len)
      PHYSICAL_ATTRIBUTE;
-                            
+
 /*
   The log. It's used when examining memory dump
-*/                                  
+*/
 static grub_uint8_t loge[1000] = "EFIEMULOG";
-static int logn = 9; 
+static int logn = 9;
 #define LOG(x)   { if (logn<900) loge[logn++]=x; }
 
 static int ptv_relocated = 0;
@@ -189,7 +189,7 @@
   return 0;
 }
 
-/* The function that implement runtime services as specified in 
+/* The function that implement runtime services as specified in
    EFI specification */
 static inline grub_uint8_t
 bcd_to_hex (grub_uint8_t in)
@@ -197,7 +197,7 @@
   return 10 * ((in & 0xf0) >> 4) + (in & 0x0f);
 }
 
-grub_efi_status_t 
+grub_efi_status_t
 EFI_FUNC (efiemu_get_time) (grub_efi_time_t *time,
                               grub_efi_time_capabilities_t *capabilities)
 {
@@ -279,19 +279,19 @@
 
 static grub_uint32_t crc32_table [256];
 
-static grub_uint32_t 
+static grub_uint32_t
 reflect (grub_uint32_t ref, int len)
 {
   grub_uint32_t result = 0;
   int i;
-  
+
   for (i = 1; i <= len; i++)
     {
       if (ref & 1)
        result |= 1 << (len - i);
       ref >>= 1;
     }
-  
+
   return result;
 }
 
@@ -332,7 +332,7 @@
 }
 
 
-grub_efi_status_t EFI_FUNC 
+grub_efi_status_t EFI_FUNC
 (efiemu_set_virtual_address_map) (grub_efi_uintn_t memory_map_size,
                                  grub_efi_uintn_t descriptor_size,
                                  grub_efi_uint32_t descriptor_version,
@@ -341,12 +341,12 @@
   struct grub_efiemu_ptv_rel *cur_relloc;
 
   LOG ('e');
-  
+
   /* Ensure that we are called only once */
   if (ptv_relocated)
     return GRUB_EFI_UNSUPPORTED;
   ptv_relocated = 1;
-  
+
   /* Correct addresses using information supplied by grub */
   for (cur_relloc = efiemu_ptv_relloc; cur_relloc->size;cur_relloc++)
     {
@@ -354,8 +354,8 @@
       grub_efi_memory_descriptor_t *descptr;
 
       /* Compute correction */
-      for (descptr = virtual_map;  
-          ((grub_uint8_t *) descptr - (grub_uint8_t *) virtual_map) 
+      for (descptr = virtual_map;
+          ((grub_uint8_t *) descptr - (grub_uint8_t *) virtual_map)
             < memory_map_size;
           descptr = (grub_efi_memory_descriptor_t *)
             ((grub_uint8_t *) descptr + descriptor_size))
@@ -386,27 +386,27 @@
 
   /* Recompute crc32 of system table and runtime services */
   efiemu_system_table.hdr.crc32 = 0;
-  efiemu_system_table.hdr.crc32 = efiemu_getcrc32 
+  efiemu_system_table.hdr.crc32 = efiemu_getcrc32
     (0, &efiemu_system_table, sizeof (efiemu_system_table));
 
   efiemu_runtime_services.hdr.crc32 = 0;
-  efiemu_runtime_services.hdr.crc32 = efiemu_getcrc32 
+  efiemu_runtime_services.hdr.crc32 = efiemu_getcrc32
     (0, &efiemu_runtime_services, sizeof (efiemu_runtime_services));
 
   return GRUB_EFI_SUCCESS;
 }
 
-/* since efiemu_set_virtual_address_map corrects all the pointers 
+/* since efiemu_set_virtual_address_map corrects all the pointers
    we don't need efiemu_convert_pointer */
 grub_efi_status_t
-EFI_FUNC (efiemu_convert_pointer) (grub_efi_uintn_t debug_disposition, 
+EFI_FUNC (efiemu_convert_pointer) (grub_efi_uintn_t debug_disposition,
                                      void **address)
 {
   LOG ('f');
   return GRUB_EFI_UNSUPPORTED;
 }
 
-/* Next comes variable services. Because we have no vendor-independent 
+/* Next comes variable services. Because we have no vendor-independent
    way to store these variables we have no non-volatility */
 
 /* Find variable by name and GUID. */
@@ -423,7 +423,7 @@
       if (!efivar->namelen)
        return 0;
       if (efiemu_str16equal((grub_efi_char16_t *)(efivar + 1), variable_name)
-         && efiemu_memequal (&(efivar->guid), vendor_guid, 
+         && efiemu_memequal (&(efivar->guid), vendor_guid,
                              sizeof (efivar->guid)))
        return efivar;
       ptr += efivar->namelen + efivar->size + sizeof (*efivar);
@@ -452,11 +452,11 @@
   efiemu_memcpy (data, (grub_uint8_t *)(efivar + 1) + efivar->namelen,
                 efivar->size);
   *attributes = efivar->attributes;
-  
+
   return GRUB_EFI_SUCCESS;
 }
 
-grub_efi_status_t EFI_FUNC 
+grub_efi_status_t EFI_FUNC
 (efiemu_get_next_variable_name) (grub_efi_uintn_t *variable_name_size,
                                 grub_efi_char16_t *variable_name,
                                 grub_efi_guid_t *vendor_guid)
@@ -471,15 +471,15 @@
       efivar = find_variable (vendor_guid, variable_name);
       if (!efivar)
        return GRUB_EFI_NOT_FOUND;
-      efivar = (struct efi_variable *)((grub_uint8_t *)efivar 
-                                      + efivar->namelen 
+      efivar = (struct efi_variable *)((grub_uint8_t *)efivar
+                                      + efivar->namelen
                                       + efivar->size + sizeof (*efivar));
     }
   else
     efivar = (struct efi_variable *) (efiemu_variables);
 
   LOG ('m');
-  if ((grub_uint8_t *)efivar >= efiemu_variables + efiemu_varsize 
+  if ((grub_uint8_t *)efivar >= efiemu_variables + efiemu_varsize
       || !efivar->namelen)
     return GRUB_EFI_NOT_FOUND;
   if (*variable_name_size < efivar->namelen)
@@ -489,7 +489,7 @@
     }
 
   efiemu_memcpy (variable_name, efivar + 1, efivar->namelen);
-  efiemu_memcpy (vendor_guid, &(efivar->guid), 
+  efiemu_memcpy (vendor_guid, &(efivar->guid),
                 sizeof (efivar->guid));
 
   LOG('h');
@@ -513,12 +513,12 @@
   /* Delete variable if any */
   if (efivar)
     {
-      efiemu_memcpy (efivar, (grub_uint8_t *)(efivar + 1) 
-                    + efivar->namelen + efivar->size, 
+      efiemu_memcpy (efivar, (grub_uint8_t *)(efivar + 1)
+                    + efivar->namelen + efivar->size,
                     (efiemu_variables + efiemu_varsize)
-                    - ((grub_uint8_t *)(efivar + 1) 
+                    - ((grub_uint8_t *)(efivar + 1)
                        + efivar->namelen + efivar->size));
-      efiemu_memset (efiemu_variables + efiemu_varsize 
+      efiemu_memset (efiemu_variables + efiemu_varsize
                     - (sizeof (*efivar) + efivar->namelen + efivar->size),
                     0, (sizeof (*efivar) + efivar->namelen + efivar->size));
     }
@@ -533,8 +533,8 @@
       if (!efivar->namelen)
        break;
     }
-  if ((grub_uint8_t *)(efivar + 1) + data_size 
-      + 2 * (efiemu_str16len (variable_name) + 1) 
+  if ((grub_uint8_t *)(efivar + 1) + data_size
+      + 2 * (efiemu_str16len (variable_name) + 1)
       >= efiemu_variables + efiemu_varsize)
     return GRUB_EFI_OUT_OF_RESOURCES;
 
@@ -542,16 +542,16 @@
   efivar->namelen = 2 * (efiemu_str16len (variable_name) + 1);
   efivar->size = data_size;
   efivar->attributes = attributes;
-  efiemu_memcpy (efivar + 1, variable_name, 
+  efiemu_memcpy (efivar + 1, variable_name,
                 2 * (efiemu_str16len (variable_name) + 1));
-  efiemu_memcpy ((grub_uint8_t *)(efivar + 1) 
-                + 2 * (efiemu_str16len (variable_name) + 1), 
+  efiemu_memcpy ((grub_uint8_t *)(efivar + 1)
+                + 2 * (efiemu_str16len (variable_name) + 1),
                 data, data_size);
 
   return GRUB_EFI_SUCCESS;
 }
 
-grub_efi_status_t EFI_FUNC 
+grub_efi_status_t EFI_FUNC

@@ Diff output truncated at 153600 characters. @@




reply via email to

[Prev in Thread] Current Thread [Next in Thread]