]> git.ozlabs.org Git - yaboot.git/commitdiff
Sweep all the files for trailing whitespace.
authorDoug Maxey <dwm@austin.ibm.com>
Tue, 25 Apr 2006 03:37:33 +0000 (22:37 -0500)
committerDoug Maxey <dwm@austin.ibm.com>
Tue, 25 Apr 2006 03:37:33 +0000 (22:37 -0500)
Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
49 files changed:
Makefile
doc/README.ofboot
doc/README.ofpath
doc/examples/README.dualboot.chrp
doc/examples/README.simpleboot.chrp
doc/examples/yaboot.conf.multi-boot
doc/examples/yaboot.conf.rs6000
doc/yaboot-howto.sgml
etc/yaboot.conf
include/asm/processor.h
include/bootinfo.h
include/ctype.h
include/debug.h
include/ext2fs/bitops.h
include/ext2fs/ext2_io.h
include/ext2fs/ext2fs.h
include/fs.h
include/linux/elf.h
include/linux/ext2_fs.h
include/reiserfs/reiserfs.h
include/xfs/xfs.h
include/yaboot.h
lib/malloc.c
lib/vsprintf.c
man/bootstrap.8
man/mkofboot.8
man/ofpath.8
man/yaboot.8
man/yaboot.conf.5
man/yabootconfig.8
man/ybin.8
second/cache.S
second/cfg.c
second/cmdline.c
second/file.c
second/fs_ext2.c
second/fs_iso.c
second/fs_of.c
second/fs_reiserfs.c
second/fs_xfs.c
second/iso_util.c
second/md5.c
second/partition.c
second/prom.c
second/yaboot.c
util/addnote.c
ybin/ofpath
ybin/yabootconfig
ybin/ybin

index 2271944d330b9c81e36d420693d494dd3809deb6..39f8633f0ec5fdfff3e8d23074fc3fdb20992abf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ KERNELADDR    = 0x01400000
 # Set this to the prefix of your cross-compiler, if you have one.
 # Else leave it empty.
 #
-CROSS = 
+CROSS =
 
 CC             := $(CROSS)gcc
 LD             := $(CROSS)ld
@@ -64,7 +64,7 @@ endif
 
 # Link flags
 #
-LFLAGS = -Ttext $(TEXTADDR) -Bstatic 
+LFLAGS = -Ttext $(TEXTADDR) -Bstatic
 
 # Libraries
 #
index 5d7bb33a3720334683b20f44537f2cce3f0f6527..e64f26012639356192ab66545e1ecdba5287378f 100644 (file)
@@ -9,13 +9,13 @@ includes the following capabilities:
 
 * Automatic configuration by ybin.  This script should NOT be edited
   by the user.  It should also not be used without ybin, its not
-  directly useable by OpenFirmware. 
+  directly useable by OpenFirmware.
 
 * Configurable colors.  (see the yaboot.conf(5) man page).
 
 The multiboot menu is only presented when an extra OS is defined in
 /etc/yaboot.conf, otherwise this script loads yaboot without any user
-interaction. 
+interaction.
 
 To enable a multi boot menu add bsd=ofpath and/or macos=ofpath and/or
 macosx=ofpath, and/or darwin=ofpath where ofpath is the OpenFirmware
@@ -41,7 +41,7 @@ The name and letter used to load MacOS or MacOSX (M and X
 respectively) cannot be be configured.  (others are D for Darwin, C
 for CDROM, N for network, and O for OpenFirmware)
 
-The Forth code in this script was written by Chris Emerson and iNOUE Koich!.  
+The Forth code in this script was written by Chris Emerson and iNOUE Koich!.
 
 This script has only been formally tested on a Rev 1 Blue G3, a G4,
 and an ibook, please report any incompatibilities.
index 2d5b9f8b2a5385e61de79f74ff03730157904e54..cac2e25f10b73c463c1c1c29ba8e751b065382d5 100644 (file)
@@ -1,5 +1,5 @@
 This utility is used to find the OpenFirmware device path to a unix
-device node (ie /dev/hda2).  
+device node (ie /dev/hda2).
 
 Ofpath will work on Newworld PowerMacs only if yaboot is used as the
 bootloader, it will not work on newworld macs booted with BootX.
@@ -22,4 +22,4 @@ ofpath is based on show_of_path.sh written by Olaf Hering, this
 version unlike show_of_path.sh works with /bin/ash and is fully
 functional on stripped down systems such as boot or rescue floppies.
 It has been tested on the Debian GNU/Linux 2.2 (potato) boot
-floppies. 
+floppies.
index a49d39b9fb9754f3d01c16d7352b5f3439e07409..a07f14d4905e16e8f0e976630dc24bd7996a00b4 100644 (file)
@@ -1,5 +1,5 @@
 This script is deprecated in favor of a much nicer and more robust
-script ofboot, see README.ofboot for more information. 
+script ofboot, see README.ofboot for more information.
 
 This script was written by Benjamin Herrenschmidt, I added a X to the
 OpenFirmware pathnames, you should replace that X with the proper
