Skip to content

[BUG] Cannot parse multiple arguments in Tools #2180

@dreamwhite

Description

@dreamwhite

Software details

  • OpenCore version: 0.8.7 @ release
  • Tool that doesn't work: setup_var.efi which accepts multiple arguments

Brief description of the tool

setup_var.efi is a rewritten version of the old modGRUBShell.efi which serves the same purpose: reading/writing UEFI Variables using a command line tool.

The syntax is pretty similar but with this tool you can even pass arguments (with a specific syntax) to itself, without having to use a shell, as done previously with modGRUBShell.efi.

config.plist configuration

Under Misc/Tool context, I added the following dict:

<dict>
	<key>Arguments</key>
	<string>0x527 0x00 -n Setup</string>
	<key>Auxiliary</key>
	<true/>
	<key>Comment</key>
	<string>UEFI command-line tool for read/write access of variables - CFG Lock unlock</string>
	<key>Enabled</key>
	<true/>
	<key>Flavour</key>
	<string>Auto</string>
	<key>FullNvramAccess</key>
	<true/>
	<key>Name</key>
	<string>setup_var - CFG Unlock</string>
	<key>Path</key>
	<string>setup_var.efi</string>
	<key>RealPath</key>
	<true/>
	<key>TextMode</key>
	<true/>
</dict>

Brief description of the bug

When executing the tool, it seems like that only the first argument (0x527) gets passed, while the other are ignored.

How can I tell that? Executing setup_var.efi 0x527 prints the value of such offset but doesn't edit it, with the second argument (0x00).

Temporarily workaround

Setting .\setup_var.efi 0x527 0x00 -n Setup as the value of Arguments fixes the problem but I'm not quite sure that it's the right way of fixing the issue.

Conclusions

Is this a tool-related issue that cannot parse the arguments passed via OpenCore (very unlikely) - therefore this issue doesn't have anything to do with OpenCore -, or is this a potential bug of OpenCore hence it must be fixed?

Thank you so much in advance, and I'm more than willing to eventually test new OpenCore's commits related to this issue.

--
dreamwhite

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions