Re: [PATCH v4] efi: split efisubsystem from efivars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 21, 2013 at 12:17 PM, Matt Fleming <matt.fleming@xxxxxxxxx> wrote:
> On Sat, 2013-02-16 at 20:01 +0100, Tom Gundersen wrote:
>>  #
>> +obj-$(CONFIG_EFI)                    += efi.o
>
> The $(CONFIG_EFI) part is redundant. We only build things in
> drivers/firmware/efi/ if CONFIG_EFI=y.

Ah, good point.

>> +     /* We register the efi directory at /sys/firmware/efi */
>> +     efi_kobj = kobject_create_and_add("efi", firmware_kobj);
>> +     if (!efi_kobj) {
>> +             pr_err("efi: Firmware registration failed.\n");
>> +             return -ENOMEM;
>> +     }
>> +
>> +     error = sysfs_create_group(efi_kobj, &efi_subsys_attr_group);
>> +     if (error) {
>> +             pr_err("efi: Sysfs attribute export failed with error %d.\n",
>> +                    error);
>> +     }
>> +
>> +#if defined(CONFIG_EFIVAR_FS) || defined(CONFIG_EFIVAR_FS_MODULE)
>> +     /* and the standard mountpoint for efivarfs */
>> +     efivars_kobj = kobject_create_and_add("efivars", efi_kobj);
>> +     if (!efivars_kobj) {
>> +             pr_err("efivars: Subsystem registration failed.\n");
>> +             kobject_put(efi_kobj);
>> +             return -ENOMEM;
>> +     }
>> +#endif /* CONFIG_EFIVAR_FS */
>
> Does it make sense to hide the efivarfs mount point? I'm not crazy about
> sprinkling more #ifdef's around. If the efivarfs code isn't compiled
> into the kernel/built as a module then mounting will fail anyway.

I was 50/50 on that, so if you prefer to remove the ifdef that's fine with me.

I'll send out a new version soon, unless you prefer to just fix it up
as you apply it?

Cheers,

Tom
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux