From 053c6f0d9f1894fb6a7ada060600f464dafc43d5 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Tue, 2 Mar 2021 20:43:19 -0500 Subject: removing stub for special handling of 'sd' prefix in file paths from knob passing a path with an 'sd' prefix will now act like any other path on the first drive, instead of closing the calling program. eventually, i will add a system of mounting drives directly into a file hierarchy (like in unix), and have all of the system calls just pass a path, no drive number --- src/user/knob/task.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/user/knob/task.c') diff --git a/src/user/knob/task.c b/src/user/knob/task.c index 9a49386..9bf2c83 100644 --- a/src/user/knob/task.c +++ b/src/user/knob/task.c @@ -8,21 +8,18 @@ #include _task_handle_t run_command(const char *path, _task_handle_t stdio_task) { - uint8_t dn; - path = remove_prefix(path, &dn); - for (const char *ptr = path; *ptr; ++ptr) if (*ptr == ' ') { char *new_path = get_block(ptr - path + 1); blockcpy(new_path, path, ptr - path); new_path[ptr - path] = '\0'; - _task_handle_t handle = _start_task(dn, new_path, ptr + 1, stdio_task); + _task_handle_t handle = _start_task(0, new_path, ptr + 1, stdio_task); free_block(new_path); return handle; } - return _start_task(dn, path, "", stdio_task); + return _start_task(0, path, "", stdio_task); } bool try_run_command_blocking(const char *path, _task_handle_t stdio_task) { -- cgit v1.2.3