mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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@suse.de> git-svn-id: svn://coreboot.org/openbios/openbios-devel@430 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Blue Swirl
parent
bf6f68f96f
commit
1a4b1e4f3d
@@ -145,8 +145,12 @@ files_volume_name( files_info_t *mi )
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user