index 3413c718d3f95d5a6cfc9bbd5fbf06c0e78f1e27..73214e2963e4229602c3796bff85a21a5ddd9308 100644 (file)
@@ -8,7 +8,7 @@ filetype of `tbxi' if found it loads this file. Unfortunately OF is
 being far to picky about the format of this file, while it will load a
 ELF executable just fine when directed to, if the tbxi file it finds
 is just a plain ELF executable, as yaboot is, then it refuses to load
-it.  
+it.
 
 The best longterm solution is to embed a small CHRP boot script to the
 head of of the yaboot executable, but until we can find the right way
index b7bebf2f94ea7f3b8597af11e8e2c144b8622605..f7734fea99638eb15b3bb749d484760a19a890d0 100644 (file)
@@ -35,7 +35,7 @@ delay=10
 
 ## timeout is the amount of time in tenths of a second that yaboot
 ## will wait before booting the default kernel image (the first image=
-## section in this config file or the value of default=).  
+## section in this config file or the value of default=).
 
 timeout=20
 install=/usr/local/lib/yaboot/yaboot
index af1b8f5696a4557ac1be91ce6892cf40460beae4..702794b854408e1b7fdb655c43bf0599a09f0054 100644 (file)
@@ -24,7 +24,7 @@ partition=3
 
 ## timeout is the amount of time in tenths of a second that yaboot
 ## will wait before booting the default kernel image (the first image=
-## section in this config file or the value of default=).  
+## section in this config file or the value of default=).
 
 timeout=20
 install=/usr/local/lib/yaboot/yaboot
index 67c13ec6b4bc0af32c44ad10ae26a1d65b9676d2..e2a6ed5a8363e1d60eac0b11745dcacd369b8c1a 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN" [
- <!-- 
+ <!--
         document conventions:
           file, directory, device == file
          program, command == prgn
@@ -92,7 +92,7 @@ those will require <prgn>quik</prgn> or (for MacOS Pre-9.0.4 only)
 The NewWorld PowerMacs, for which <prgn>yaboot</prgn> is designed, are
 any PowerMacs in translucent colored plastic cases. That includes all
 iMacs, iBooks, G4 systems, blue colored G3 systems, and most
-PowerBooks manufactured in and after 1999. 
+PowerBooks manufactured in and after 1999.
 
 
 <chapt>Obtaining Yaboot
@@ -146,11 +146,11 @@ you are creating a new Linux installation, the first partition you create
 with <prgn>mac-fdisk</prgn> should be the bootstrap partition. Just use the
 <prgn>mac-fdisk</prgn> <tt>b</tt> command to automatically create a
 bootstrap partition of the proper size and type. If your version of
-<prgn>mac-fdisk</prgn> doesn't include the <tt>b</tt> command, use: 
+<prgn>mac-fdisk</prgn> doesn't include the <tt>b</tt> command, use:
 
 <p>
 <example>
-     Command (? for help): C xxxx 800k bootstrap Apple_Bootstrap 
+     Command (? for help): C xxxx 800k bootstrap Apple_Bootstrap
 </example>
 <p>
 
@@ -164,7 +164,7 @@ id="http://penguinppc.org/~eb/files/">. To install this, use
      cd /
      gzip -dc mac-fdisk.tar.gz | tar -xvp
 </example>
+
 <p>
 The bootstrap partition only takes 800k of space. If you are adding a
 bootstrap partition to your existing setup, you may have enough free
@@ -258,7 +258,7 @@ file must have unix newlines; be sure to save as a unix type file
 if you create or edit it within MacOS.
 
 
-<sect>Linux Style Device Paths 
+<sect>Linux Style Device Paths
 <p>
 
 For those unfamiliar with Linux device naming, partition paths are in
@@ -273,7 +273,7 @@ represents the partition number. Typical Linux device names are:
   hdc    secondary controller, master disk (often used for CD-ROM)
   hdd    secondary controller, slave disk (often used for Zip drive)
   sda    first SCSI disk (SCSI ID address-wise)
-  sdb    second SCSI disk 
+  sdb    second SCSI disk
   scd0   first CD-ROM (or sr0)
   fd0    first floppy drive
   fd1    second floppy drive
@@ -286,8 +286,8 @@ A utility for finding the OpenFirmware device path corresponding to a
 given Linux device path is provided: <prgn>ofpath</prgn>. <prgn>ybin</prgn>
 uses <prgn>ofpath</prgn>
 internally to convert Linux device names you use in <file>yaboot.conf</file> to
-OpenFirmware equivalents. Example: <tt>ofpath /dev/hda</tt> (should return hd:). 
-You can also figure out OpenFirmware device paths yourself, see 
+OpenFirmware equivalents. Example: <tt>ofpath /dev/hda</tt> (should return hd:).
+You can also figure out OpenFirmware device paths yourself, see
 Recovering From Misconfiguration below.
 
 <sect>Required Settings
@@ -300,7 +300,7 @@ that would be <tt>boot=/dev/hda2</tt>.
 
 <p>
 
-For PowerMacs, a magicboot line such as 
+For PowerMacs, a magicboot line such as
 <tt>magicboot=/usr/local/lib/yaboot/ofboot</tt> is also required. Several
 models cannot execute a straight ELF, and need a CHRP script (which this
 line in the <file>yaboot.conf</file> makes available).
@@ -315,9 +315,9 @@ kernel image settings below) are also required.
 
 A CHRP script (<file>ofboot</file>) has been provided which
 <prgn>ybin</prgn> will modify using <file>yaboot.conf</file> settings, to
-display a very handy multi-OS boot menu. 
+display a very handy multi-OS boot menu.
 
-<p> 
+<p>
 
 If you are setting up a multi-OS boot menu, you'll need to identify the
 partitions where each OS lives. You can use Linux-style or OpenFirmware
@@ -395,7 +395,7 @@ it starts up to let it know where its root filesystem is located. Many other
 options are available to pass additional boot parameters to the kernel
 (<tt>append=</tt>), specify initial ramdisk size (<tt>ramdisk=</tt>), load a
 ramdisk image (<tt>initrd=</tt>), and others. Refer to the yaboot.conf man
-page for details on kernel image options.  
+page for details on kernel image options.
 
 <p>
 
@@ -415,7 +415,7 @@ kernel image section:
   # How long to wait at the boot: prompt (tenths of a second)
   timeout=50
   # Globally identified root partition
-  root=/dev/hda3 
+  root=/dev/hda3
   # The device where the kernel lives
   device=hd:
 
@@ -437,12 +437,12 @@ To netboot a kernel image via tftp, use <tt>image=/tftpboot/vmlinux</tt> (the
 path on the tftp server) and <tt>device=enet:10.0.0.1</tt>
 (substituting the tftp boot server IP address).
 
-<p> 
+<p>
 
 Normally the first image specified in the <file>yaboot.conf</file> will be the
 image booted if no entry is made at the boot: prompt. To have another
 image loaded by default, add a <tt>default=label</tt> line in the global
-section. 
+section.
 
 
 <sect>Optional and Cool Settings
@@ -471,7 +471,7 @@ file or the <tt>default=</tt> image.
 
 <p>
 
-Booting password protection is available using a <tt>password=</tt> line. 
+Booting password protection is available using a <tt>password=</tt> line.
 When you add <tt>password=</tt>, a password will be required for all booting.
 Automatic booting is not possible unless a <tt>restricted</tt> line is added.
 
@@ -493,8 +493,8 @@ md5 hash use the following perl snippet:
 
 <example>
     $ perl -e 'printf("%s\n", crypt("secret", "\$1\$saltstrg"))'
-</example> 
-The saltstrg should be a random string, for example one generated by 
+</example>
+The saltstrg should be a random string, for example one generated by
 
 <example>
     makepasswd --chars=8
@@ -555,7 +555,7 @@ run <prgn>ybin</prgn> after making changes.
 <p>
 
 If you have a problem booting, don't panic. Yaboot can boot any
-installed Linux kernel and system from the boot: prompt. 
+installed Linux kernel and system from the boot: prompt.
 
 <sect>Resetting the NVRAM
 <p>
@@ -575,12 +575,12 @@ resolution will also be reset to their defaults.
 If a <tt>boot:</tt> prompt isn't presented, then <prgn>yaboot</prgn> isn't
 being loaded. You can load it manually from
 OpenFirmware. Holding the Command-Option-o-f keys all together after
-pressing the power-on key will give you an OpenFirmware prompt 
+pressing the power-on key will give you an OpenFirmware prompt
 
 <example>
     0 >
 </example>
-(Command is the key with the cloverleaf and/or apple engraved on it). 
+(Command is the key with the cloverleaf and/or apple engraved on it).
 
 <p>
 
@@ -591,7 +591,7 @@ boot command to directly boot your kernel.
 
 <p>
 
-The full OpenFirmware path consists of three parts in the format 
+The full OpenFirmware path consists of three parts in the format
 
 <example>
     device-name:partition-number,/filesystem-path
@@ -608,7 +608,7 @@ your system. You may see some of these:
   ultra1    internal ide drive (primary controller, slave disk)
   ide0      ide drive (secondary controller, master disk)
   ide1      ide drive (secondary controller, slave disk)
-  cd        CD-ROM 
+  cd        CD-ROM
   zip       Zip drive
   fw        FireWire interface
   fd        Floppy drive
@@ -620,7 +620,7 @@ and then follow that with <tt>,yaboot</tt> to boot the <prgn>yaboot</prgn>
 file on the boot partition.
 
 <example>
-    0 > boot hd:2,yaboot 
+    0 > boot hd:2,yaboot
 </example>
 <p>
 
@@ -628,7 +628,7 @@ Hit return, and <prgn>yaboot</prgn> should be loaded and display its
 <file>boot:</file> prompt. If you don't know the partition number, just
 start at 2 and work your way up until you hit it.
 
-<sect>Manually Loading a Kernel Image 
+<sect>Manually Loading a Kernel Image
 <p>
 
 Once you have the boot: prompt, you can enter a label defined in your
@@ -642,14 +642,14 @@ you can enter a full OpenFirmware path. A typical kernel path might be
 To pass parameters to the kernel, add them on to the <tt>boot:</tt> prompt
 line after the kernel label or path. You'll need to specify <tt>root=</tt>
 as a minimum, but you can add any kernel parameters desired. Here's an
-example; 
+example;
 
 <example>
     boot: hd:3,/vmlinux root=/dev/hda3 ro
 </example>
 
 
-<chapt>Yaboot as a Temporary Bootloader 
+<chapt>Yaboot as a Temporary Bootloader
 <p>
 It's very convenient for certain tasks like installing a new system
 the first time without a CD, or rescuing an existing system, to boot a
@@ -666,7 +666,7 @@ are placed at the root level on an existing partition.
 
 <p>
 
-The <file>yaboot.conf</file> file for this purpose contains just 
+The <file>yaboot.conf</file> file for this purpose contains just
 four lines:
 <example>
     image=linux
@@ -681,10 +681,10 @@ it to use Unix newlines (linefeeds only). If you use MacOS newlines
 (just carriage returns), <prgn>yaboot</prgn> will be unable to read the file.
 
 <p>
-You must pick a partition that is formatted with either HFS or HFS+.  If 
+You must pick a partition that is formatted with either HFS or HFS+.  If
 you have Mac OS X installed on a UFS partition (You can use the OS X "Disk
 Utility" app to check this), you will have to find another partition to use.
-If Mac OS X is installed on UFS, you probably have one or two partitions 
+If Mac OS X is installed on UFS, you probably have one or two partitions
 of the "Apple_Boot" type.  They have HFS filesystems on them.  Pick one,
 mount it under MacOS X, and store the files there.
 
index 5709b07332c922328becf41f57f6aed1bc731762..2b097b02d731ce5ab4747960963f953d722d560c 100644 (file)
@@ -32,7 +32,7 @@ delay=10
 
 ## timeout is the amount of time in tenths of a second that yaboot
 ## will wait before booting the default kernel image (the first image=
-## section in this config file or the value of default=).  
+## section in this config file or the value of default=).
 
 timeout=40
 install=/usr/local/lib/yaboot/yaboot
index 902facc372ccbda1f6e41d483fe978959d33d518..7bc0bae7dd046f76ce7c8831735d4523116f92ea 100644 (file)
@@ -138,5 +138,5 @@ static __inline__ unsigned long mfmsr(void)
        return msr;
 }
 #endif
-  
+
 #endif /* __ASM_PPC_PROCESSOR_H */
index d0acd4ed719505967bc1a04ccbe9b77df41d6b28..f61409a374053df2174e33e7a8da904d71cc966c 100644 (file)
@@ -51,7 +51,7 @@ struct bi_record {
 
 #endif /* _PPC_BOOTINFO_H */
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 5b2f37150de8617d777a6cefb7d4a099b2d7c41a..5f545f7041c83847f537e6394f82b9cb5baa9436 100644 (file)
@@ -53,7 +53,7 @@ static inline unsigned char __toupper(unsigned char c)
 
 #endif
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index ed07b24e881e79d4152fbbbaf454d7c6b5e67a8d..47a9cce84ef82dcb098dc081f2800d90b8dc3cf7 100644 (file)
@@ -44,7 +44,7 @@
 #define DEBUG_SLEEP
 #endif
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 7872b3672ce0d49dbc2ca9cd324c46706adf2aa5..85fa7d7f4b9964f970fcfecad9fa75ce38c2f7d0 100644 (file)
@@ -1,14 +1,14 @@
 /*
  * bitops.h --- Bitmap frobbing code.  The byte swapping routines are
  *     also included here.
- * 
+ *
  * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
  *
  * %Begin-Header%
  * This file may be redistributed under the terms of the GNU Public
  * License.
  * %End-Header%
- * 
+ *
  * i386 bitops operations taken from <asm/bitops.h>, Copyright 1992,
  * Linus Torvalds.
  */
@@ -79,7 +79,7 @@ extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
 
 /*
  * The inline routines themselves...
- * 
+ *
  * If NO_INLINE_FUNCS is defined, then we won't try to do inline
  * functions at all; they will be included as normal functions in
  * inline.c
@@ -125,7 +125,7 @@ extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
  */
 struct __dummy_h { unsigned long a[100]; };
 #define EXT2FS_ADDR (*(struct __dummy_h *) addr)
-#define EXT2FS_CONST_ADDR (*(const struct __dummy_h *) addr)   
+#define EXT2FS_CONST_ADDR (*(const struct __dummy_h *) addr)
 
 _INLINE_ int ext2fs_set_bit(int nr, void * addr)
 {
@@ -167,7 +167,7 @@ _INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size)
                return 0;
        /* This looks at memory. Mark it volatile to tell gcc not to move it around */
        __asm__ __volatile__(
-               "cld\n\t"                            
+               "cld\n\t"
                "xorl %%eax,%%eax\n\t"
                "xorl %%edx,%%edx\n\t"
                "repe; scasl\n\t"
@@ -187,7 +187,7 @@ _INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
 {
        unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
        int set = 0, bit = offset & 31, res;
-       
+
        if (bit) {
                /*
                 * Look for zero in first byte
@@ -330,7 +330,7 @@ _INLINE_ int ext2fs_clear_bit(int nr, void * addr)
        : "0" (ADDR), "r" (mask)
        : "g5", "g6");
        return (int) ADDR;
-       
+
 #else
        int             mask, retval;
        unsigned char   *ADDR = (unsigned char *) addr;
@@ -425,7 +425,7 @@ _INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size)
        d0 = ffs(*cp);
        if (d0 == 0)
                return size;
-       
+
        return res + d0 - 1;
 }
 
@@ -433,10 +433,10 @@ _INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
 {
        unsigned char * p;
        int set = 0, bit = offset & 7, res = 0, d0;
-       
+
        res = offset >> 3;
        p = ((unsigned char *) addr) + res;
-       
+
        if (bit) {
                set = ffs(*p & ~((1 << bit) - 1));
                if (set)
@@ -454,7 +454,7 @@ _INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
 
        return (res + d0 - 1);
 }
-#endif 
+#endif
 
 /* These two routines moved to gen_bitmap.c */
 extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
@@ -485,35 +485,35 @@ _INLINE_ int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap,
 _INLINE_ int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
                                         blk_t block)
 {
-       return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                            block);
 }
 
 _INLINE_ int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap,
                                       blk_t block)
 {
-       return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                          block);
 }
 
 _INLINE_ int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
                                       ext2_ino_t inode)
 {
-       return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                          inode);
 }
 
 _INLINE_ int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
                                         ext2_ino_t inode)
 {
-       return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                     inode);
 }
 
 _INLINE_ int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
                                       ext2_ino_t inode)
 {
-       return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                          inode);
 }
 
@@ -526,7 +526,7 @@ _INLINE_ void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
                                   bitmap->description);
                return;
        }
-#endif 
+#endif
        ext2fs_set_bit(block - bitmap->start, bitmap->bitmap);
 }
 
@@ -655,7 +655,7 @@ _INLINE_ void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
                                             blk_t block, int num)
 {
        int     i;
-       
+
        if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
                ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
                                   bitmap->description);
@@ -669,14 +669,14 @@ _INLINE_ void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
                                                  blk_t block, int num)
 {
        int     i;
-       
+
 #ifdef EXT2FS_DEBUG_FAST_OPS
        if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
                ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
                                   bitmap->description);
                return;
        }
-#endif 
+#endif
        for (i=0; i < num; i++)
                ext2fs_set_bit(block + i - bitmap->start, bitmap->bitmap);
 }
@@ -685,7 +685,7 @@ _INLINE_ void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
                                               blk_t block, int num)
 {
        int     i;
-       
+
        if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
                ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK, block,
                                   bitmap->description);
@@ -699,14 +699,14 @@ _INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
                                                    blk_t block, int num)
 {
        int     i;
-       
+
 #ifdef EXT2FS_DEBUG_FAST_OPS
        if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
                ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK, block,
                                   bitmap->description);
                return;
        }
-#endif 
+#endif
        for (i=0; i < num; i++)
                ext2fs_clear_bit(block + i - bitmap->start, bitmap->bitmap);
 }
index b9ba0b6a240009d923d976a948b5e7b37075464c..124215415c6bd1552c8467789d628cabe3862bae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * io.h --- the I/O manager abstraction
- * 
+ *
  * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
  *
  * %Begin-Header%
@@ -83,7 +83,7 @@ struct struct_io_manager {
 #define io_channel_flush(c)            ((c)->manager->flush((c)))
 #define io_channel_write_byte(c,b,n,d) ((c)->manager->write_byte((c),b,n,d))
 #define io_channel_bumpcount(c)                ((c)->refcount++)
-       
+
 /* unix_io.c */
 extern io_manager unix_io_manager;
 
@@ -97,4 +97,4 @@ extern void (*test_io_cb_set_blksize)
        (int blksize, errcode_t err);
 
 #endif /* _EXT2FS_EXT2_IO_H */
-       
+
index bce274741f31635d7404ea9737914b8f73e9e044..c50e0bfe38f2a9baa3b1d5a027647a17d6c95764 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ext2fs.h --- ext2fs
- * 
+ *
  * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
  *
  * %Begin-Header%
@@ -251,7 +251,7 @@ struct struct_ext2_filsys {
  * This is used by ext2fs_expand_dir() to be able to add a new block
  * to an inode.  It can also be used for programs that want to be able
  * to deal with files that contain "holes".
- * 
+ *
  * BLOCK_FLAG_TRAVERSE indicates that the iterator function for the
  * indirect, doubly indirect, etc. blocks should be called after all
  * of the blocks containined in the indirect blocks are processed.
@@ -283,7 +283,7 @@ struct struct_ext2_filsys {
 /*
  * Flags for ext2fs_move_blocks
  */
-#define EXT2_BMOVE_GET_DBLIST  0x0001  
+#define EXT2_BMOVE_GET_DBLIST  0x0001
 #define EXT2_BMOVE_DEBUG       0x0002
 #endif
 
@@ -526,7 +526,7 @@ errcode_t ext2fs_block_iterate2(ext2_filsys fs,
 
 /* bmap.c */
 extern errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino,
-                            struct ext2_inode *inode, 
+                            struct ext2_inode *inode,
                             char *block_buf, int bmap_flags,
                             blk_t block, blk_t *phys_blk);
 
@@ -591,7 +591,7 @@ extern errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block,
                                        void *buf);
 
 /* dir_iterate.c */
-extern errcode_t ext2fs_dir_iterate(ext2_filsys fs, 
+extern errcode_t ext2fs_dir_iterate(ext2_filsys fs,
                              ext2_ino_t dir,
                              int flags,
                              char *block_buf,
@@ -611,7 +611,7 @@ extern errcode_t ext2fs_expand_dir(ext2_filsys fs, ext2_ino_t dir);
 /* ext_attr.c */
 void ext2fs_swap_ext_attr(ext2_filsys fs, char *to, char *from);
 extern errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf);
-extern errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, void *buf); 
+extern errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, void *buf);
 /* fileio.c */
 extern errcode_t ext2fs_file_open(ext2_filsys fs, ext2_ino_t ino,
                                  int flags, ext2_file_t *ret);
@@ -756,14 +756,14 @@ extern errcode_t ext2fs_read_bb_inode(ext2_filsys fs,
                                      ext2_badblocks_list *bb_list);
 
 /* read_bb_file.c */
-extern errcode_t ext2fs_read_bb_FILE2(ext2_filsys fs, FILE *f, 
+extern errcode_t ext2fs_read_bb_FILE2(ext2_filsys fs, FILE *f,
                                      ext2_badblocks_list *bb_list,
                                      void *private,
                                      void (*invalid)(ext2_filsys fs,
                                                      blk_t blk,
                                                      char *badstr,
                                                      void *private));
-extern errcode_t ext2fs_read_bb_FILE(ext2_filsys fs, FILE *f, 
+extern errcode_t ext2fs_read_bb_FILE(ext2_filsys fs, FILE *f,
                                     ext2_badblocks_list *bb_list,
                                     void (*invalid)(ext2_filsys fs,
                                                     blk_t blk));
@@ -855,7 +855,7 @@ _INLINE_ errcode_t ext2fs_free_mem(void **ptr)
        *ptr = 0;
        return 0;
 }
-       
+
 /*
  *  Resize memory
  */
index 5bc7eebcb6fe44e617f0f8f20e21c929e06f7026..d960fea61918c80526f97d707f589647241bb8ff 100644 (file)
@@ -35,14 +35,14 @@ struct fs_t {
                        const char*             dev_name,
                        struct partition_t*     part,
                        const char*             file_name);
-                       
+
        int (*read)(    struct boot_file_t*     file,
                        unsigned int            size,
                        void*                   buffer);
-                               
+
        int (*seek)(    struct boot_file_t*     file,
                        unsigned int            newpos);
-                                       
+
        int (*close)(   struct boot_file_t*     file);
 };
 
index 81d6f104ca42b84f52377b681ba23f0a643fa8f1..c4c30623c3dd80ab551d8411cb7af57a5dd222fc 100644 (file)
@@ -506,7 +506,7 @@ typedef struct elf64_phdr {
 #define SHN_COMMON     0xfff2
 #define SHN_HIRESERVE  0xffff
 #define SHN_MIPS_ACCOMON       0xff00
+
 typedef struct {
   Elf32_Word   sh_name;
   Elf32_Word   sh_type;
index fc3d48cd91eb2be432e7e23e9bcff1c2a5c645aa..017b95fda8ed77689a218e0bb3e2d656eab324a9 100644 (file)
@@ -196,7 +196,7 @@ struct ext2_group_desc
 #define EXT2_COMPRBLK_FL               0x00000200 /* One or more compressed clusters */
 #define EXT2_NOCOMP_FL                 0x00000400 /* Don't compress */
 #define EXT2_ECOMPR_FL                 0x00000800 /* Compression error */
-/* End compression flags --- maybe not all used */     
+/* End compression flags --- maybe not all used */
 #define EXT2_BTREE_FL                  0x00001000 /* btree format dir */
 #define EXT2_RESERVED_FL               0x80000000 /* reserved for ext2 lib */
 
@@ -365,7 +365,7 @@ struct ext2_super_block {
         * the incompatible feature set is that if there is a bit set
         * in the incompatible feature set that the kernel doesn't
         * know about, it should refuse to mount the filesystem.
-        * 
+        *
         * e2fsck's requirements are more strict; if it doesn't know
         * about a feature in either the compatible or incompatible
         * feature set, it must abort and not try to meddle with
index 822f85c26b991104a7c3fb08933ac682e095a291..165584b89604cc80d5b35d591b10282484282910 100644 (file)
@@ -99,7 +99,7 @@ struct reiserfs_journal_header {
                            || ih_version(ih) == ITEM_VERSION_1) \
                            ? le32_to_cpu ((ih)->ih_key.u.k_offset_v1.k_offset) \
                            : offset_v2_k_offset(&(ih)->ih_key.u.k_offset_v2))
+
 #define IH_KEY_ISTYPE(ih, type) ((INFO->version < 2 \
                 || ih_version(ih) == ITEM_VERSION_1) \
                 ? le32_to_cpu((ih)->ih_key.u.k_offset_v1.k_uniqueness) == V1_##type \
@@ -154,7 +154,7 @@ struct key {
 #define TYPE_DIRECT 2
 #define TYPE_DIRENTRY 3
 #define TYPE_ANY 15 // FIXME: comment is required
+
 //
 // in old version uniqueness field shows key type
 //
@@ -196,7 +196,7 @@ struct item_head
 
 /* Header of a disk block.  More precisely, header of a formatted leaf
    or internal node, and not the header of an unformatted node. */
-struct block_head {       
+struct block_head {
     __u16 blk_level;                  /* Level of a block in the tree */
     __u16 blk_nr_item;                /* Number of keys/items in a block */
     __u16 blk_free_space;             /* Block free space in bytes */
@@ -322,7 +322,7 @@ struct reiserfs_de_head
 #define DOT_OFFSET 1
 #define DOT_DOT_OFFSET 2
 #define DIRENTRY_UNIQUENESS 500
+
 #define V1_TYPE_STAT_DATA 0x0
 #define V1_TYPE_DIRECT 0xffffffff
 #define V1_TYPE_INDIRECT 0xfffffffe
@@ -332,14 +332,14 @@ struct reiserfs_de_head
 #define V2_TYPE_DIRECT 2
 #define V2_TYPE_DIRENTRY 3
 
+
 #define REISERFS_ROOT_OBJECTID 2
 #define REISERFS_ROOT_PARENT_OBJECTID 1
 #define REISERFS_SUPERBLOCK_BLOCK 16
 /* the spot for the super in versions 3.5 - 3.5.11 (inclusive) */
 #define REISERFS_OLD_SUPERBLOCK_BLOCK 2
 #define REISERFS_OLD_BLOCKSIZE 4096
+
 #define S_ISREG(mode) (((mode) & 0170000) == 0100000)
 #define S_ISDIR(mode) (((mode) & 0170000) == 0040000)
 #define S_ISLNK(mode) (((mode) & 0170000) == 0120000)
@@ -367,7 +367,7 @@ struct reiserfs_state
     __u32 journal_block_count; /* The size of the journal */
     __u32 journal_first_desc;  /* The first valid descriptor block in journal
                                  (relative to journal_block) */
-    
+
    __u16 version;              /* The ReiserFS version. */
    __u16 tree_depth;           /* The current depth of the reiser tree. */
    __u8  blocksize_shift;      /* 1 << blocksize_shift == blocksize. */
index 51db0984dd807d64155e96e3601ddcec55695784..51c1f63497d30450b4d411a9f77fe94453dbad71 100644 (file)
@@ -2,33 +2,33 @@
  * xfs.h - an extraction from xfsprogs-1.3.5/include/xfs* into one file
  *
  * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
  * published by the Free Software Foundation.
- * 
+ *
  * This program is distributed in the hope that it would be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * 
+ *
  * Further, this software is distributed without any warranty that it is
  * free of the rightful claim of any third person regarding infringement
  * or the like.  Any license provided herein, whether implied or
  * otherwise, applies only to this software file.  Patent licenses, if
  * any, provided herein do not apply to combinations of this program with
  * other software, or any other product whatsoever.
- * 
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write the Free Software Foundation, Inc., 59
  * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- * 
+ *
  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
  * Mountain View, CA  94043, or:
- * 
- * http://www.sgi.com 
- * 
- * For further information regarding this notice, see: 
- * 
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
@@ -131,7 +131,7 @@ typedef struct xfs_sb
        __uint8_t       sb_shared_vn;   /* shared version number */
        xfs_extlen_t    sb_inoalignmt;  /* inode chunk alignment, fsblocks */
        __uint32_t      sb_unit;        /* stripe or raid unit */
-       __uint32_t      sb_width;       /* stripe or raid width */      
+       __uint32_t      sb_width;       /* stripe or raid width */
        __uint8_t       sb_dirblklog;   /* log2 of dir block size (fsbs) */
         __uint8_t       sb_dummy[7];    /* padding */
 } xfs_sb_t;
index 94d3d6e144e7b1b2388f18538686905a609281cd..ca54937b48534c0b6fd130fc50e6a68986db375b 100644 (file)
@@ -1,25 +1,25 @@
 /*
- *  Yaboot - secondary boot loader for Linux on PowerPC. 
+ *  Yaboot - secondary boot loader for Linux on PowerPC.
  *
  *  Copyright (C) 2001 Ethan Benson
  *
  *  Copyright (C) 1999, 2000, 2001 Benjamin Herrenschmidt
- *  
+ *
  *  IBM CHRP support
- *  
+ *
  *  Copyright (C) 2001 Peter Bergner
  *
  *  portions based on poof
- *  
+ *
  *  Copyright (C) 1999 Marius Vollmer
- *  
+ *
  *  portions based on quik
- *  
+ *
  *  Copyright (C) 1996 Paul Mackerras.
- *  
+ *
  *  Because this program is derived from the corresponding file in the
  *  silo-0.64 distribution, it is also
- *  
+ *
  *  Copyright (C) 1996 Pete A. Zaitcev
  *                1996 Maurizio Plaza
  *                1996 David S. Miller
index 3279c073755d9e6fcf8fa18b9d489ca0f26b383b..672bb3e4004900b1cf82746ca94a1db174472ff1 100644 (file)
@@ -1,5 +1,5 @@
 /*  malloc.c - Dumb memory allocation routines
- *  
+ *
  *  Copyright (C) 1997 Paul Mackerras
  *                1996 Maurizio Plaza
  *                1996 Jakub Jelinek
index fd9ad7b8f32610e876e20de8065d19b13b6a0dd4..47a7dcce362d12ea04dd6ecf4e32b99e5c132764 100644 (file)
@@ -222,7 +222,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
                        *str++ = *fmt;
                        continue;
                }
-                       
+
                /* process flags */
                flags = 0;
                repeat:
@@ -234,7 +234,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
                                case '#': flags |= SPECIAL; goto repeat;
                                case '0': flags |= ZEROPAD; goto repeat;
                                }
-               
+
                /* get field width */
                field_width = -1;
                if (isdigit(*fmt))
@@ -252,7 +252,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
                /* get the precision */
                precision = -1;
                if (*fmt == '.') {
-                       ++fmt;  
+                       ++fmt;
                        if (isdigit(*fmt))
                                precision = skip_atoi(&fmt);
                        else if (*fmt == '*') {
index 3d0e3c36b9b09612fb0fd6261e62515954d9efe3..7a1b729d3e446709e85bc89c56b37d085d78ea35 100644 (file)
@@ -116,7 +116,7 @@ the NewWorld version will not attempt to read a boot sector.  By
 default OpenFirmware attempts to load a file with HFS file type
 \*(lqtbxi\*(rq in the \*(lqblessed\*(rq directory from each partition
 of each disk OpenFirmware is aware of, the first partition/disk that
-is found to be bootable is booted immediately. 
+is found to be bootable is booted immediately.
 
 .BR Ybin (8)
 configures a \fBbootstrap\fR partition to pass all of OpenFirmware's
@@ -140,7 +140,7 @@ partition for \fByaboot\fR(8).
 Since OpenFirmware boots the first partition it finds to be bootable
 it is important that the \fBbootstrap\fR partition be first on the
 disk before any MacOS partition, otherwise MacOS will be booted
-instead of a dual boot menu used with \fByaboot\fR(8).  
+instead of a dual boot menu used with \fByaboot\fR(8).
 
 The \fBbootstrap\fR partition should also NOT be mountable by MacOS,
 the reason is MacOS will (almost always) closely inspect any blessed
@@ -194,7 +194,7 @@ the built in ATA hard disk you can use the alias \*(lqhd:\*(rq.
 
 \fBYbin\fR also includes a utility \fBofpath\fR(8) which can in most
 cases find the OpenFirmware device path from a unix device node (ie
-/dev/hda2).  
+/dev/hda2).
 
 In addition to binary executables OpenFirmware can also execute a CHRP
 script.  This is somewhat similar to a shell script.  A CHRP script is
@@ -250,7 +250,7 @@ In order to boot from the disk they require a type 0x41 PReP Boot
 \fBbootstrap\fR partition large enough to hold the bootloader
 (typically \fByaboot\fR(8)).  The bootloader is copied onto the raw
 partition as there is no filesystem.  This is done either with \fBdd\fR(1)
-or \fBmkofboot\fR(8).  
+or \fBmkofboot\fR(8).
 .SH BUGS
 OpenFirmware
 .SH AUTHORS
index f04fd00284acf78db4a600bccf486b4d74ad33e4..2139ddb6e4f1dea7163484928cdd8eff7b5d936b 100644 (file)
@@ -13,8 +13,8 @@
 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 .\" GNU General Public License for more details.
 .\"
-.\" You should have received a copy of the GNU General Public License          
-.\" along with this program; if not, write to the Free Software                
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program; if not, write to the Free Software
 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 .\"
 .TH MKOFBOOT 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
@@ -22,7 +22,7 @@
 .B mkofboot
 \- format bootstrap partition and install the yaboot boot loader
 .SH SYNOPSIS
-.B mkofboot 
+.B mkofboot
 .RB [ \ \-b | \-\-boot\ \fIdevice\  ]
 .RB [ \ \-o | \-\-ofboot\ \fIof-path\  ]
 .RB [ \ \-i | \-\-install\ \fIboot-file\  ]
 .RB [ \ \-h | \-\-help\  ]
 .RB [ \ \-V | \-\-version\  ]
 .SH DESCRIPTION
-This manual page explains 
+This manual page explains
 .B mkofboot
-the initial installer for the  
-.BR yaboot (8) 
+the initial installer for the
+.BR yaboot (8)
 boot loader enabling GNU/Linux to be booted by OpenFirmware.
 
 .B mkofboot
-does exactly the same thing as 
+does exactly the same thing as
 .BR ybin (8)
 except that it erases and creates a new filesystem (specified by
 \-\-filesystem) on the \fBbootstrap\fR(8) partition before copying the
@@ -66,12 +66,12 @@ NOTE:
 uses the exact same command line options as
 .BR ybin (8)
 so if you have already read the \fBybin\fR(8) man page you can skip this
-section. 
+section.
 .TP
 .BR \-b ,\  \-\-boot\ \fIdevice
 Install the boot loader onto the specified device.  This device should
 be that of your \fBbootstrap\fR(8) partition. For example, if your
-\fBbootstrap\fR partition is located on your first primary IDE drive in the 
+\fBbootstrap\fR partition is located on your first primary IDE drive in the
 second partition, your device would be: \fI/dev/hda2\fR.
 .TP
 .BR \-o ,\  \-\-ofboot\ \fIof-path
@@ -174,7 +174,7 @@ The temporary directory \fBmkofboot\fR will use.
 .SH SECURITY
 Temporary files are created with
 .BR mktemp (1)
-it is important that your system use a secure 
+it is important that your system use a secure
 .BR mktemp (1)
 program otherwise \fBmkofboot\fR will be vulnerable to race conditions.
 The Debian mktemp is derived from OpenBSD and thus should be secure.
@@ -190,7 +190,7 @@ should be able to take care of OpenFirmware variables as needed on IBM
 hardware.
 .SH AUTHORS
 .BR mkofboot (8)
-, and this man page written by Ethan Benson. 
+, and this man page written by Ethan Benson.
 .br
 .BR yaboot (8)
 was written by Benjamin Herrenschmidt.
index b0c7894e0c2f8f279c7ac026a0c07244f469baae..994136b045c8bb156045cb13630ec5c6b8ffef0c 100644 (file)
@@ -17,8 +17,8 @@
 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 .\" GNU General Public License for more details.
 .\"
-.\" You should have received a copy of the GNU General Public License          
-.\" along with this program; if not, write to the Free Software                
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program; if not, write to the Free Software
 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 .\"
 .TH OFPATH 8 "27 May 2001" "GNU/Linux PowerPC" "System Manager's Manual"
@@ -32,7 +32,7 @@
 .RB [ \ \-V | \-\-version\  ]
 .IB FILE
 .SH DESCRIPTION
-This manual page explains 
+This manual page explains
 .BR ofpath ,
 the utility used to find the OpenFirmware device path corresponding to
 a unix device node, such as \fI/dev/hda2\fR.
@@ -47,7 +47,7 @@ work on BootX-booted OldWorld machines. Note that OldWorld support is
 not well tested and may not give accurate results.
 
 \fBYbin\fR(8) uses this utility to automatically convert unix device
-nodes to OpenFirmware paths as needed. 
+nodes to OpenFirmware paths as needed.
 .SH OPTIONS
 .TP
 .BR \-\-debug
@@ -65,14 +65,14 @@ Print out the version number and exit.
 may not accurately find all SCSI devices, and does not support all
 SCSI adapters/drivers.
 
-.B Ofpath 
-also does not support all IDE devices.  
+.B Ofpath
+also does not support all IDE devices.
 
 .B Ofpath
 does not support IBM hardware.  Send a tarball of /proc/device-tree
 along with /proc/cpuinfo to <erbenson@alaska.net>
 .SH AUTHORS
-.B Ofpath 
+.B Ofpath
 is based on show_of_path.sh written by Olaf Hering, it was
 rewritten to work with /bin/ash and stripped down systems such as
 boot/rescue floppies by Ethan Benson.  This man page was written by
index 699b47f89d1f2a859c1db581c203e4684bfc83bc..0d6f058f1d4b97194f8b24821a338d761c9263c9 100644 (file)
@@ -8,7 +8,7 @@
 .B Yaboot
 is an OpenFirmware ELF executable that bootstraps the Linux kernel.
 .SH DESCRIPTION
-This manual page explains the \fByaboot\fR OpenFirmware boot loader. 
+This manual page explains the \fByaboot\fR OpenFirmware boot loader.
 
 .B yaboot
 is \fInot\fR a Linux or MacOS executable file.  Attempting to execute
@@ -95,11 +95,11 @@ they should be kept.
 .SH EXAMPLES
 boot \fByaboot\fR from internal ATA disk, partition 2:
 
-.I boot hd:2,yaboot 
+.I boot hd:2,yaboot
 
 boot \fByaboot\fR from partition 2 of a disk with SCSI ID 2 attached to a
 Adaptec 2930 SCSI Host adapter (this is on a rev1 blue G3, it may vary
-on other models): 
+on other models):
 
 .I boot /pci@80000000/pci-bridge@d/ADPT,2930CU@2/@2:2,yaboot
 
index 6d96f6ec1303136bfb0804bfc7d2664c77984af2..ba7f12e587788aede6f5be2211730a603d9a25b5 100644 (file)
@@ -19,7 +19,7 @@ and
 The \fByaboot.conf\fP file is a configuration file for \fByaboot\fP
 which is read during booting, and for \fBybin\fR(8) to generate a boot
 menu and to properly install \fByaboot\fP onto the \fBbootstrap\fP(8)
-partition. 
+partition.
 
 \fByaboot.conf\fP provides instructions for \fByaboot\fP. This
 includes which kernels to load and what options to pass to them.
@@ -63,7 +63,7 @@ is:
 The first form refers to a file or directory on some supported filesystem
 (currently \fIext2\fP, \fIhfs\fP, \fIhfs+\fP or \fIiso9660\fP), the latter
 refers to a range of 512B blocks on a device. For a device block range,
-either <devicename>, or <part>, or [<m>-<n>] must be given. 
+either <devicename>, or <part>, or [<m>-<n>] must be given.
 
 Optional <devicename> is the OpenFirmware name of the device the file or range
 is located on. See below for its syntax. For OpenFirmware the device
@@ -340,7 +340,7 @@ filesystem MacOS will mount and debless the OSX partition.  Add this
 option if the OSX menu entry breaks after booting MacOS.  You should
 not use this option if OSX is installed on a UFS filesystem, for UFS
 installs you specify the OSX bootstrap partition which is protected
-against MacOS.  This option requires \fImacosx=\fR to be set.  
+against MacOS.  This option requires \fImacosx=\fR to be set.
 .TP
 .BI "darwin=" of-path
 The OpenFirmware or unix device path to a Darwin boot partition.
@@ -353,7 +353,7 @@ use the \fBofpath\fR(8) utility to determine the OpenFirmware device
 path.
 .TP
 .B "enablecdboot"
-This option adds an entry to the multiboot menu to boot from the CDROM drive. 
+This option adds an entry to the multiboot menu to boot from the CDROM drive.
 .TP
 .B "enablenetboot"
 This option adds an entry to the multiboot menu to boot from the network.
@@ -618,7 +618,7 @@ macosx=/dev/hda10
 .SH NOTES
 The format defined in this man page will not work with versions of
 \fByaboot\fR(8) older then 0.6.  The color options only work with
-yaboot 1.0 and later. 
+yaboot 1.0 and later.
 .SH BUGS
 Some
 .B yaboot
index f2a46cd60448bb4940ea874de5aeae0c8e6b2ad7..e46710e6b436621e9a1a55943410e01354920dbd 100644 (file)
@@ -13,8 +13,8 @@
 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 .\" GNU General Public License for more details.
 .\"
-.\" You should have received a copy of the GNU General Public License          
-.\" along with this program; if not, write to the Free Software                
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program; if not, write to the Free Software
 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 .\"
 .TH YABOOTCONFIG 8 "24 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
 .RB [ \ \-h | \-\-help\  ]
 .RB [ \ \-V | \-\-version\  ]
 .SH DESCRIPTION
-This manual page explains 
+This manual page explains
 .B yabootconfig
-the configurator for the  
-.BR yaboot (8) 
+the configurator for the
+.BR yaboot (8)
 boot loader enabling GNU/Linux to be booted by OpenFirmware.
 Specifically it inspects the running system, generates a working
 .BR /etc/yaboot.conf (5)
@@ -55,7 +55,7 @@ should be kept. \fBmkofboot\fR will refuse to operate on the
 
 .B yabootconfig
 requires \fBofpath\fR(8) in order to get the OpenFirmware device name
-for the root disk on PowerMacs. 
+for the root disk on PowerMacs.
 .SH OPTIONS
 .TP
 .BR \-t ,\  \-\-chroot\ \fIdirectory
@@ -126,7 +126,7 @@ Print out the version number and exit.
 .fi
 .SH AUTHORS
 .B yabootconfig
-and this man page was written by Ethan Benson. 
+and this man page was written by Ethan Benson.
 .br
 .B yaboot
 was written by Benjamin Herrenschmidt.
index 98e437105a3a962a7ce62803ba0240f5e67490fe..7239882ba51999a6637d5bb254cb74a35b2238e7 100644 (file)
@@ -13,8 +13,8 @@
 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 .\" GNU General Public License for more details.
 .\"
-.\" You should have received a copy of the GNU General Public License          
-.\" along with this program; if not, write to the Free Software                
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program; if not, write to the Free Software
 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 .\"
 .TH YBIN 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
@@ -22,7 +22,7 @@
 .B ybin
 \- install the yaboot boot loader to a bootstrap partition.
 .SH SYNOPSIS
-.B ybin 
+.B ybin
 .RB [ \ \-b | \-\-boot\ \fIdevice\  ]
 .RB [ \ \-o | \-\-ofboot\ \fIof-path\  ]
 .RB [ \ \-i | \-\-install\ \fIboot-file\  ]
 .RB [ \ \-h | \-\-help\  ]
 .RB [ \ \-V | \-\-version\  ]
 .SH DESCRIPTION
-This manual page explains 
-.B ybin 
-the installer for the  
-.BR yaboot (8) 
+This manual page explains
+.B ybin
+the installer for the
+.BR yaboot (8)
 boot loader enabling GNU/Linux to be booted by OpenFirmware.
-Specifically it copies the 
+Specifically it copies the
 .B yaboot
-binary and 
+binary and
 .BR yaboot.conf (5)
-and usually a \*(lqmagicboot\*(rq script to a 
+and usually a \*(lqmagicboot\*(rq script to a
 .BR bootstrap (8)
-partition.  
+partition.
 
 .B Ybin
 will set attributes on the boot loader files and to the
@@ -64,18 +64,18 @@ will also set the OpenFirmware boot-device variable to the device path
 of the \fBbootstrap\fR(8) partition using \fBnvsetenv\fR(8) when a
 NewWorld compatible version of \fBnvsetenv\fR(8) is available.
 
-.B Ybin 
-requires that the 
+.B Ybin
+requires that the
 .BR bootstrap (8)
 partition have an HFS filesystem already on it.  For IBM
 hardware there is no filesystem on the \fBbootstrap\fR(8) partition,
 in this case use fstype=raw.  When using the raw filesystem type
 \fBybin\fR requires that an ELF binary have already been installed on
 the \fBbootstrap\fR(8) partition.  Use the companion
-.BR mkofboot (8) 
-utility to install the boot loader onto a new 
+.BR mkofboot (8)
+utility to install the boot loader onto a new
 .BR bootstrap (8)
-partition. 
+partition.
 
 The \fBbootstrap\fR(8) need not and should not be mounted anywhere on
 your filesystem, especially not on top of /boot.  \fBYaboot\fR is able
@@ -87,7 +87,7 @@ they should be kept. \fBYbin\fR will refuse to operate on the
 .BR \-b ,\  \-\-boot\ \fIdevice
 Install the boot loader onto the specified device, this device should
 be that of your \fBbootstrap\fR(8) partition. For example, if your
-\fBbootstrap\fR partition is located on your first primary IDE drive in the 
+\fBbootstrap\fR partition is located on your first primary IDE drive in the
 second partition, your device would be: \fI/dev/hda2\fR.
 .TP
 .BR \-o ,\  \-\-ofboot\ \fIof-path
@@ -188,7 +188,7 @@ The temporary directory \fBybin\fR will use.
 .SH SECURITY
 Temporary files are created with
 .BR mktemp (1).
-It is important that your system use a secure 
+It is important that your system use a secure
 .BR mktemp (1)
 program, otherwise \fBybin\fR will be vulnerable to race conditions.
 The Debian mktemp is derived from OpenBSD and thus should be secure.
@@ -199,12 +199,12 @@ root.  It is also critical that \fI/etc/yaboot.conf\fR not be writable
 by anyone but root since a different \fIofboot\fR script could be
 specified there.
 .SH BUGS
-.B Ybin 
+.B Ybin
 should be able to take care of OpenFirmware variables as needed on IBM
 hardware.
 .SH AUTHORS
 .B ybin
-and this man page was written by Ethan Benson. 
+and this man page was written by Ethan Benson.
 .br
 .B yaboot
 was written by Benjamin Herrenschmidt.
index b62c32c995dc84f7d9a1b46f1dde722ada892b68..03c690a323b80fa63b8fe3174b778852b4d5cda1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  cache.S - PowerPC version 
+ *  cache.S - PowerPC version
  *
  *  Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *
@@ -22,7 +22,7 @@
 
 #include "asm/ppc_asm.tmpl"
 #include "asm/processor.h"
-       
+
 /*
  * Write any modified data cache blocks out to memory
  * and invalidate the corresponding instruction cache blocks.
index 90114677040d0171325a63a56463ee371686364e..ebf05aef95b86c8cf207b301173d8bd54c8d5f51 100644 (file)
@@ -344,7 +344,7 @@ int cfg_parse (char *cfg_file, char *buff, int len)
          if (!cfg_set (item, value)) {
 #if DEBUG
               prom_printf("Can't set item %s to value %s\n", item, value);
-#endif     
+#endif
          }
          free (item);
      }
@@ -455,7 +455,7 @@ char *cfg_get_default (void)
      return ret;
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 7b69f1fedc8e658c2fd5d9e4c42e7e462e37dbd2..117bca0082f989dc90d102e35f871f7e7e2a2d2f 100644 (file)
@@ -52,7 +52,7 @@ void cmdedit (void (*tabfunc) (void), int password)
      }
      if (!password)
          prom_printf(buff, x);
-     
+
      for (;;) {
          c = prom_getchar ();
          if (c == -1)
index 8f86a6eaefb0b11e685ae5831bfd799617a59ba3..0e58286e724f1be9c44fd4158cebe21d5e23747c 100644 (file)
@@ -147,7 +147,7 @@ static char *netdev_path_to_dev(const char *path)
 /* This function follows the device path in the devtree and separates
    the device name, partition number, and other datas (mostly file name)
    the string passed in parameters is changed since 0 are put in place
-   of some separators to terminate the various strings.  
+   of some separators to terminate the various strings.
 
    when a default device is supplied imagepath will be assumed to be a
    plain filename unless it contains a : otherwise if defaultdev is
@@ -185,7 +185,7 @@ parse_device_path(char *imagepath, char *defdevice, int defpart,
 
      if (!imagepath)
          return 0;
-     else if (!(ipath = strdup(imagepath))) 
+     else if (!(ipath = strdup(imagepath)))
          return 0;
 
      if (defdevice) {
@@ -229,7 +229,7 @@ parse_device_path(char *imagepath, char *defdevice, int defpart,
          if (*(ptr+1))
               result->part = simple_strtol(ptr+1, NULL, 10);
      } else if (!defdev) {
-         result->dev = strdup(ipath); 
+         result->dev = strdup(ipath);
      } else if (strlen(ipath)) {
           result->file = strdup(ipath);
      } else {
@@ -239,10 +239,10 @@ parse_device_path(char *imagepath, char *defdevice, int defpart,
 
      if (!result->dev && defdev)
          result->dev = strdup(defdev);
-     
+
      if (result->part < 0)
          result->part = defpart;
-     
+
      if (!result->file)
          result->file = strdup(deffile);
 
@@ -262,10 +262,10 @@ file_block_open(  struct boot_file_t*     file,
      struct partition_t*       parts;
      struct partition_t*       p;
      struct partition_t*       found;
-       
+
      parts = partitions_lookup(dev_name);
      found = NULL;
-                       
+
 #if DEBUG
      if (parts)
          prom_printf("partitions:\n");
@@ -289,7 +289,7 @@ file_block_open(    struct boot_file_t*     file,
 #if DEBUG
          if (found)
               prom_printf(" (match)\n");
-#endif                                         
+#endif
      }
 
      /* Note: we don't skip when found is NULL since we can, in some
@@ -351,7 +351,7 @@ static struct fs_t fs_default =
 int open_file(const struct boot_fspec_t* spec, struct boot_file_t* file)
 {
      int result;
-       
+
      memset(file, 0, sizeof(struct boot_file_t*));
      file->fs        = &fs_default;
 
@@ -363,7 +363,7 @@ int open_file(const struct boot_fspec_t* spec, struct boot_file_t* file)
          file->device_kind = result;
      else
          return result;
-       
+
      switch(file->device_kind) {
      case FILE_DEVICE_BLOCK:
          DEBUG_F("device is a block device\n");
@@ -375,7 +375,7 @@ int open_file(const struct boot_fspec_t* spec, struct boot_file_t* file)
      return 0;
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 82db81a2e7bf1a9864c97f71d72ede81014773a0..729e2f4a64b55a7c90a920e013be2eab32128cc0 100644 (file)
@@ -65,7 +65,7 @@ struct fs_t ext2_filesystem =
 };
 
 /* IO manager structure for the ext2 library */
+
 static errcode_t linux_open (const char *name, int flags, io_channel * channel);
 static errcode_t linux_close (io_channel channel);
 static errcode_t linux_set_blksize (io_channel channel, int blksize);
@@ -129,7 +129,7 @@ ext2_open(  struct boot_file_t*     file,
      int error = FILE_ERR_NOTFOUND;
      static char buffer[1024];
      int ofopened = 0;
-       
+
      DEBUG_ENTER;
      DEBUG_OPEN;
 
@@ -143,7 +143,7 @@ ext2_open(  struct boot_file_t*     file,
      }
 
      fs = NULL;
-       
+
      /* We don't care too much about the device block size since we run
       * thru the deblocker. We may have to change that is we plan to be
       * compatible with older versions of OF
@@ -174,7 +174,7 @@ ext2_open(  struct boot_file_t*     file,
          return FILE_IOERR;
      }
      ofopened = 1;
-       
+
      /* Open the ext2 filesystem */
      result = ext2fs_open (buffer, EXT2_FLAG_RW, 0, 0, linux_io_manager, &fs);
      if (result) {
@@ -201,7 +201,7 @@ ext2_open(  struct boot_file_t*     file,
          error = FILE_IOERR;
          goto bail;
      }
-       
+
      /* Lookup file by pathname */
      root = cwd = EXT2_ROOT_INO;
      result = ext2fs_namei_follow(fs, root, cwd, file_name, &file->inode);
@@ -225,7 +225,7 @@ ext2_open(  struct boot_file_t*     file,
          error = FILE_ERR_NOTFOUND;
          goto bail;
      }
-#endif 
+#endif
 
 #ifndef FAST_VERSION
      result = ext2fs_read_inode(fs, file->inode, &cur_inode);
@@ -244,7 +244,7 @@ ext2_open(  struct boot_file_t*     file,
      }
 #endif /* FAST_VERSION */
      file->pos = 0;
-       
+
      opened = 1;
 bail:
      if (!opened) {
@@ -257,7 +257,7 @@ bail:
               free(block_buffer);
          block_buffer = NULL;
          cur_file = NULL;
-           
+
          DEBUG_LEAVE_F(error);
          return error;
      }
@@ -282,7 +282,7 @@ read_dump_range(void)
      if ((count * bs) > read_max)
          count--;
      if (count) {
-         size = count * bs;    
+         size = count * bs;
          read_result = io_channel_read_blk(fs->io, read_range_start, count, read_buffer);
          if (read_result)
               return BLOCK_ABORT;
@@ -293,7 +293,7 @@ read_dump_range(void)
          read_range_count -= count;
          read_range_start += count;
          read_last_logical += count;
-     } 
+     }
      /* Handle remaining block */
      if (read_max && read_range_count) {
          read_result = io_channel_read_blk(fs->io, read_range_start, 1, block_buffer);
@@ -343,7 +343,7 @@ read_iterator(ext2_filsys fs, blk_t *blocknr, int lg_block, void *private)
          ++read_range_count;
          return ((read_range_count * bs) >= read_max) ? BLOCK_ABORT : 0;
      }
-    
+
      /* Range doesn't match. Dump existing range */
      if (read_range_start) {
 #ifdef VERBOSE_DEBUG
@@ -418,7 +418,7 @@ read_iterator(ext2_filsys fs, blk_t *blocknr, int lg_block, void *private)
          read_range_count = 1;
          return (bs >= read_max) ? BLOCK_ABORT : 0;
      }
-    
+
 #ifdef VERBOSE_DEBUG
      DEBUG_F("\n");
 #endif
@@ -450,7 +450,7 @@ ext2_read(  struct boot_file_t*     file,
      read_max = size;
      read_buffer = (unsigned char*)buffer;
      read_result = 0;
-    
+
      retval = ext2fs_block_iterate(fs, file->inode, 0, 0, read_iterator, 0);
      if (retval == BLOCK_ABORT)
          retval = read_result;
@@ -464,13 +464,13 @@ ext2_read(        struct boot_file_t*     file,
      }
      if (retval)
          prom_printf ("ext2: i/o error %ld in read\n", (long) retval);
-               
+
      return read_total;
 
 #else /* FAST_VERSION */
      int status;
      unsigned int read = 0;
-       
+
      if (!opened)
          return FILE_IOERR;
 
@@ -478,11 +478,11 @@ ext2_read(        struct boot_file_t*     file,
      DEBUG_F("ext_read() from pos 0x%x, size: 0x%x\n", file->pos, size);
 
 
-     while(size) {     
+     while(size) {
          blk_t fblock = file->pos / bs;
          blk_t pblock;
          unsigned int blkorig, s, b;
-       
+
          pblock = 0;
          status = ext2fs_bmap(fs, file->inode, &cur_inode,
                               block_buffer, 0, fblock, &pblock);
@@ -515,7 +515,7 @@ ext2_read(  struct boot_file_t*     file,
          file->pos += s;
      }
      return read;
-#endif /* FAST_VERSION */      
+#endif /* FAST_VERSION */
 }
 
 static int
@@ -542,12 +542,12 @@ ext2_close(       struct boot_file_t*     file)
      if (fs)
          ext2fs_close(fs);
      fs = NULL;
-       
+
      prom_close(file->of_device);
      DEBUG_F("ext2_close called\n");
 
      opened = 0;
-           
+
      return 0;
 }
 
@@ -586,7 +586,7 @@ static errcode_t linux_set_blksize (io_channel channel, int blksize)
      if (block_buffer) {
          free(block_buffer);
          block_buffer = malloc(bs * 2);
-     } 
+     }
      return 0;
 }
 
@@ -597,7 +597,7 @@ static errcode_t linux_read_blk (io_channel channel, unsigned long block, int co
 
      if (count == 0)
          return 0;
-    
+
      tempb = (((unsigned long long) block) *
              ((unsigned long long)bs)) + (unsigned long long)doff;
      size = (count < 0) ? -count : count * bs;
@@ -619,7 +619,7 @@ static errcode_t linux_flush (io_channel channel)
      return 0;
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 6f301592dc88182c8ec0496ed3a49c0fb2ed27f2..303790f27bded5f97d8dd34b0d2a6a38ed367396 100644 (file)
@@ -78,7 +78,7 @@ iso_close(    struct boot_file_t*     file)
      return 0;
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index e7b37bdd05742c915125cf787c611d2b49a1fb01..76474ee29744dc85158efee7b14bfb6fb63f9628 100644 (file)
@@ -20,7 +20,7 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-/* 
+/*
  * BrokenFirmware cannot "read" from the network. We use tftp "load"
  * method for network boot for now, we may provide our own NFS
  * implementation in a later version. That means that we allocate a
@@ -86,7 +86,7 @@ of_open(struct boot_file_t* file, const char* dev_name,
      static char       buffer[1024];
      char               *filename;
      char               *p;
-       
+
      DEBUG_ENTER;
      DEBUG_OPEN;
 
@@ -107,7 +107,7 @@ of_open(struct boot_file_t* file, const char* dev_name,
               strcat(buffer, ",");
          filename = strdup(file_name);
          for (p = filename; *p; p++)
-              if (*p == '/') 
+              if (*p == '/')
                    *p = '\\';
          strcat(buffer, filename);
          free(filename);
@@ -126,7 +126,7 @@ of_open(struct boot_file_t* file, const char* dev_name,
          DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
          return FILE_ERR_BAD_FSYS;
      }
-       
+
      DEBUG_LEAVE(FILE_ERR_OK);
      return FILE_ERR_OK;
 }
@@ -147,12 +147,12 @@ of_net_open(struct boot_file_t* file, const char* dev_name,
          strcat(buffer, ",");
          filename = strdup(file_name);
          for (p = filename; *p; p++)
-              if (*p == '/') 
+              if (*p == '/')
                    *p = '\\';
          strcat(buffer, filename);
          free(filename);
      }
-                       
+
      DEBUG_F("Opening: \"%s\"\n", buffer);
 
      file->of_device = prom_open(buffer);
@@ -165,7 +165,7 @@ of_net_open(struct boot_file_t* file, const char* dev_name,
          DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
          return FILE_ERR_BAD_FSYS;
      }
-       
+
      file->buffer = prom_claim((void *)LOAD_BUFFER_POS, LOAD_BUFFER_SIZE, 0);
      if (file->buffer == (void *)-1) {
          prom_printf("Can't claim memory for TFTP download\n");
@@ -178,9 +178,9 @@ of_net_open(struct boot_file_t* file, const char* dev_name,
      DEBUG_F("TFP...\n");
 
      file->len = prom_loadmethod(file->of_device, file->buffer);
-       
+
      DEBUG_F("result: %Ld\n", file->len);
-       
+
      DEBUG_LEAVE(FILE_ERR_OK);
      return FILE_ERR_OK;
 }
@@ -189,7 +189,7 @@ static int
 of_read(struct boot_file_t* file, unsigned int size, void* buffer)
 {
      unsigned int count;
-       
+
      count = prom_read(file->of_device, buffer, size);
      file->pos += count;
      return count;
@@ -199,9 +199,9 @@ static int
 of_net_read(struct boot_file_t* file, unsigned int size, void* buffer)
 {
      unsigned int count, av;
-       
+
      av = file->len - file->pos;
-     count = size > av ? av : size; 
+     count = size > av ? av : size;
      memcpy(buffer, file->buffer + file->pos, count);
      file->pos += count;
      return count;
@@ -214,7 +214,7 @@ of_seek(struct boot_file_t* file, unsigned int newpos)
          file->pos = newpos;
          return FILE_ERR_OK;
      }
-               
+
      return FILE_CANT_SEEK;
 }
 
@@ -238,11 +238,11 @@ of_close(struct boot_file_t* file)
      prom_close(file->of_device);
      DEBUG_F("of_close called\n");
 
-     DEBUG_LEAVE(0);   
+     DEBUG_LEAVE(0);
      return 0;
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 95942374c4045ac16c3a5c69b9d363feff107c08..4ad1c2ec176dbb9bb7495e9550e0d4312c40643e 100644 (file)
@@ -191,7 +191,7 @@ journal_read( __u32 block, __u32 len, char *buffer )
 
 /* Read a block from ReiserFS file system, taking the journal into
  * account.  If the block nr is in the journal, the block from the
- * journal taken.  
+ * journal taken.
  */
 static int
 block_read( __u32 blockNr, __u32 start, __u32 len, char *buffer )
@@ -259,7 +259,7 @@ block_read( __u32 blockNr, __u32 start, __u32 len, char *buffer )
          DEBUG_F( "block_read: block %u is mapped to journal block %u.\n",
                   blockNr, translatedNr - INFO->journal_block );
 
-         /* We must continue the search, as this block may be overwritten in 
+         /* We must continue the search, as this block may be overwritten in
           * later transactions. */
      not_found:
          desc_block = (desc_block + 2 + j_len) & journal_mask;
@@ -273,8 +273,8 @@ block_read( __u32 blockNr, __u32 start, __u32 len, char *buffer )
  * we can still read the rest from the disk on demand.
  *
  * The first number of valid transactions and the descriptor block of the
- * first valid transaction are held in INFO.  The transactions are all 
- * adjacent, but we must take care of the journal wrap around. 
+ * first valid transaction are held in INFO.  The transactions are all
+ * adjacent, but we must take care of the journal wrap around.
  */
 static int
 journal_init( void )
@@ -335,7 +335,7 @@ journal_init( void )
               {
                    int i;
 
-                   /* Cache the length and the realblock numbers in the table. * 
+                   /* Cache the length and the realblock numbers in the table. *
                     * The block number of descriptor can easily be computed. *
                     * and need not to be stored here. */
                    *journal_table++ = desc.j_len;
@@ -505,7 +505,7 @@ reiserfs_read_super( void )
  * My tree node cache is organized as following
  *   0   ROOT node
  *   1   LEAF node  (if the ROOT is also a LEAF it is copied here
- *   2-n other nodes on current path from bottom to top.  
+ *   2-n other nodes on current path from bottom to top.
  *       if there is not enough space in the cache, the top most are
  *       omitted.
  *
@@ -515,7 +515,7 @@ reiserfs_read_super( void )
  *   next_key() gets the next key in tree order.
  *
  * This means, that I can only sequential reads of files are
- * efficient, but this really doesn't hurt for grub.  
+ * efficient, but this really doesn't hurt for grub.
  */
 
 /* Read in the node at the current path and depth into the node cache.
@@ -565,7 +565,7 @@ read_tree_node( __u32 blockNr, __u16 depth )
 }
 
 /* Get the next key, i.e. the key following the last retrieved key in
- * tree order.  INFO->current_ih and 
+ * tree order.  INFO->current_ih and
  * INFO->current_info are adapted accordingly.  */
 static int
 next_key( void )
@@ -626,7 +626,7 @@ next_key( void )
               DEBUG_F( "  depth=%u, i=%u/%u\n", depth, key_nr, nr_item );
 
               if ( key_nr == nr_item )
-                   /* This is the last item in this block, set the next_key_nr * 
+                   /* This is the last item in this block, set the next_key_nr *
                     * to 0 */
                    INFO->next_key_nr[depth] = 0;
 
@@ -654,11 +654,11 @@ found:
      return 1;
 }
 
-/* preconditions: reiserfs_read_super already executed, therefore 
+/* preconditions: reiserfs_read_super already executed, therefore
  *   INFO block is valid
- * returns: 0 if error (errnum is set), 
+ * returns: 0 if error (errnum is set),
  *   nonzero iff we were able to find the key successfully.
- * postconditions: on a nonzero return, the current_ih and 
+ * postconditions: on a nonzero return, the current_ih and
  *   current_item fields describe the key that equals the
  *   searched key.  INFO->next_key contains the next key after
  *   the searched key.
@@ -819,11 +819,11 @@ done:
 }
 
 
-/* preconditions: reiserfs_read_super already executed, therefore 
+/* preconditions: reiserfs_read_super already executed, therefore
  *   INFO block is valid
  * returns: 0 if error, nonzero iff we were able to find the file successfully
  * postconditions: on a nonzero return, INFO->fileinfo contains the info
- *   of the file we were trying to look up, filepos is 0 and filemax is 
+ *   of the file we were trying to look up, filepos is 0 and filemax is
  *   the size of the file.
  */
 static int
@@ -885,7 +885,7 @@ reiserfs_open_file( char *dirname )
                    return 0;
               }
 
-              /* Copy the remaining name to the end of the symlink data. Note * 
+              /* Copy the remaining name to the end of the symlink data. Note *
                * that DIRNAME and LINKBUF may overlap! */
               memmove( linkbuf + INFO->file->len, dirname, len + 1 );
 
@@ -976,7 +976,7 @@ reiserfs_open_file( char *dirname )
                    {
                         int cmp;
 
-                        /* Directory names in ReiserFS are not null * terminated. 
+                        /* Directory names in ReiserFS are not null * terminated.
                          * We write a temporary 0 behind it. * NOTE: that this
                          * may overwrite the first block in * the tree cache.
                          * That doesn't hurt as long as we * don't call next_key
@@ -987,7 +987,7 @@ reiserfs_open_file( char *dirname )
                         if ( cmp == 0 )
                              goto found;
                    }
-                   /* The beginning of this name marks the end of the next name. 
+                   /* The beginning of this name marks the end of the next name.
                     */
                    name_end = filename;
                    de_head++;
@@ -1025,7 +1025,7 @@ offset_v2_k_type( struct offset_v2 *v2 )
      tmp.linear = le64_to_cpu( tmp.linear );
      return tmp.offset_v2.k_type;
 }
+
 inline loff_t
 offset_v2_k_offset( struct offset_v2 *v2 )
 {
@@ -1047,7 +1047,7 @@ uniqueness2type (__u32 uniqueness)
      return TYPE_ANY;
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 1bfadba0070d7fe7129de3574b8436ead05f636a..9a2aaa6bd097bfcdf1a7fcdbba470bc3095cef53 100644 (file)
@@ -92,7 +92,7 @@ xfs_open(struct boot_file_t *file, const char *dev_name,
        DEBUG_F("%p was successfully opened\n", file->of_device);
 
        xfs_file = file;
-    
+
        if (xfs_mount() != 1)
        {
                DEBUG_F("Couldn't open XFS @ %s/%Lu\n", buffer, partition_offset);
@@ -241,7 +241,7 @@ ino2offset (xfs_ino_t ino)
 static xfs_fsblock_t
 xt_start (xfs_bmbt_rec_32_t *r)
 {
-       return (((xfs_fsblock_t)(le32 (r->l1) & mask32lo(9))) << 43) | 
+       return (((xfs_fsblock_t)(le32 (r->l1) & mask32lo(9))) << 43) |
               (((xfs_fsblock_t)le32 (r->l2)) << 11) |
               (((xfs_fsblock_t)le32 (r->l3)) >> 21);
 }
@@ -512,7 +512,7 @@ next_dentry (xfs_ino_t *ino)
                        ++name;
                        ++namelen;
                        sfe = (xfs_dir2_sf_entry_t *)
-                               (inode->di_u.di_c 
+                               (inode->di_u.di_c
                                 + sizeof(xfs_dir2_sf_hdr_t)
                                 - xfs.i8param);
                        break;
@@ -666,7 +666,7 @@ xfs_read_data (char *buf, int len)
                offset = xad->offset;
                xadlen = xad->len;
                if (isinxt (xfs_file->pos >> xfs.blklog, offset, xadlen)) {
-                       endofcur = (offset + xadlen) << xfs.blklog; 
+                       endofcur = (offset + xadlen) << xfs.blklog;
                        toread = (endofcur >= endpos)
                                  ? len : (endofcur - xfs_file->pos);
                        read_disk_block(xfs_file, fsb2daddr (xad->start),
@@ -684,7 +684,7 @@ xfs_read_data (char *buf, int len)
                        }
                        continue;
                }
-               endofprev = offset + xadlen; 
+               endofprev = offset + xadlen;
        }
 
        return xfs_file->pos - startpos;
@@ -778,7 +778,7 @@ xfs_dir (char *dirname)
        }
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 8
index 134163ba3361021bcbe819e0b9a616cb0048a932..58fd953e3491c2f5c16c4de301605fb5652604fb 100644 (file)
@@ -19,7 +19,7 @@ int
 isonum_712 (char * p)
 {
      int val;
-       
+
      val = *p;
      if (val & 0x80)
          val |= 0xffffff00;
@@ -84,7 +84,7 @@ isonum_733 (char * p)
      return (isonum_731 (p));
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 8
index 77dd84fbccf610570120d83d1042d93f46875b6c..853696cea0fc9bacf0363de93727c258c86cafa3 100644 (file)
@@ -2,9 +2,9 @@
  *  md5.c - an implementation of the MD5 algorithm and MD5 crypt
  *
  *  Copyright (C) 2001, 2002 Ethan Benson
- * 
+ *
  *  Adapted from GRUB
- * 
+ *
  *  Copyright (C) 2000  Free Software Foundation, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -62,7 +62,7 @@ typedef unsigned int UINT4;
 
 static UINT4 initstate[4] =
 {
-  0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 
+  0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476
 };
 
 static char s1[4] = {  7, 12, 17, 22 };
@@ -160,13 +160,13 @@ md5_update (const char *input, int inputlen)
 {
   int buflen = length & 63;
   length += inputlen;
-  if (buflen + inputlen < 64) 
+  if (buflen + inputlen < 64)
     {
       memcpy (buffer + buflen, input, inputlen);
       buflen += inputlen;
       return;
     }
-  
+
   memcpy (buffer + buflen, input, 64 - buflen);
   md5_transform (buffer);
   input += 64 - buflen;
@@ -194,7 +194,7 @@ md5_final()
       memset (buffer, 0, 64);
       buflen = 0;
     }
-  
+
   *(UINT4 *) (buffer + 56) = cpu_to_le32 (8 * length);
   *(UINT4 *) (buffer + 60) = 0;
   md5_transform (buffer);
@@ -215,7 +215,7 @@ md5_password (const char *key, char *crypted, int check)
 {
   int keylen = strlen (key);
   char *salt = crypted + 3; /* skip $1$ header */
-  char *p; 
+  char *p;
   int saltlen;
   int i, n;
   unsigned char alt_result[16];
@@ -233,14 +233,14 @@ md5_password (const char *key, char *crypted, int check)
 
       salt[saltlen] = '$';
     }
-  
+
   md5_init ();
   md5_update (key, keylen);
   md5_update (salt, saltlen);
   md5_update (key, keylen);
   digest = md5_final ();
   memcpy (alt_result, digest, 16);
-  
+
   memcpy ((char *) state, (char *) initstate, sizeof (initstate));
   length = 0;
   md5_update (key, keylen);
@@ -263,7 +263,7 @@ md5_password (const char *key, char *crypted, int check)
        md5_update (key, keylen);
       else
        md5_update (alt_result, 16);
-      
+
       if (i % 3 != 0)
        md5_update (salt, saltlen);
 
@@ -280,7 +280,7 @@ md5_password (const char *key, char *crypted, int check)
   p = salt + saltlen + 1;
   for (i = 0; i < 5; i++)
     {
-      unsigned int w = 
+      unsigned int w =
        digest[i == 4 ? 5 : 12+i] | (digest[6+i] << 8) | (digest[i] << 16);
       for (n = 4; n-- > 0;)
        {
@@ -293,7 +293,7 @@ md5_password (const char *key, char *crypted, int check)
            {
              *p++ = b64t[w & 0x3f];
            }
-         
+
          w >>= 6;
        }
     }
@@ -310,21 +310,21 @@ md5_password (const char *key, char *crypted, int check)
          {
            *p++ = b64t[w & 0x3f];
          }
-       
+
        w >>= 6;
       }
   }
 
   if (! check)
     *p = '\0';
-  
+
   return *p;
 }
 #endif
 
 #ifdef TEST
 static char *
-md5 (const char *input) 
+md5 (const char *input)
 {
   memcpy ((char *) state, (char *) initstate, sizeof (initstate));
   length = 0;
@@ -333,7 +333,7 @@ md5 (const char *input)
 }
 
 static void
-test (char *buffer, char *expected) 
+test (char *buffer, char *expected)
 {
   char result[16 * 3 +1];
   unsigned char* digest = md5 (buffer);
index 05823092614e1b9011fe4e2d88d26f69ebe32e40..12942a94cf6b4aacf1b240f3d55d58c4d1de643a 100644 (file)
@@ -56,7 +56,7 @@ static const char *valid_mac_partition_types[] = {
      NULL
 };
 #endif
-    
+
 
 /* Local functions */
 static unsigned long swab32(unsigned long value);
@@ -71,7 +71,7 @@ add_new_partition(struct partition_t**        list, int part_number, const char *part_t
 {
      struct partition_t*       part;
      part = (struct partition_t*)malloc(sizeof(struct partition_t));
-       
+
      part->part_number = part_number;
      strncpy(part->part_type, part_type, MAX_PART_NAME);
      strncpy(part->part_name, part_name, MAX_PART_NAME);
@@ -99,7 +99,7 @@ partition_mac_lookup( const char *dev_name, prom_handle disk,
      struct mac_partition* part = (struct mac_partition *)block_buffer;
      unsigned short ptable_block_size =
          ((struct mac_driver_desc *)block_buffer)->block_size;
-       
+
      map_size = 1;
      for (block=1; block < map_size + 1; block++)
      {
@@ -119,9 +119,9 @@ partition_mac_lookup( const char *dev_name, prom_handle disk,
          }
          if (block == 1)
               map_size = part->map_count;
-               
+
 #ifdef CHECK_FOR_VALID_MAC_PARTITION_TYPE
-         /* We don't bother looking at swap partitions of any type, 
+         /* We don't bother looking at swap partitions of any type,
           * and the rest are the ones we know about */
          for (ptype = valid_mac_partition_types; ptype; ptype++)
               if (!strcmp (part->type, ptype))
@@ -155,7 +155,7 @@ partition_mac_lookup( const char *dev_name, prom_handle disk,
      }
 }
 
-/* 
+/*
  * Same function as partition_mac_lookup(), except for fdisk
  * partitioned disks.
  */
@@ -168,7 +168,7 @@ partition_fdisk_lookup( const char *dev_name, prom_handle disk,
      /* fdisk partition tables start at offset 0x1be
       * from byte 0 of the boot drive.
       */
-     struct fdisk_partition* part = 
+     struct fdisk_partition* part =
          (struct fdisk_partition *) (block_buffer + 0x1be);
 
      for (partition=1; partition <= 4 ;partition++, part++) {
@@ -203,11 +203,11 @@ identify_iso_fs(ihandle device, unsigned int *iso_root_block)
               prom_printf("Can't read volume desc block %d\n", block);
               break;
          }
-               
+
          vdp = (struct iso_volume_descriptor *)block_buffer;
-           
-         /* Due to the overlapping physical location of the descriptors, 
-          * ISO CDs can match hdp->id==HS_STANDARD_ID as well. To ensure 
+
+         /* Due to the overlapping physical location of the descriptors,
+          * ISO CDs can match hdp->id==HS_STANDARD_ID as well. To ensure
           * proper identification in this case, we first check for ISO.
           */
          if (strncmp (vdp->id, ISO_STANDARD_ID, sizeof vdp->id) == 0) {
@@ -215,11 +215,11 @@ identify_iso_fs(ihandle device, unsigned int *iso_root_block)
               return 1;
          }
      }
-       
+
      return 0;
 }
 
-/* 
+/*
  * Detects and read amiga partition tables.
  */
 
@@ -251,7 +251,7 @@ _amiga_find_rdb (const char *dev_name, prom_handle disk, unsigned int prom_blksi
                        if (prom_readblocks(disk, i, 1, block_buffer) != 1) {
                                prom_printf("Can't read boot block %d\n", i);
                                break;
-                       }       
+                       }
                }
                if ((amiga_block[AMIGA_ID] == AMIGA_ID_RDB) && (_amiga_checksum (prom_blksize) == 0))
                        return 1;
@@ -260,7 +260,7 @@ _amiga_find_rdb (const char *dev_name, prom_handle disk, unsigned int prom_blksi
        if (prom_readblocks(disk, 0, 1, block_buffer) != 1) {
                prom_printf("Can't read boot blocks\n");
                return 0; /* TODO: something bad happened, should fail more verbosely */
-       }       
+       }
        return 0;
 }
 
@@ -295,7 +295,7 @@ partition_amiga_lookup( const char *dev_name, prom_handle disk,
                if (prom_readblocks(disk, part, 1, block_buffer) != 1) {
                        prom_printf("Can't read partition block %d\n", part);
                        break;
-               }       
+               }
                checksum = _amiga_checksum (prom_blksize);
                if ((amiga_block[AMIGA_ID] == AMIGA_ID_PART) &&
                        (checksum == 0) &&
@@ -326,7 +326,7 @@ partition_amiga_lookup( const char *dev_name, prom_handle disk,
                    prom_blksize,
                    0 );
        }
-       if (used) 
+       if (used)
                free(used);
 }
 
@@ -337,10 +337,10 @@ partitions_lookup(const char *device)
      struct mac_driver_desc *desc = (struct mac_driver_desc *)block_buffer;
      struct partition_t* list = NULL;
      unsigned int prom_blksize, iso_root_block;
-       
+
      strncpy(block_buffer, device, 2040);
      strcat(block_buffer, ":0");
-       
+
      /* Open device */
      disk = prom_open(block_buffer);
      if (disk == NULL) {
@@ -356,12 +356,12 @@ partitions_lookup(const char *device)
          prom_printf("block_size %d not supported !\n", prom_blksize);
          goto bail;
      }
-       
+
      /* Read boot blocs */
      if (prom_readblocks(disk, 0, 1, block_buffer) != 1) {
          prom_printf("Can't read boot blocks\n");
          goto bail;
-     } 
+     }
      if (desc->signature == MAC_DRIVER_MAGIC) {
          /* pdisk partition format */
          partition_mac_lookup(device, disk, prom_blksize, &list);
@@ -388,7 +388,7 @@ partitions_lookup(const char *device)
 
 bail:
      prom_close(disk);
-       
+
      return list;
 }
 
@@ -415,7 +415,7 @@ get_part_type(char *device, int partition)
          if ((partition >= 0) && (partition == p->part_number)) {
               type = strdup(p->part_type);
               break;
-         }       
+         }
      }
      if (parts)
          partitions_free(parts);
@@ -427,7 +427,7 @@ void
 partitions_free(struct partition_t* list)
 {
      struct partition_t*       next;
-       
+
      while(list) {
          next = list->next;
          free(list);
@@ -448,7 +448,7 @@ swab32(unsigned long value)
 }
 
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 25811ea30d146fb30aadff54c2acd0876c780021..5ec06b88e7e1426b33e5a04050e4e4c3c607cea3 100644 (file)
@@ -58,7 +58,7 @@ call_prom (const char *service, int nargs, int nret, ...)
      va_list list;
      int i;
      struct prom_args prom_args;
-  
+
      prom_args.service = service;
      prom_args.nargs = nargs;
      prom_args.nret = nret;
@@ -82,7 +82,7 @@ call_prom_return (const char *service, int nargs, int nret, ...)
      int i;
      void* result;
      struct prom_args prom_args;
-  
+
      prom_args.service = service;
      prom_args.nargs = nargs;
      prom_args.nret = nret;
@@ -111,7 +111,7 @@ call_method_1 (char *method, prom_handle h, int nargs, ...)
      va_list list;
      int i;
      struct prom_args prom_args;
-  
+
      prom_args.service = "call-method";
      prom_args.nargs = nargs+2;
      prom_args.nret = 2;
@@ -123,7 +123,7 @@ call_method_1 (char *method, prom_handle h, int nargs, ...)
      va_end(list);
      prom_args.args[2+nargs] = 0;
      prom_args.args[2+nargs+1] = 0;
-  
+
      prom (&prom_args);
 
      if (prom_args.args[2+nargs] != 0)
@@ -221,11 +221,11 @@ prom_init (prom_entry pp)
      /* Add a few OF methods (thanks Darwin) */
 #if DEBUG
      prom_printf ("Adding OF methods...\n");
-#endif  
+#endif
 
      prom_interpret (
          /* All values in this forth code are in hex */
-         "hex "        
+         "hex "
          /* Those are a few utilities ripped from Apple */
          ": D2NIP decode-int nip nip ;\r"      // A useful function to save space
          ": GPP$ get-package-property 0= ;\r"  // Another useful function to save space
@@ -278,7 +278,7 @@ prom_read (prom_handle file, void *buf, int n)
 {
      int result = 0;
      int retries = 10;
-  
+
      if (n == 0)
          return 0;
      while(--retries) {
@@ -287,7 +287,7 @@ prom_read (prom_handle file, void *buf, int n)
               break;
          call_prom("interpret", 1, 1, " 10 ms");
      }
-  
+
      return result;
 }
 
@@ -330,7 +330,7 @@ prom_readblocks (prom_handle dev, int blockNum, int blockCount, void *buffer)
 #if READ_BLOCKS_USE_READ
      int status;
      unsigned int blksize;
-  
+
      blksize = prom_getblksize(dev);
      if (blksize <= 1)
          blksize = 512;
@@ -339,16 +339,16 @@ prom_readblocks (prom_handle dev, int blockNum, int blockCount, void *buffer)
          return 0;
          prom_printf("Can't seek to 0x%x\n", blockNum * blksize);
      }
-       
+
      status = prom_read(dev, buffer, blockCount * blksize);
 //  prom_printf("prom_readblocks, bl: %d, cnt: %d, status: %d\n",
 //     blockNum, blockCount, status);
 
      return status == (blockCount * blksize);
-#else 
+#else
      int result;
      int retries = 10;
-  
+
      if (blockCount == 0)
          return blockCount;
      while(--retries) {
@@ -357,9 +357,9 @@ prom_readblocks (prom_handle dev, int blockNum, int blockCount, void *buffer)
               break;
          call_prom("interpret", 1, 1, " 10 ms");
      }
-  
+
      return result;
-#endif  
+#endif
 }
 
 int
@@ -399,20 +399,20 @@ prom_puts (prom_handle file, char *s)
 {
      const char *p, *q;
 
-     for (p = s; *p != 0; p = q) 
+     for (p = s; *p != 0; p = q)
      {
          for (q = p; *q != 0 && *q != '\n'; ++q)
               ;
          if (q > p)
               call_prom ("write", 3, 1, file, p, q - p);
-         if (*q != 0) 
+         if (*q != 0)
          {
               ++q;
               call_prom ("write", 3, 1, file, "\r\n", 2);
          }
      }
 }
+
 void
 prom_vfprintf (prom_handle file, char *fmt, va_list ap)
 {
@@ -459,7 +459,7 @@ prom_perror (int error, char *filename)
      else if (error == FILE_IOERR)
          prom_printf("%s: Input/output error\n", filename);
      else if (error == FILE_BAD_PATH)
-         prom_printf("%s: Path too long\n", filename); 
+         prom_printf("%s: Path too long\n", filename);
      else if (error == FILE_ERR_BAD_TYPE)
          prom_printf("%s: Not a regular file\n", filename);
      else if (error == FILE_ERR_NOTDIR)
@@ -570,7 +570,7 @@ prom_release(void *virt, unsigned int size)
                "2dup \" unmap\" ^mmu "                 // Unmap the space first
                "2dup \" release\" ^mmu "               // Then free the virtual pages
                "\" release\" ^mem "                    // Then free the physical pages
-               ,size, virt 
+               ,size, virt
          );
 #endif /* bullshit */
 }
@@ -631,7 +631,7 @@ prom_pause(void)
      call_prom("enter", 0, 0);
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index fd5dee3c5399e818f9469ec5540aa79e2af0ce53..d7a3a20f1c0b0fccca199f4895e983e4d1dbca5e 100644 (file)
@@ -1,25 +1,25 @@
 /*
- *  Yaboot - secondary boot loader for Linux on PowerPC. 
+ *  Yaboot - secondary boot loader for Linux on PowerPC.
  *
  *  Copyright (C) 2001, 2002 Ethan Benson
  *
  *  Copyright (C) 1999, 2000, 2001 Benjamin Herrenschmidt
- *  
+ *
  *  IBM CHRP support
- *  
+ *
  *  Copyright (C) 2001 Peter Bergner
  *
  *  portions based on poof
- *  
+ *
  *  Copyright (C) 1999 Marius Vollmer
- *  
+ *
  *  portions based on quik
- *  
+ *
  *  Copyright (C) 1996 Paul Mackerras.
- *  
+ *
  *  Because this program is derived from the corresponding file in the
  *  silo-0.64 distribution, it is also
- *  
+ *
  *  Copyright (C) 1996 Pete A. Zaitcev
  *                1996 Maurizio Plaza
  *                1996 David S. Miller
@@ -180,7 +180,7 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5)
 
      /* OF seems to do it, but I'm not very confident */
      memset(&__bss_start, 0, &_end - &__bss_start);
-       
+
      /* Check for quik first stage bootloader (but I don't think we are
       * compatible with it anyway, I'll look into backporting to older OF
       * versions later
@@ -192,7 +192,7 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5)
 
      /* Initialize OF interface */
      prom_init ((prom_entry) r5);
-       
+
      /* Allocate some memory for malloc'ator */
      malloc_base = prom_claim((void *)MALLOCADDR, MALLOCSIZE, 0);
      if (malloc_base == (void *)-1) {
@@ -203,7 +203,7 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5)
      malloc_init(malloc_base, MALLOCSIZE);
      DEBUG_F("Malloc buffer allocated at %p (%d bytes)\n",
             malloc_base, MALLOCSIZE);
-               
+
      /* A few useless DEBUG_F's */
      DEBUG_F("reloc_offset :  %ld         (should be 0)\n", reloc_offset());
      DEBUG_F("test_bss     :  %d         (should be 0)\n", test_bss);
@@ -226,7 +226,7 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5)
                    _machine = _MACH_chrp;
          }
      }
-       
+
      DEBUG_F("Running on _machine = %d\n", _machine);
      DEBUG_SLEEP;
 
@@ -241,9 +241,9 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5)
 
      /* Return to OF */
      prom_exit();
-       
+
      return result;
-       
+
 }
 
 #ifdef CONFIG_COLOR_TEXT
@@ -260,13 +260,13 @@ check_color_text_ui(char *color)
          i++;
      }
      return -1;
-}      
+}
 #endif /* CONFIG_COLOR_TEXT */
 
 
 void print_message_file(char *filename)
 {
-     char *msg = NULL; 
+     char *msg = NULL;
      char *p, *endp;
      char *defdev = boot.dev;
      int defpart = boot.part;
@@ -284,7 +284,7 @@ void print_message_file(char *filename)
          if (p) {
               n = simple_strtol(p, &endp, 10);
               if (endp != p && *endp == 0)
-                   defpart = n;               
+                   defpart = n;
          }
 
      strncpy(msgpath, filename, sizeof(msgpath));
@@ -388,7 +388,7 @@ load_config_file(char *device, char* path, int partition)
          prom_interpret(p);
 
      password = cfg_get_strg(0, "password");
-       
+
 #ifdef CONFIG_COLOR_TEXT
      p = cfg_get_strg(0, "fgcolor");
      if (p) {
@@ -407,19 +407,19 @@ load_config_file(char *device, char* path, int partition)
      }
      if (bgcolor >= 0) {
          char temp[64];
-         sprintf(temp, "%x to background-color", bgcolor); 
-         prom_interpret(temp); 
+         sprintf(temp, "%x to background-color", bgcolor);
+         prom_interpret(temp);
 #if !DEBUG
          prom_printf("\xc");
 #endif /* !DEBUG */
      }
      if (fgcolor >= 0) {
          char temp[64];
-         sprintf(temp, "%x to foreground-color", fgcolor); 
-         prom_interpret(temp); 
+         sprintf(temp, "%x to foreground-color", fgcolor);
+         prom_interpret(temp);
      }
 #endif /* CONFIG_COLOR_TEXT */
-   
+
      p = cfg_get_strg(0, "init-message");
      if (p)
          prom_printf("%s\n", p);
@@ -429,15 +429,15 @@ load_config_file(char *device, char* path, int partition)
          print_message_file(p);
 
      result = 1;
-    
+
 bail:
 
      if (opened)
          file.fs->close(&file);
-    
+
      if (conf_file)
          free(conf_file);
-       
+
      return result;
 }
 
@@ -559,7 +559,7 @@ void check_password(char *str)
          if (!strncmp (password, "$1$", 3)) {
               if (!check_md5_password(passwdbuff, password))
                    return;
-         } 
+         }
          else if (!strcmp (password, passwdbuff))
               return;
 #else /* !MD5 */
@@ -602,7 +602,7 @@ int get_params(struct boot_param_t* params)
      params->rd.part = -1;
      params->sysmap.part = -1;
      defpart = boot.part;
-    
+
      cmdinit();
 
      if (first) {
@@ -747,7 +747,7 @@ int get_params(struct boot_param_t* params)
               check_password ("Restricted command.");
               return 1;
          }
-         return 1; 
+         return 1;
      }
 
      if (imagename[0] == '$') {
@@ -819,7 +819,7 @@ yaboot_text_ui(void)
      loadinfo_t          loadinfo;
      void                *initrd_more,*initrd_want;
      unsigned long       initrd_read;
-    
+
      loadinfo.load_loc = 0;
 
      for (;;) {
@@ -827,12 +827,12 @@ yaboot_text_ui(void)
          initrd_base = 0;
          sysmap_base = 0;
          sysmap_size = 0;
-       
+
          if (get_params(&params))
               return;
          if (!params.kernel.file)
               continue;
-       
+
          prom_printf("Please wait, loading kernel...\n");
 
          memset(&file, 0, sizeof(file));
@@ -906,7 +906,7 @@ yaboot_text_ui(void)
                    free(params.sysmap.file);
                    params.sysmap.file=loc;
               }
-            
+
               result = open_file(&params.sysmap, &file);
               if (result != FILE_ERR_OK) {
                    prom_printf("%s:%d,", params.sysmap.dev, params.sysmap.part);
@@ -1007,7 +1007,7 @@ yaboot_text_ui(void)
          DEBUG_F(" done\n");
 
          if (flat_vmlinux) {
-              /* 
+              /*
                * Fill new boot infos (only if booting a vmlinux).
                *
                * The birec is low on memory, probably inside the malloc pool,
@@ -1027,12 +1027,12 @@ yaboot_text_ui(void)
               birec->tag = BI_FIRST;
               birec->size = sizeof(struct bi_record);
               birec = (struct bi_record *)((ulong)birec + birec->size);
-       
+
               birec->tag = BI_BOOTLOADER_ID;
               sprintf( (char *)birec->data, "yaboot");
               birec->size = sizeof(struct bi_record) + strlen("yaboot") + 1;
               birec = (struct bi_record *)((ulong)birec + birec->size);
-       
+
               birec->tag = BI_MACHTYPE;
               birec->data[0] = _machine;
               birec->size = sizeof(struct bi_record) + sizeof(ulong);
@@ -1176,7 +1176,7 @@ load_elf32(struct boot_file_t *file, loadinfo_t *loadinfo)
      if (loadinfo->base == (void *)-1) {
          prom_printf("Claim error, can't allocate kernel memory\n");
          goto bail;
-     } 
+     }
 
      DEBUG_F("After ELF parsing, load base: %p, mem_sz: 0x%08lx\n",
             loadinfo->base, loadinfo->memsize);
@@ -1205,7 +1205,7 @@ load_elf32(struct boot_file_t *file, loadinfo_t *loadinfo)
      }
 
      free(ph);
-    
+
      /* Return success at loading the Elf32 kernel */
      return 1;
 
@@ -1320,7 +1320,7 @@ load_elf64(struct boot_file_t *file, loadinfo_t *loadinfo)
      if (loadinfo->base == (void *)-1) {
          prom_printf("Claim error, can't allocate kernel memory\n");
          goto bail;
-     } 
+     }
 
      DEBUG_F("After ELF parsing, load base: %p, mem_sz: 0x%08lx\n",
             loadinfo->base, loadinfo->memsize);
@@ -1349,7 +1349,7 @@ load_elf64(struct boot_file_t *file, loadinfo_t *loadinfo)
      }
 
      free(ph);
-    
+
      /* Return success at loading the Elf64 kernel */
      return 1;
 
@@ -1433,7 +1433,7 @@ setup_display(void)
               DEBUG_F("Open screen result: %p\n", scrn);
          }
      }
-       
+
      if (scrn == PROM_INVALID_HANDLE) {
          prom_printf("No screen device found !/n");
          return;
@@ -1442,7 +1442,7 @@ setup_display(void)
          prom_set_color(scrn, i, default_colors[i*3],
                         default_colors[i*3+1], default_colors[i*3+2]);
      }
-     prom_printf("\x1b[1;37m\x1b[2;40m");      
+     prom_printf("\x1b[1;37m\x1b[2;40m");
 #ifdef COLOR_TEST
      for (i=0;i<16; i++) {
          prom_printf("\x1b[%d;%dm\x1b[1;47m%s \x1b[2;40m %s\n",
@@ -1456,7 +1456,7 @@ setup_display(void)
                      ansi_color_table[i].name,
                      ansi_color_table[i].name);
      }
-     prom_printf("\x1b[1;37m\x1b[2;40m");      
+     prom_printf("\x1b[1;37m\x1b[2;40m");
 #endif /* COLOR_TEST */
 
 #if !DEBUG
@@ -1473,7 +1473,7 @@ yaboot_main(void)
 
      if (_machine == _MACH_Pmac)
          setup_display();
-       
+
      prom_get_chosen("bootpath", bootdevice, sizeof(bootdevice));
      DEBUG_F("/chosen/bootpath = %s\n", bootdevice);
      if (bootdevice[0] == 0) {
@@ -1544,7 +1544,7 @@ yaboot_main(void)
      return 0;
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index 741bf8a0b76cef0b5e579bd44ad6d5167e9e17f4..351c4fc5aa94a775f7e2535cabdc9c5911a80b47 100644 (file)
@@ -212,7 +212,7 @@ nospace:
      exit(1);
 }
 
-/* 
+/*
  * Local variables:
  * c-file-style: "k&r"
  * c-basic-offset: 5
index db9957c72b41c8df563b3a4d189fa6a584ab72fc..f2d55ca0060a7f4dd4a44dd315b7405f9a32c2d1 100755 (executable)
@@ -8,7 +8,7 @@
 ## Portions based on show_of_path.sh:
 ##
 ## Copyright (C) 2000 Olaf Hering <olh@suse.de>
-## 
+##
 ## This program is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU General Public License
 ## as published by the Free Software Foundation; either version 2
@@ -116,11 +116,11 @@ linecount()
 ## small tr replacment which handles a specific need of this script.
 smalltr()
 {
-    case "$1" in 
+    case "$1" in
        a) echo 1 ;; b) echo 2 ;; c) echo 3 ;; d) echo 4 ;; e) echo 5 ;; f) echo 6 ;;
        g) echo 7 ;; h) echo 8 ;; i) echo 9 ;; j) echo 10 ;; k) echo 11 ;; l) echo 12 ;;
        m) echo 13 ;; n) echo 14 ;; o) echo 15 ;; p) echo 16 ;;
-       1) echo a ;; 2) echo b ;; 3) echo c ;; 4) echo d ;; 5) echo e ;; 
+       1) echo a ;; 2) echo b ;; 3) echo c ;; 4) echo d ;; 5) echo e ;;
        6) echo f ;; 7) echo g ;; 8) echo h ;; 9) echo i ;; 10) echo j ;;
        11) echo k ;; 12) echo l ;; 13) echo m ;; 14) echo n ;; 15) echo o ;;
        16) echo p ;;
@@ -429,7 +429,7 @@ newworld()
            scsiinfo || return 1
 
            ## now we have the data for /@$DEVID:$PARTITION
-           ## find the actual OF path. 
+           ## find the actual OF path.
            scsi_ofpath || return 1
            ;;
        hd*)
@@ -670,7 +670,7 @@ chrp()
            scsiinfo || return 1
 
            ## now we have the data for /@$DEVID:$PARTITION
-           ## find the actual OF path. 
+           ## find the actual OF path.
            scsi_ofpath || return 1
            ;;
        *)
index 45914f82bf1a902a39ae46c11a2d347ad75105d8..1c5f4a33bc0c4a95ae95e0900d5615a243146303 100755 (executable)
@@ -69,7 +69,7 @@ fi
 
 ## make fake `id' if its missing, outputs 0 since if its missing we
 ## are probably running on boot floppies and thus are root.
