aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools/0001-lib-misc-Recognize-Alpine-Linux.patch
blob: 3674fd445667ee234f47d8e2cb8f25f48d60054a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 00a3692ad782758d95994798e038d6d6c3104d93 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/11] 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 d5d190a..c788991 100644
--- a/open-vm-tools/lib/include/guest_os.h
+++ b/open-vm-tools/lib/include/guest_os.h
@@ -192,6 +192,7 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set);
 #define STR_OS_ESX_6               "VMware ESX 6"
 
 /* Linux */
+#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 a9e7d6c..c5336c4 100644
--- a/open-vm-tools/lib/misc/hostinfoPosix.c
+++ b/open-vm-tools/lib/misc/hostinfoPosix.c
@@ -176,6 +176,7 @@ typedef struct distro_info {
 
 /* KEEP SORTED! (sort -d) */
 static const DistroInfo distroArray[] = {
+   {"Alpine",             "/etc/alpine-release"},
    {"Annvix",             "/etc/annvix-release"},
    {"Arch",               "/etc/arch-release"},
    {"Arklinux",           "/etc/arklinux-release"},
@@ -558,6 +559,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")) {
-- 
2.6.3