forked from DrDonk/unlocker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vmw_darwin.go
50 lines (41 loc) · 965 Bytes
/
vmw_darwin.go
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
48
49
50
// SPDX-FileCopyrightText: © 2014-2022 David Parsons
// SPDX-License-Identifier: MIT
//go:build darwin
// +build darwin
package vmwpatch
import (
"os"
"time"
)
func IsAdmin() bool {
if os.Geteuid() == 0 {
return true
}
return false
}
//goland:noinspection GoUnusedParameter
func VMWStart(v *VMwareInfo) {
// Dummy function on macOS
return
}
//goland:noinspection GoUnusedParameter
func VMWStop(v *VMwareInfo) {
// Dummy function on macOS
return
}
func VMWInfo() *VMwareInfo {
// TODO: Parse macOS Fusion specific files
// /Library/Preferences/VMware Fusion/lastLocationUsed --> App Bundle
// /Applications/VMware Fusion.app/Contents/Info.plist
// <key>CFBundleShortVersionString</key>
// <string>12.2.1</string>
// <key>CFBundleVersion</key>
// <string>18811640</string>
v := &VMwareInfo{}
return v
}
//goland:noinspection GoUnusedParameter
func setCTime(path string, ctime time.Time) error {
// Dummy function on macOS
return nil
}