-
Notifications
You must be signed in to change notification settings - Fork 196
libenv/sysinfo: Fix detected os description #5751
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
Use platform context variable also for logging the os class description. Before this change, it were using loop counter variable, which is incremented again. This led to verbose logging message: verbose: CFEngine detected operating system description is qnx on Darwin/macOS. Also use already lowercased sysname from utsname struct. Fixes: e2c9f00 ("Use a proper 'bool' variable for a condition in GetNameInfo3()")
larsewi
left a comment
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.
Great 🚀 Thanks!
Co-authored-by: Lars Erik Wik <53906608+larsewi@users.noreply.github.com>
larsewi
left a comment
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.
Thanks 🚀
craigcomstock
left a comment
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.
seems reasonable. :) thanks!
|
@cf-bottom jenkins, please |
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/11973/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-11973/ |
In commit 22ad5d6 an assumption was made that the `sysname` attribute of `struct utsname` is always lower case. This assumption proved to be wrong for Windows Server 2019. Since the commit also contains other changes, I will do a manual revert. See cfengine#5751 for more information. Ticket: CFE-4519 Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Use platform context variable also for logging the os class description. Before this change, it were using loop counter variable, which is incremented again. This led to verbose logging message:
verbose: CFEngine detected operating system description is qnx
on Darwin/macOS.
Also use already lowercased sysname from utsname struct.
Fixes: e2c9f00 ("Use a proper 'bool' variable for a condition in GetNameInfo3()")