Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix constness when taking an array of string pointers #181

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions include/libkrun.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int32_t krun_set_data_disk(uint32_t ctx_id, const char *disk_path);
* Returns:
* Zero on success or a negative error number on failure.
*/
int32_t krun_set_mapped_volumes(uint32_t ctx_id, char *const mapped_volumes[]);
int32_t krun_set_mapped_volumes(uint32_t ctx_id, const char *const mapped_volumes[]);

/*
* Adds an independent virtio-fs device pointing to a host's directory with a tag.
Expand Down Expand Up @@ -192,7 +192,7 @@ int32_t krun_set_net_mac(uint32_t ctx_id, uint8_t *const c_mac);
* If past networking mode is used (krun_set_passt_fd was called), port mapping is not supported
* as an API of libkrun (but you can still do port mapping using command line arguments of passt)
*/
int32_t krun_set_port_map(uint32_t ctx_id, char *const port_map[]);
int32_t krun_set_port_map(uint32_t ctx_id, const char *const port_map[]);

/* Flags for virglrenderer. Copied from virglrenderer bindings. */
#define VIRGLRENDERER_USE_EGL 1 << 0
Expand Down Expand Up @@ -228,7 +228,7 @@ int32_t krun_set_gpu_options(uint32_t ctx_id, uint32_t virgl_flags);
* Returns:
* Zero on success or a negative error number on failure.
*/
int32_t krun_set_rlimits(uint32_t ctx_id, char *const rlimits[]);
int32_t krun_set_rlimits(uint32_t ctx_id, const char *const rlimits[]);

/*
* Sets the working directory for the executable to be run inside the microVM.
Expand Down Expand Up @@ -261,8 +261,8 @@ int32_t krun_set_workdir(uint32_t ctx_id,
*/
int32_t krun_set_exec(uint32_t ctx_id,
const char *exec_path,
char *const argv[],
char *const envp[]);
const char *const argv[],
const char *const envp[]);

/*
* Sets environment variables to be configured in the context of the executable.
Expand All @@ -276,7 +276,7 @@ int32_t krun_set_exec(uint32_t ctx_id,
* Returns:
* Zero on success or a negative error number on failure.
*/
int32_t krun_set_env(uint32_t ctx_id, char *const envp[]);
int32_t krun_set_env(uint32_t ctx_id, const char *const envp[]);

/*
* Sets the file path to the TEE configuration file. Only available in libkrun-sev.
Expand Down
Loading