Skip to content

Commit 5f7ff6d

Browse files
slptylerfanelli
authored andcommitted
chroot_vm: fix argument types
Signed-off-by: Sergio Lopez <[email protected]>
1 parent 43a39e4 commit 5f7ff6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/chroot_vm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,17 @@ int start_passt()
184184

185185
int main(int argc, char *const argv[])
186186
{
187-
char *const envp[] =
187+
const char *const envp[] =
188188
{
189189
"TEST=works",
190190
0
191191
};
192-
char *const port_map[] =
192+
const char *const port_map[] =
193193
{
194194
"18000:8000",
195195
0
196196
};
197-
char *const rlimits[] =
197+
const char *const rlimits[] =
198198
{
199199
// RLIMIT_NPROC = 6
200200
"6=4096:8192",
@@ -295,7 +295,7 @@ int main(int argc, char *const argv[])
295295
}
296296

297297
// Specify the path of the binary to be executed in the isolated context, relative to the root path.
298-
if (err = krun_set_exec(ctx_id, cmdline.guest_argv[0], &cmdline.guest_argv[1], &envp[0])) {
298+
if (err = krun_set_exec(ctx_id, cmdline.guest_argv[0], (const char* const*) &cmdline.guest_argv[1], &envp[0])) {
299299
errno = -err;
300300
perror("Error configuring the parameters for the executable to be run");
301301
return -1;

0 commit comments

Comments
 (0)