-if (command -v id > /dev/null 2>&1) ; then 
+if (command -v id > /dev/null 2>&1) ; then
     true
 else
     id()
@@ -270,7 +270,7 @@ cleanup()
 
 if [ $# != 0 ] ; then
     while true ; do
-        case "$1" in 
+        case "$1" in
             -V|--version)
                 version
                 exit 0
@@ -694,7 +694,7 @@ if [ "$(v=`cat /proc/cpuinfo 2>/dev/null | grep pmac-generation` ; echo ${v##*:}
        echo 1>&2 "$PRG: yaboot is not installed correctly"
        exit 1
     fi
-fi    
+fi
 
 ## check for properly (read debian) packaged yaboot.
 if [ -d ${CHROOT}usr/share/doc/yaboot/examples ] ; then
@@ -725,7 +725,7 @@ GLOBAL="## yaboot.conf generated by $PRG $VERSION
 ##
 ## run: \"man yaboot.conf\" for details. Do not make changes until you have!!
 ${HEADER}##
-## For a dual-boot menu, add one or more of: 
+## For a dual-boot menu, add one or more of:
 ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ\n
 boot=${BOOT}${DEVICE:-}
 partition=$PARTITION
index a3d94d1a83434cbb6808a3cbe8865e77fffddfc7..210711fbc5954c277854e45156cb5b57c2671772 100755 (executable)
--- a/ybin/ybin
+++ b/ybin/ybin
@@ -63,7 +63,7 @@ fi
 ## define default configuration
 boot=unconfigured
 
-## allow default to work on packaged and non-packaged yaboot. 
+## allow default to work on packaged and non-packaged yaboot.
 ## no default for magicboot since it is not required everywhere.
 if [ -f /usr/local/lib/yaboot/yaboot ] ; then
     install=/usr/local/lib/yaboot/yaboot
@@ -124,7 +124,7 @@ fi
 
 ## make fake `id' if its missing, outputs 0 since if its missing we
 ## are probably running on boot floppies and thus are root.
-if (command -v id > /dev/null 2>&1) ; then 
+if (command -v id > /dev/null 2>&1) ; then
     true
 else
     id()
@@ -300,7 +300,7 @@ checkconf()
            fi
            local CONFERR=1
        fi
-       
+
        if [ `echo ${#hfscreator}` != 4 ] ; then
            if [ "$ARGCT" = 1 ] ; then
                echo 1>&2 "$PRG: --creator must be 4 characters"
@@ -386,7 +386,7 @@ checkconf()
        fi
 
        ## convert defaultos variable
-       case "$defaultos" in 
+       case "$defaultos" in
            linux|Linux|GNU|Gnu|gnu)
                defaultos=bootyaboot
                ;;
