From 63d8596a7754bcc04ea1baca1ad7c0ed4434ad0c Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Fri, 30 May 2025 10:22:50 +0200 Subject: [PATCH 1/2] sysinfo.c: Removed trailing whitespace Signed-off-by: Lars Erik Wik --- libenv/sysinfo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libenv/sysinfo.c b/libenv/sysinfo.c index 6beb59bb07..5a6e6374e2 100644 --- a/libenv/sysinfo.c +++ b/libenv/sysinfo.c @@ -1180,7 +1180,7 @@ static void OSReleaseParse(EvalContext *ctx, const char *file_path) { alias = "redhat"; } - else if (StringEqual(os_release_id, "opensuse") || + else if (StringEqual(os_release_id, "opensuse") || StringEqual(os_release_id, "sles")) { alias = "suse"; @@ -3503,13 +3503,13 @@ static void SysOSNameHuman(EvalContext *ctx) /** * Find next integer from string in place. Leading zero's are included. - * + * * @param [in] str string to extract next integer from * @param [out] num pointer to start of next integer or %NULL if no integer * number was found - * + * * @return pointer to the remaining string in `str` or %NULL if no remainder - * + * * @note `str` will be mutated */ static char *FindNextInteger(char *str, char **num) @@ -3577,8 +3577,8 @@ static void SysOsVersionMajor(EvalContext *ctx) } else { - EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, - "os_version_major", major, + EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, + "os_version_major", major, CF_DATA_TYPE_STRING, "source=agent,derived-from=flavor"); } From c5d8d150ab38a13e5e3fdafb2f464e0e0c2ca375 Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Fri, 18 Apr 2025 11:52:50 +0200 Subject: [PATCH 2/2] Define suse class on SLED systems (cherry picked from commit aadc43cf81d585b53385bd4b50ea5a81124d8159) Signed-off-by: Lars Erik Wik --- libenv/sysinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libenv/sysinfo.c b/libenv/sysinfo.c index 5a6e6374e2..d8fbcda45d 100644 --- a/libenv/sysinfo.c +++ b/libenv/sysinfo.c @@ -1181,7 +1181,8 @@ static void OSReleaseParse(EvalContext *ctx, const char *file_path) alias = "redhat"; } else if (StringEqual(os_release_id, "opensuse") || - StringEqual(os_release_id, "sles")) + StringEqual(os_release_id, "sles") || + StringEqual(os_release_id, "sled")) { alias = "suse"; }