Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(efiboot/list): allow to show a single namespace #44

Merged
merged 1 commit into from
Jul 15, 2023
Merged

feat(efiboot/list): allow to show a single namespace #44

merged 1 commit into from
Jul 15, 2023

Conversation

iTrooz
Copy link
Owner

@iTrooz iTrooz commented Jul 13, 2023

This PR changes the behaviour of efiboot list to allow you to show a single namespace

Examples :

shows the standard EFI namespace

$ efiboot list
Variables in namespace 8be4df61-93ca-11d2-aa0d-00e098032b8c :
dbxDefault
dbDefault
KEKDefault
PKDefault
ConInDev
BootCurrent
ErrOutDev
ConOutDev
OsIndicationsSupported
PlatformLangCodes
LangCodes
VendorKeys
SignatureSupport
BootOrder
Boot0001
SecureBoot
SetupMode
Boot0003
Boot2003
Boot2002
Boot2001
ConOut
ConIn
Timeout
PlatformLang
Lang

Shows a custom namespace

$ efiboot list 59d1c24f-50f1-401a-b101-f33e0daed443
Variables in namespace 59d1c24f-50f1-401a-b101-f33e0daed443 :
ActiveVgaDev
PhysicalBootOrder
CustomSecurity
certdb
RestoreFactoryDefault
UserVgaSelection
PsiSetupData
SecureBootEnforce

Showing all variables from all namespaces

$ efiboot list --all
                           Namespace Variable
8be4df61-93ca-11d2-aa0d-00e098032b8c dbxDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c dbDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c KEKDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c PKDefault
f72deef6-13ef-4958-b027-0e45ce7fa45e PasswordConfig
07a66697-d400-4903-b3da-67a61d2b7058 Tcg2ConfigInfo
aa1305b9-01f3-4afb-920e-c9b979a852fd SecureBootData
ef0849b6-fad0-40e9-9107-974aeb8787a2 VarEditFunDis
1f2d63e1-febd-4dc7-9cc5-ba2b1cef9c5b FeData
8be4df61-93ca-11d2-aa0d-00e098032b8c ConInDev
97d2f285-b16b-46d6-8aab-341a84a6e634 VarEdit
8be4df61-93ca-11d2-aa0d-00e098032b8c BootCurrent
8be4df61-93ca-11d2-aa0d-00e098032b8c ErrOutDev
59d1c24f-50f1-401a-b101-f33e0daed443 ActiveVgaDev
59d1c24f-50f1-401a-b101-f33e0daed443 ConOutCandidateDev
8be4df61-93ca-11d2-aa0d-00e098032b8c ConOutDev
79941ecd-ed36-49d0-8124-e4c31ac75cd4 AmdAcpiVar
59d1c24f-50f1-401a-b101-f33e0daed443 PlugInVgaHandles
59d1c24f-50f1-401a-b101-f33e0daed443 ConInCandidateDev
8be4df61-93ca-11d2-aa0d-00e098032b8c OsIndicationsSupported
8be4df61-93ca-11d2-aa0d-00e098032b8c PlatformLangCodes
8be4df61-93ca-11d2-aa0d-00e098032b8c LangCodes
8be4df61-93ca-11d2-aa0d-00e098032b8c VendorKeys
59d1c24f-50f1-401a-b101-f33e0daed443 certdbv
8be4df61-93ca-11d2-aa0d-00e098032b8c SignatureSupport
401984bb-989b-4baf-b568-495884120278 ResetFP
bb983ccf-151d-40e1-a07b-4a17be168292 MemoryOverwriteRequestControlLock
e20939be-32d4-41be-a150-897f85d49829 MemoryOverwriteRequestControl
f24643c2-c622-494e-8a0d-4632579c2d5b TrEEPhysicalPresence
a04a27f4-df00-4d42-b552-39511302113d Setup
d719b2cb-3d3a-4596-a3bc-dad00e67656f dbx
8be4df61-93ca-11d2-aa0d-00e098032b8c BootOrder
59d1c24f-50f1-401a-b101-f33e0daed443 PhysicalBootOrder
59d1c24f-50f1-401a-b101-f33e0daed443 TargetHddDevPath
8be4df61-93ca-11d2-aa0d-00e098032b8c Boot0001
8be4df61-93ca-11d2-aa0d-00e098032b8c SecureBoot
8be4df61-93ca-11d2-aa0d-00e098032b8c SetupMode
59d1c24f-50f1-401a-b101-f33e0daed443 CustomSecurity
8731426d-a9a7-cb76-3129-6e4e1e874120 H46SecureBootCheck
eaec226f-c9a3-477a-a826-ddc716cdc0e3 OfflineUniqueIDEKPubCRC
eaec226f-c9a3-477a-a826-ddc716cdc0e3 OfflineUniqueIDEKPub
8be4df61-93ca-11d2-aa0d-00e098032b8c Boot0003
eaec226f-c9a3-477a-a826-ddc716cdc0e3 UnlockIDCopy
77fa9abd-0359-4d32-bd60-28f4e78f784b CurrentPolicy
59d1c24f-50f1-401a-b101-f33e0daed443 certdb
59d1c24f-50f1-401a-b101-f33e0daed443 RestoreFactoryDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c Boot2003
8be4df61-93ca-11d2-aa0d-00e098032b8c Boot2002
8be4df61-93ca-11d2-aa0d-00e098032b8c Boot2001
f24643c2-c622-494e-8a0d-4632579c2d5b TrEEPhysicalPresenceFlags
86bbf7e3-b772-4d22-80a9-e7c58c3c7ff0 SaveHddPassword
8be4df61-93ca-11d2-aa0d-00e098032b8c ConOut
8be4df61-93ca-11d2-aa0d-00e098032b8c ConIn
59d1c24f-50f1-401a-b101-f33e0daed443 UserVgaSelection
0ce40a5f-153a-4462-a429-4098e0e13cac ResourceDistribution
542b8f2f-bd52-4233-8c3d-66530de8a369 ResourceSizeForEachRb
ad22518b-450a-4857-96c3-d1e22f206129 MemCeil.
8731426d-a9a7-cb76-3129-6e4e1e874120 F12flag4
8731426d-a9a7-cb76-3129-6e4e1e874120 F12flag2
04b37fe8-f6ae-480b-bdd5-37d98c5e89aa VarErrorFlag
8376bdca-5e03-4735-951a-4a74141e5886 SetPcrBanks
a04a27f4-df00-4d42-b552-39511302113d Custom
c020489e-6db2-4ef2-9aa5-ca06fc11d36a AcpiGlobalVariable
8731426d-a9a7-cb76-3129-6e4e1e874120 H46MfgMode
8731426d-a9a7-cb76-3129-6e4e1e874120 PxeFlag
8be4df61-93ca-11d2-aa0d-00e098032b8c Timeout
59d1c24f-50f1-401a-b101-f33e0daed443 CustomPlatformLang
8731426d-a9a7-cb76-3129-6e4e1e874120 H46NextBootStatus
3a997502-647a-4c82-998e-52ef9486a247 AmdSetup
fe26a894-d199-47d4-8afa-070e3d54ba86 AMD_RAID
a339d746-f678-49b3-9fc7-54ce0f9df226 AMD_PBS_SETUP
382af2bb-ffff-abcd-aaee-cce099338877 SecureFlashInfo
8be4df61-93ca-11d2-aa0d-00e098032b8c PlatformLang
8be4df61-93ca-11d2-aa0d-00e098032b8c Lang
eb704011-1402-11d3-8e77-00a0c969723b MTC
aeb9c5c1-94f1-4d02-bfd9-4602db2d3c54 Tcg2PhysicalPresence
aeb9c5c1-94f1-4d02-bfd9-4602db2d3c54 Tcg2PhysicalPresenceFlags
59d1c24f-50f1-401a-b101-f33e0daed443 PsiSetupData
ad3f6761-f0a3-46c8-a4cb-19b70ffdb305 ApSyncFlagNv
8731426d-a9a7-cb76-3129-6e4e1e874120 H46ScuBootTypeOrder
24c38995-0940-4318-adeb-26bd5a2df237 OneKeyCheck
59d1c24f-50f1-401a-b101-f33e0daed443 SecureBootEnforce
29749bad-401b-4f6d-b124-cece8c590c48 DownCoreStatus

@iTrooz iTrooz requested a review from alixinne as a code owner July 13, 2023 08:50
@iTrooz
Copy link
Owner Author

iTrooz commented Jul 13, 2023

Not sure why the CI is failing. Is it a problem in my end, or yours ?

@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2023

Codecov Report

Patch coverage has no change and project coverage change: -2.96 ⚠️

Comparison is base (377e908) 49.13% compared to head (c1a4110) 46.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
- Coverage   49.13%   46.18%   -2.96%     
==========================================
  Files          17       19       +2     
  Lines         696      877     +181     
==========================================
+ Hits          342      405      +63     
- Misses        354      472     +118     
Impacted Files Coverage Δ
efiboot/src/cli/list.rs 0.00% <0.00%> (ø)
efiboot/src/main.rs 16.66% <0.00%> (-3.34%) ⬇️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@alixinne alixinne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the CI failing was a bug in the commitlint workflow (on my side then!)

@alixinne alixinne enabled auto-merge (squash) July 15, 2023 20:35
@alixinne alixinne merged commit 9741953 into iTrooz:master Jul 15, 2023
7 of 9 checks passed
alixinne pushed a commit that referenced this pull request Jul 15, 2023
# [1.1.0](v1.0.14...v1.1.0) (2023-07-15)

### Features

* **efiboot/list:** allow to show a single namespace ([#44](#44)) ([9741953](9741953))
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@iTrooz iTrooz deleted the single_namespace branch July 27, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants