[OpenBIOS] r430 - openbios-devel/modules

svn at openbios.org svn at openbios.org
Thu Jan 29 20:56:41 CET 2009


Author: blueswirl
Date: 2009-01-29 20:56:41 +0100 (Thu, 29 Jan 2009)
New Revision: 430

Modified:
   openbios-devel/modules/filesystems.c
Log:
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>


Modified: openbios-devel/modules/filesystems.c
===================================================================
--- openbios-devel/modules/filesystems.c	2009-01-29 10:51:25 UTC (rev 429)
+++ openbios-devel/modules/filesystems.c	2009-01-29 19:56:41 UTC (rev 430)
@@ -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 );
 }
 




More information about the OpenBIOS mailing list