Quoting Jack Schwartz, who wrote the following on Thu, 1 Jul 2010:

Hi John.

Thanks for your quick reply.

On 07/ 1/10 12:35 PM, John Fischer wrote:
Jack,

I had a little trouble accessing the code review. It finally worked when I started from
the ~schwartz directory and went from there.  Very strange.  Anyhow...

It seems that the be_has_grub() code starting at line 538 and continuing through line 580 could be condensed into a single be_has_grub() if block in lib/libbe/be_activate.c.
The be_get_pkg_version call on line 549 uses the pkg_name determined by the first if(be_has_grub()). So if I was to consolidate, I would have to use the ?: operator as:

if ((ret = be_get_pkg_version(
   (be_has_grub() ? BE_GRUB_PKG_NAME : BE_BOOTBLK_PKG_NAME),
    tmp_mntpt, pkg_version, sizeof (pkg_version))) != BE_SUCCESS) {

Could another function be used to acquire the grub package name? (i.e. like be_boot_loader_package_name()?) When GRUB2 lands, that will make it easier (less change) for us to update libbe to be GRUB2-aware.

 --S
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to