summaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools/0001-lib-misc-Recognize-Alpine-Linux.patch
blob: b7131371265c7794f760c711c8671b40c586d3eb (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
From 70438337a96f53019bfb3b5b928d9a9ab8067d64 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
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