Skip to content

Conversation

@btriller
Copy link
Contributor

@btriller btriller commented Apr 1, 2025

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()")

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()")
Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

Great 🚀 Thanks!

@larsewi larsewi self-assigned this Apr 1, 2025
Co-authored-by: Lars Erik Wik <53906608+larsewi@users.noreply.github.com>
Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

Thanks 🚀

Copy link
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

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

seems reasonable. :) thanks!

@olehermanse
Copy link
Member

@cf-bottom jenkins, please

@cf-bottom
Copy link

@olehermanse olehermanse merged commit 07776e1 into cfengine:master Apr 10, 2025
15 of 42 checks passed
larsewi added a commit to larsewi/core that referenced this pull request Apr 29, 2025
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants