diff options
Diffstat (limited to 'community/open-vm-tools/0001-lib-misc-Recognize-Alpine-Linux.patch')
-rw-r--r-- | community/open-vm-tools/0001-lib-misc-Recognize-Alpine-Linux.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/community/open-vm-tools/0001-lib-misc-Recognize-Alpine-Linux.patch b/community/open-vm-tools/0001-lib-misc-Recognize-Alpine-Linux.patch new file mode 100644 index 0000000000..39bd1587e4 --- /dev/null +++ b/community/open-vm-tools/0001-lib-misc-Recognize-Alpine-Linux.patch @@ -0,0 +1,47 @@ +From cb8c4078a9e10c2cbb142d6b9a179cc83015806d Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 5 Nov 2015 13:09:34 +0000 +Subject: [PATCH 01/12] lib/misc: Recognize Alpine Linux + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + open-vm-tools/lib/include/guest_os.h | 1 + + open-vm-tools/lib/misc/hostinfoPosix.c | 3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/open-vm-tools/lib/include/guest_os.h b/open-vm-tools/lib/include/guest_os.h +index 230acd2c..55a84c4a 100644 +--- a/open-vm-tools/lib/include/guest_os.h ++++ b/open-vm-tools/lib/include/guest_os.h +@@ -223,6 +223,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 b6ebaa7e..1e8f50f2 100644 +--- a/open-vm-tools/lib/misc/hostinfoPosix.c ++++ b/open-vm-tools/lib/misc/hostinfoPosix.c +@@ -179,6 +179,7 @@ typedef struct { + + /* KEEP SORTED! (sort -d) */ + static const DistroInfo distroArray[] = { ++ {"Alpine", "/etc/alpine-release"}, + {"Annvix", "/etc/annvix-release"}, + {"Arch", "/etc/arch-release"}, + {"Arklinux", "/etc/arklinux-release"}, +@@ -762,6 +763,8 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name + + Str_Sprintf(distroShort, distroShortSize, "%s%d", STR_OS_AMAZON_LINUX, + amazonMajor); ++ } 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")) { +-- +2.19.1 + |