From 70438337a96f53019bfb3b5b928d9a9ab8067d64 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 2 Jul 2012 15:48:35 +0200 Subject: [PATCH] lib/misc: Recognize Alpine Linux --- lib/include/guest_os.h | 1 + lib/misc/hostinfoPosix.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/include/guest_os.h b/open-vm-tools/lib/include/guest_os.h index ffced6d..49f30eb 100644 --- a/lib/include/guest_os.h +++ b/lib/include/guest_os.h @@ -152,6 +152,7 @@ typedef enum GuestOSFamilyType { #define STR_OS_ESX_5 "VMware ESX 5" /* Linux */ +#define STR_OS_ALPINE "Alpine" #define STR_OS_ANNVIX "Annvix" #define STR_OS_ARCH "Arch" #define STR_OS_ARKLINUX "Arklinux" diff --git a/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 8fa18cc..9874c2a 100644 --- a/lib/misc/hostinfoPosix.c +++ b/lib/misc/hostinfoPosix.c @@ -185,6 +185,7 @@ static const DistroInfo distroArray[] = { {"Gentoo", "/etc/gentoo-release"}, {"Novell", "/etc/nld-release"}, {"Ubuntu", "/etc/lsb-release"}, + {"Alpine", "/etc/alpine-release"}, {"Annvix", "/etc/annvix-release"}, {"Arch", "/etc/arch-release"}, {"Arklinux", "/etc/arklinux-release"}, @@ -545,6 +546,8 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name Str_Strcpy(distroShort, STR_OS_TURBO, distroShortSize); } else if (strstr(distroLower, "sun")) { Str_Strcpy(distroShort, STR_OS_SUN_DESK, distroShortSize); + } else if (strstr(distroLower, "alpine")) { + Str_Strcpy(distroShort, STR_OS_ALPINE, distroShortSize); } else if (strstr(distroLower, "annvix")) { Str_Strcpy(distroShort, STR_OS_ANNVIX, distroShortSize); } else if (strstr(distroLower, "arch")) { -- 1.7.11.1