SETUEFIVAR SubroutineUsage:
r = UEFISETVAR(varname, namespaceguid[, bindata, attributes])
Description:
Set a UEFI firmware variable (variable names are case sensitive). This subroutine is only available when the system booted using UEFI. In linux, the efivarfs must be mounted at /sys/firmware/efi/efivars. The linux command to mount is: mount -t efivarfs none /sys/firmware/efi/efivars. When bindata is not provided the variable is deleted. The return value is zero on success otherwise an error code is returned.
WARNING: This function does not prevent you from deleting variables or setting invalid data. Using invalid data or deleing the wrong variables can prevent your system from booting until the firmware is reset to factory defaults. Contact the system manufacturer for instructions on resetting factory defaults.
Example:
|