diff options
author | dzwdz | 2021-09-20 20:32:58 +0200 |
---|---|---|
committer | dzwdz | 2021-09-20 20:32:58 +0200 |
commit | d192b15ee05b6d79c1503eb296fcab693a05dced (patch) | |
tree | 2030e86317f954f67a4e3c4fc0c61798d5555ab2 /src/kernel/vfs/request.c | |
parent | 6371724809b057b25a4efd6c022e7d95068c42f1 (diff) |
create a few specialized panic()s
thanks to this i can tell which ones are placeholders, and which ones
should stay
Diffstat (limited to 'src/kernel/vfs/request.c')
-rw-r--r-- | src/kernel/vfs/request.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c index b197f4b..fcd6c47 100644 --- a/src/kernel/vfs/request.c +++ b/src/kernel/vfs/request.c @@ -33,7 +33,7 @@ int vfs_request_create(struct vfs_request req_) { vfs_request_pass2handler(req); } default: - panic(); + panic_invalid_state(); } } @@ -75,7 +75,7 @@ _Noreturn void vfs_request_pass2handler(struct vfs_request *req) { regs_savereturn(&handler->regs, req->type); process_switch(handler); fail: - panic(); // TODO + panic_unimplemented(); // TODO } int vfs_request_finish(struct vfs_request *req, int ret) { @@ -84,7 +84,8 @@ int vfs_request_finish(struct vfs_request *req, int ret) { // we need to wrap the id returned by the VFS in a handle passed to // the client handle_t handle = process_find_handle(req->caller); - if (handle < 0) panic(); + if (handle < 0) + panic_invalid_state(); // we check for free handles before the open() call req->caller->handles[handle] = (struct handle){ .type = HANDLE_FILE, .file = { |