Partial exec, environment variables
This commit is contained in:
@@ -28,6 +28,7 @@ static const char* str_status[] = {
|
||||
[ST_REMOVE_ERROR] = "remove error",
|
||||
[ST_XDRV_READ_ERROR] = "drive read error",
|
||||
[ST_XDRV_WRITE_ERROR] = "drive write error",
|
||||
[ST_NOT_PARTIAL] = "not a partially created process",
|
||||
};
|
||||
|
||||
#endif // _LIBSYSTEM_STR_STATUS_H
|
||||
|
||||
@@ -87,10 +87,16 @@ int create_volume (const char* key, int fs_type, const char* device_key) {
|
||||
return (int)do_syscall (SYS_CREATE_VOLUME, key, fs_type, device_key);
|
||||
}
|
||||
|
||||
int env_set (const char* key, void* buffer, size_t len) {
|
||||
return (int)do_syscall (SYS_ENV_SET, key, buffer, len);
|
||||
int env_set (int pid, const char* key, void* buffer, size_t len) {
|
||||
return (int)do_syscall (SYS_ENV_SET, pid, key, buffer, len);
|
||||
}
|
||||
|
||||
int env_get (const char* key, void* buffer, size_t len) {
|
||||
return (int)do_syscall (SYS_ENV_GET, key, buffer, len);
|
||||
int env_get (int pid, const char* key, void* buffer, size_t len) {
|
||||
return (int)do_syscall (SYS_ENV_GET, pid, key, buffer, len);
|
||||
}
|
||||
|
||||
int exec_partial (const char* volume, const char* path) {
|
||||
return (int)do_syscall (SYS_EXEC_PARTIAL, volume, path);
|
||||
}
|
||||
|
||||
int exec_partial_fini (int pid) { return (int)do_syscall (SYS_EXEC_PARTIAL_FINI, pid); }
|
||||
|
||||
@@ -94,9 +94,15 @@ int remove (const char* path);
|
||||
int create_volume (const char* key, int fs_type, const char* device_key);
|
||||
|
||||
/* Set environment variable */
|
||||
int env_set (const char* key, void* buffer, size_t len);
|
||||
int env_set (int pid, const char* key, void* buffer, size_t len);
|
||||
|
||||
/* Get environment variable */
|
||||
int env_get (const char* key, void* buffer, size_t len);
|
||||
int env_get (int pid, const char* key, void* buffer, size_t len);
|
||||
|
||||
/* Prepare process for execution */
|
||||
int exec_partial (const char* volume, const char* path);
|
||||
|
||||
/* Finish process for execution - run it! */
|
||||
int exec_partial_fini (int pid);
|
||||
|
||||
#endif // _LIBMSL_M_SYSTEM_H
|
||||
|
||||
Reference in New Issue
Block a user