mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
dl: Add support for persistent modules
This type of modules cannot be unloaded. This is useful if a given functionality, e.g. UEFI secure boot shim signature verification, should not be disabled if it was enabled at some point in time. Somebody may say that we can use standalone GRUB2 here. That is true. However, the code is not so big nor complicated hence it make sense to support modularized configs too. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
This commit is contained in:
1 parent
3d612924c3
commit
ee7808e219
2 files changed
+16
No files matched your search
@@ -137,6 +137,9 @@ grub_mini_cmd_rmmod (struct grub_command *cmd __attribute__ ((unused)),
|
||||
if (! mod)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no such module");
|
||||
|
||||
if (grub_dl_is_persistent (mod))
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "cannot unload persistent module");
|
||||
|
||||
if (grub_dl_unref (mod) <= 0)
|
||||
grub_dl_unload (mod);
|
||||
|
||||
|
||||
Reference in new issue
Block a user