From 4df08f3805c4ba21584ac1613787a492b1ce42b0 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 17 Nov 2021 14:41:34 +0100 Subject: [PATCH] lib/misc: Recognize Alpine Linux Signed-off-by: Natanael Copa --- open-vm-tools/lib/include/guest_os.h | 1 + open-vm-tools/lib/misc/hostinfoPosix.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/open-vm-tools/lib/include/guest_os.h b/open-vm-tools/lib/include/guest_os.h index 3b4ffa30c..cd2afc2dc 100644 --- a/open-vm-tools/lib/include/guest_os.h +++ b/open-vm-tools/lib/include/guest_os.h @@ -265,6 +265,7 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); /* Linux */ #define STR_OS_AMAZON_LINUX "amazonlinux" +#define STR_OS_ALPINE "Alpine" #define STR_OS_ANNVIX "Annvix" #define STR_OS_ARCH "Arch" #define STR_OS_ARKLINUX "Arklinux" diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 56708333f..357165482 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -199,6 +199,7 @@ typedef struct { static const DistroInfo distroArray[] = { { "ALT", "/etc/altlinux-release" }, + { "Alpine", "/etc/alpine-release" }, { "Annvix", "/etc/annvix-release" }, { "Arch", "/etc/arch-release" }, { "Arklinux", "/etc/arklinux-release" }, @@ -1270,6 +1271,7 @@ HostinfoSetSuseShortName(const ShortNameSet *entry, // IN: static const ShortNameSet shortNameArray[] = { /* Long distro name Short distro name Short name set function */ +{"alpine", STR_OS_ALPINE, HostinfoGenericSetShortName}, {"amazon", NULL, HostinfoSetAmazonShortName}, {"annvix", STR_OS_ANNVIX, HostinfoGenericSetShortName}, {"arch", STR_OS_ARCH, HostinfoGenericSetShortName},