Commit Graph

12 Commits

Author SHA1 Message Date
Blue Swirl
7d13c41dad Add checks for open_ih() return value
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@842 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-08 18:50:22 +00:00
Blue Swirl
482249e794 Use standard types
Replace uchar, uint, ulong, u_char, u_int, u_long, u_int* with
their standard equivalents.

Fixes warnings like these on OpenBSD:
 CC    target/arch/unix/unix.o
In file included from ../arch/unix/unix.c:29:
../include/config.h:26: warning: redefinition of `ulong'
/usr/include/sys/types.h:56: warning: `ulong' previously declared here
../include/config.h:26: warning: redundant redeclaration of `ulong' in same scope

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@830 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 21:25:08 +00:00
Mark Cave-Ayland
a5511ad95c Currently the dir word works by using /packages/misc-files to open a directory in a similar way to a file and then
special-casing directory actions. This is wrong in that in order to list the contents of a directory, open-dev must return true 
for any device which contains a valid filesystem, regardless of whether or not the supplied arguments reference a valid path.

This causes us a problem because in order to implement multiple references in boot-device correctly, we have to fail if we open 
a specific device with invalid arguments (such as a non-existent file reference). This patch therefore makes the following changes:

1) Create a static method in each of the filesystem packages to implement dir
2) Enhance the partition/disk handlers to record the phandle of any detected filesystem during open
3) Create a new dir method in the partition/disk handlers which invokes the static dir method for the currently detected 
filesystem

Hence we can now open a raw device/partition and invoke dir on its filesystem without having to open a specific file-reference 
first. Following shortly is a patch to switch the main dir word over to use this new system.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@816 f158a5a8-5612-0410-a976-696ce0be7e32
2010-07-10 13:11:22 +00:00
Mark Cave-Ayland
40ed0faad9 Move the ext2 filesystem handler into its own new package /packages/ext2-files.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@813 f158a5a8-5612-0410-a976-696ce0be7e32
2010-07-04 10:18:03 +00:00
Mark Cave-Ayland
add30adb7d ext2 magic is stored in little-endian format, not big-endian format.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@797 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-23 21:02:12 +00:00
Mark Cave-Ayland
0dddb61de8 Fix up non-grub iso9660 filesystem, plus correct a thinko where the sense of the existing hfs/ext2 probe functions was inverted
by default.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@796 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-23 20:41:34 +00:00
Mark Cave-Ayland
372ad163dc Fix up the majority of the non-grubfs filesystems from my last commit, since they require a "probe with offset" function to
allow the partition handler to identify a valid FS before interposition to /packages/misc-files.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@792 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-09 22:30:32 +00:00
Mark Cave-Ayland
1dbe55b8e4 Move the basic OpenBIOS configuration header files from include/openbios to include/.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@695 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 17:19:58 +00:00
Mark Cave-Ayland
4a2c065e4f Move the libopenbios header files into include/libopenbios to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@691 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 15:05:53 +00:00
Mark Cave-Ayland
9a1c40734c Move the fs header file into include/fs to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@690 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 14:33:32 +00:00
Laurent Vivier
62e794e351 Implements dir method for ext2 filesystem.
0 > dir hd:3,\ 
      4096 2009-08-05 22:20:53 .\
      4096 2009-08-05 22:20:53 ..\
     16384 2009-02-20 10:56:01 lost+found\
      4096 2009-02-20 10:56:59 boot\
      4096 2009-11-10 21:44:03 etc\
      4096 2009-02-20 10:57:14 media\
        11 2009-02-20 10:57:14 cdrom
      4096 2007-03-07 23:22:28 selinux\
      4096 2009-02-20 11:12:18 var\
      4096 2009-02-20 11:12:19 usr\
      4096 2008-05-21 08:44:38 sys\
     12288 2009-08-05 22:30:50 lib\
      4096 2009-08-05 22:31:05 sbin\
      4096 2009-02-20 13:00:26 bin\
     40960 2009-02-20 14:32:18 dev\
      4096 2009-02-20 14:30:57 home\
      4096 2006-10-28 13:49:35 mnt\
      4096 2006-10-28 13:49:35 proc\
      4096 2009-05-18 12:40:32 root\
      4096 2009-11-10 21:44:15 tmp\
      4096 2009-02-20 12:30:21 lib64\
      4096 2009-02-20 11:12:17 srv\
      4096 2009-02-20 11:12:18 opt\
      4096 2009-02-20 11:12:18 initrd\
   5349268 2009-02-20 11:51:46 initrd.img-2.6.18-6-powerpc
   4405754 2008-12-13 09:58:03 vmlinux-2.6.18-6-powerpc

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@632 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 10:07:23 +00:00
Laurent Vivier
26c129730b Add cleaner ext2 filesystem implementation
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@627 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 09:47:08 +00:00