@@ -728,7 +728,7 @@ checkhfsutils()
 
 ## This is gross, IBM CHRP OF needs a .note added to the yaboot
 ## binary, nobody knows whether this note will affect PowerMac OF or
-## not (or could in the future). 
+## not (or could in the future).
 hack_yaboot()
 {
     local YBDIR="${install%/*}"
@@ -790,7 +790,7 @@ util_install()
 
     ## repoint magicboot as the real first stage loader if using the
     ## modern automatic generating ofboot.b.
-    if [ -n "$FIRST" ] ; then  
+    if [ -n "$FIRST" ] ; then
        magicboot="$FIRST"
        [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: set magicboot to $FIRST"
     fi
@@ -804,7 +804,7 @@ util_install()
        if [ "$protect" = yes ] ; then
            local LOCK="+l"
        fi
-       
+
        if [ "$hide" = yes ] ; then
            local INVISIBLE="+i"
        fi
@@ -1008,7 +1008,7 @@ umnt()
 mnt_install()
 {
     local BTFILE=yaboot
-  
+
     ## msdosfs is broken, yaboot may not support this filename.
     if [ "$fstype" = msdos ] ; then
        local CFFILE=yaboot.cnf
@@ -1122,7 +1122,7 @@ mnt_install()
 }
 
 ## raw installation, for IBM RS/6000 hardware, yaboot is dded to the
-## bootstrap partition. 
+## bootstrap partition.
 raw_install()
 {
     ## make sure the device is not mounted as a filesystem before
@@ -1244,7 +1244,7 @@ mkoffs()
            [ "$VERBOSE" = 1 ] && echo "$PRG: Creating DOS filesystem on $boot..."
             if (command -v dd > /dev/null 2>&1) ; then
                 dd if=/dev/zero of="$boot" bs=512 count=1600 > /dev/null 2>&1
-            fi  
+            fi
            mkdosfs -n bootstrap "$boot" > /dev/null
             if [ $? != 0 ] ; then
                echo 1>&2 "$PRG: DOS filesystem creation failed!"
@@ -1326,7 +1326,7 @@ cleanup()
 ## absurdly bloated case statement to parse command line options.
 if [ $# != 0 ] ; then
     while true ; do
-       case "$1" in 
+       case "$1" in
            -V|--version)
                version
                exit 0