-
Notifications
You must be signed in to change notification settings - Fork 592
Removed RegDeleteTreeA usage in storage_winuser #5182
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5182 +/- ##
==========================================
- Coverage 86.68% 86.25% -0.44%
==========================================
Files 59 59
Lines 18233 18330 +97
==========================================
+ Hits 15806 15811 +5
- Misses 2427 2519 +92 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
It seems like there is a missing include instead. |
I was wondering how this could be broken, but the documentation for |
@nibanks I think gamecore specifically doesn't define the registry API, so we must define it here ourselves to build. |
I missed that this was gamecore specific. Generally, we just have to remove usage for things not on gamecore. |
Yeah, now that I read the documentation for these partitions more carefully, if we declare functions ourselves, it's possible for Gamecore to successfully compile and maybe even link to APIs that will not be present on every Gamecore system, leading to runtime failures down the line. |
Added the storage_winuser part from #5112 as discussed with Anthony to unblock gamecore builds as the PR still requires changes before it gets merged. |
You need to update the CLog manifest (scripts/update-sidecar.ps1) |
src/platform/storage_winuser.c
Outdated
|
||
CXPLAT_FREE(ValueName, QUIC_POOL_PLATFORM_TMP_ALLOC); | ||
|
||
AllocatedLength *= 2; // The API doesn't tell us the needed length; just double it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently the RegQueryInfoKeyA
function returns lpcbMaxValueNameLen
which is the answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so at the top call RegQueryInfoKeyA
to get the initial value to use for AllocatedLength
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that's the theory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on using it then, it seems to me like a more natural pattern!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have modified it according to the suggested method, please see if it looks fine. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as-is, though the RegQueryInfoKeyA
approach may be tidier.
Agree with Michael's comment, but this looks good too. |
Co-authored-by: Nick Banks <nibanks@microsoft.com>
* added RegDeleteTreeA definition in restricted build * removed usage of RegDeleteTreeA * updated clog * max short * added comment * added RegQuertyInfKeyA * added line * Update src/platform/storage_winuser.c Co-authored-by: Nick Banks <nibanks@microsoft.com> --------- Co-authored-by: Nick Banks <nibanks@microsoft.com>
* Removed RegDeleteTreeA usage in storage_winuser (#5182) * added RegDeleteTreeA definition in restricted build * removed usage of RegDeleteTreeA * updated clog * max short * added comment * added RegQuertyInfKeyA * added line * Update src/platform/storage_winuser.c Co-authored-by: Nick Banks <nibanks@microsoft.com> --------- Co-authored-by: Nick Banks <nibanks@microsoft.com> * whitespace to trigger whitespace * remove whitespace to trigger CI --------- Co-authored-by: Nick Banks <nibanks@microsoft.com>
Description
Gamecore builds are failing because it is not able to find the definition of RegDeleteTreeA in the undock pipelines.
Testing
Do any existing tests cover this change? Are new tests needed?
Documentation
Is there any documentation impact for this change?