Gary Ching-Pang Lin changed bug 1179170
What Removed Added
Flags needinfo?(glin@suse.com)  

Comment # 4 on bug 1179170 from
The deletion of uefi variable in efivar is quite simple:

static int
efivarfs_del_variable(efi_guid_t guid, const char *name)
{
        char *path;
        int rc = make_efivarfs_path(&path, guid, name);
        if (rc < 0) {
                efi_error("make_efivarfs_path failed");
                return -1;
        }

        efivarfs_set_immutable(path, 0);
        rc = unlink(path);
        if (rc < 0)
                efi_error("unlink failed");

        __typeof__(errno) errno_value = errno;
        free(path);
        errno = errno_value;

        return rc;
}

It sets immutable to 0 and unlinks the path. In
kernel/drivers/firmware/efi/vars.c, when removing a file, it uses
uefi_set_variable() with NULL to delete the variable, and this is unlikely to
fail. Maybe there are more clues in /var/log/pbl.log.


You are receiving this mail because: