Author: aschnell Date: Thu Aug 21 21:53:03 2008 New Revision: 50298 URL: http://svn.opensuse.org/viewcvs/yast?rev=50298&view=rev Log: - preparations for efi boot on archs other than ia64 Modified: trunk/storage/storage/src/include/do_proposal_flexible.ycp trunk/storage/storage/src/modules/Partitions.ycp Modified: trunk/storage/storage/src/include/do_proposal_flexible.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/do_proposal_flexible.ycp?rev=50298&r1=50297&r2=50298&view=diff ============================================================================== --- trunk/storage/storage/src/include/do_proposal_flexible.ycp (original) +++ trunk/storage/storage/src/include/do_proposal_flexible.ycp Thu Aug 21 21:53:03 2008 @@ -50,7 +50,7 @@ ``{ boolean ret = !Storage::IsPartitionable( entry ) || entry["readonly"]:false || Arch::s390(); - if( !ret && Arch::ia64() && entry["label"]:"gpt"!="gpt" ) + if( !ret && Partitions::EfiBoot() && entry["label"]:"gpt"!="gpt" ) { ret = true; } @@ -2753,7 +2753,7 @@ special_boot_proposal_prepare( disk["partitions"]:[] ); boolean have_home = false; boolean have_root = false; - boolean have_boot = (!Arch::ia64()||mode!=`free) && size(p)>0; + boolean have_boot = (!Partitions::EfiBoot()||mode!=`free) && size(p)>0; if( have_boot ) disk["partitions"] = p; map r = can_swap_reuse( s, disk["partitions"]:[], target ); Modified: trunk/storage/storage/src/modules/Partitions.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Partitions.ycp?rev=50298&r1=50297&r2=50298&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Partitions.ycp (original) +++ trunk/storage/storage/src/modules/Partitions.ycp Thu Aug 21 21:53:03 2008 @@ -17,7 +17,6 @@ import "Mode"; import "Stage"; import "AsciiFile"; - import "String"; // The filesystem ids for the partitions @@ -100,11 +99,18 @@ ]; +global boolean EfiBoot() +{ + return Arch::ia64(); +} + + global void SetDefaultFs(symbol new_default_fs) { default_fs = new_default_fs; } + global symbol DefaultFs() { if (default_fs == `unknown) @@ -118,12 +124,13 @@ return default_fs; } + global symbol DefaultBootFs() { if (default_boot_fs == `unknown) { default_boot_fs = DefaultFs(); - if (Arch::ia64()) + if (EfiBoot()) { default_boot_fs = `vfat; } @@ -135,18 +142,20 @@ return default_boot_fs; } -global define string BootMount() - ``{ - if( boot_mount_point == "" ) - { + +global string BootMount() +{ + if (boot_mount_point == "") + { boot_mount_point = "/boot"; - if( Arch::ia64 () ) - { + if (EfiBoot()) + { boot_mount_point = "/boot/efi"; - } } - return( boot_mount_point ); } + return boot_mount_point; +} + global define integer MinimalNeededBootsize() ``{ @@ -244,37 +253,40 @@ return( ret ); } -global define integer FsidBoot() - ``{ + +global integer FsidBoot() +{ if( fsid_boot == 0 ) - { + { fsid_boot = fsid_native; - if( Arch::ia64 () ) - { + if (EfiBoot()) + { fsid_boot = fsid_gpt_boot; - } + } else if( PrepBoot() ) - { + { fsid_boot = fsid_prep_chrp_boot; - } + } else if( Arch::board_mac () ) - { + { fsid_boot = fsid_mac_hfs; - } } - return( fsid_boot ); } + return fsid_boot; +} -global define boolean NeedBoot() - ``{ + +global boolean NeedBoot() +{ boolean ret = false; - if( Arch::ia64()||Arch::ppc()||Arch::sparc()||Arch::alpha() ) - { + if (EfiBoot() || Arch::ppc() || Arch::sparc() || Arch::alpha()) + { ret = true; - } - y2milestone( "NeedBoot ret %1", ret ); - return( ret ); } + y2milestone( "NeedBoot ret %1", ret ); + return ret; +} + global define boolean IsDosPartition( integer fsid ) ``{ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org