This repository was archived by the owner on May 4, 2024. It is now read-only.
File tree 3 files changed +10
-10
lines changed
3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 8
8
9
9
## Install
10
10
11
+ Requires macOS 10.15 or later.
12
+
11
13
``` console
12
14
brew install vde
13
15
@@ -58,8 +60,6 @@ The following additional files will be installed:
58
60
59
61
Use ` /var/run/vde.bridged.en0.ctl ` as the VDE socket path.
60
62
61
- Needs macOS 10.15 or later.
62
-
63
63
## Advanced usage
64
64
65
65
### Testing without launchd
Original file line number Diff line number Diff line change 12
12
#define VERSION "UNKNOWN"
13
13
#endif
14
14
15
+ #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101500
16
+ #error "Requires macOS 10.15 or later"
17
+ #endif
18
+
15
19
static void print_usage (const char * argv0 ) {
16
20
printf ("Usage: %s [OPTION]... VDESWITCH\n" , argv0 );
17
21
printf ("vmnet.framework support for rootless QEMU.\n" );
@@ -66,13 +70,7 @@ struct cli_options *cli_options_parse(int argc, char *argv[]) {
66
70
} else if (strcmp (optarg , "shared" ) == 0 ) {
67
71
res -> vmnet_mode = VMNET_SHARED_MODE ;
68
72
} else if (strcmp (optarg , "bridged" ) == 0 ) {
69
- #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
70
73
res -> vmnet_mode = VMNET_BRIDGED_MODE ;
71
- #else
72
- fprintf (stderr ,
73
- "vmnet mode \"bridged\" requires macOS 10.15 or later\n" );
74
- goto error ;
75
- #endif
76
74
} else {
77
75
fprintf (stderr , "Unknown vmnet mode \"%s\"\n" , optarg );
78
76
goto error ;
@@ -102,14 +100,12 @@ struct cli_options *cli_options_parse(int argc, char *argv[]) {
102
100
goto error ;
103
101
}
104
102
res -> vde_switch = strdup (argv [optind ]);
105
- #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
106
103
if (res -> vmnet_mode == VMNET_BRIDGED_MODE && res -> vmnet_interface == NULL ) {
107
104
fprintf (
108
105
stderr ,
109
106
"vmnet mode \"bridged\" require --vmnet-interface to be specified\n" );
110
107
goto error ;
111
108
}
112
- #endif
113
109
return res ;
114
110
error :
115
111
print_usage (argv [0 ]);
Original file line number Diff line number Diff line change 9
9
10
10
#include "cli.h"
11
11
12
+ #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101500
13
+ #error "Requires macOS 10.15 or later"
14
+ #endif
15
+
12
16
static bool debug = false;
13
17
14
18
#define DEBUGF (fmt , ...) \
You can’t perform that action at this time.
0 commit comments