[OpenBIOS] [PATCH] Fix fs->vol_name handling
Stefan Assmann
sassmann at suse.de
Thu Jan 29 11:39:59 CET 2009
Subject: Fix fs->vol_name handling
This patch checks wether fs->vol_name exists and handles the
case where it doesn't exist. That fixes the lockup that occurs
when trying to run qemu-system-ppc -cdrom <iso> -boot d
Signed-off-by: Stefan Assmann <sassmann at suse.de>
Index: modules/filesystems.c
===================================================================
--- modules/filesystems.c (revision 418)
+++ modules/filesystems.c (working copy)
@@ -145,8 +145,12 @@
if( !mi->volname )
mi->volname = malloc( VOLNAME_SIZE );
-
- ret = mi->fs->vol_name( mi->fs, mi->volname, VOLNAME_SIZE );
+ /* handle case where there is no vol_name function in fs */
+ if( !mi->fs->vol_name ) {
+ mi->volname[0] = '\0';
+ ret = mi->volname;
+ } else
+ ret = mi->fs->vol_name( mi->fs, mi->volname, VOLNAME_SIZE );
PUSH( (ucell)ret );
}
Stefan
--
Stefan Assmann | SUSE LINUX Products GmbH
Software Engineer | Maxfeldstr. 5, D-90409 Nuernberg
Mail: sassmann at suse.de | GF: Markus Rex, HRB 16746 (AG Nuernberg)
More information about the OpenBIOS
mailing list