Skip to content

Feature: improved handling of the variable value output #1

Description

@eabase

Great tool.

However, I get a lot of garbage when outputting to UTF-8 terminal (Win-11 Pro + Windows Terminal).

Perhaps, you could consider to improve the handling of actually reading the content of the variables?

I can suggest the following:

  • Check if variable is "empty" and display <empty> or the number of 0x00 bytes.
  • Output unknown garbage as a hex blob (a la hexdump)
  • More informative error checking (i.e. error = 203)
  • Add a command/switch to iterate over all variables

For some variables I get the following error:

Get-UEFIVariable: Unable to retrieve variable LpeSetup from namespace {b5fbe0c8-a72a-408d-859c-0fd7537aaa5f}, last error = 203.

To iterate I use the following one-liner that can be put into a better form:

$ns = Get-UEFIVariable -All; foreach ($i in $ns) { Write-Host -For DarkYellow "`n$($i.NameSpace) : $($i.VariableName):`n"; try { Get-UEFIVariable -Namespace "$($i.NameSpace)" -VariableName "$($i.VariableName)" | hexdump; } catch { Write-Host -for Red " FAILED "; } }

There is a bug in it, that it never reaches FAILED. I'm sure some AI can fix it.

However, I use this to pass it to my own version of hexdump (as in above), and the output looks like this:

Image

Just ignore the N:0 H:2, it's for debugging my hexdump.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions