| 460 | } |
| 461 | |
| 462 | long SysChdir(regs64_t* r){ |
| 463 | if(SC_ARG0(r)){ |
| 464 | char* path = fs::CanonicalizePath((char*)SC_ARG0(r), Scheduler::GetCurrentProcess()->workingDir); |
| 465 | FsNode* n = fs::ResolvePath(path); |
| 466 | if(!n) { |
| 467 | Log::Warning("chdir: Could not find %s", path); |
| 468 | return -1; |
| 469 | } else if (n->flags != FS_NODE_DIRECTORY){ |
| 470 | return -ENOTDIR; |
| 471 | } |
| 472 | strcpy(Scheduler::GetCurrentProcess()->workingDir, path); |
| 473 | } else Log::Warning("chdir: Invalid path string"); |
| 474 | return 0; |
| 475 | } |
| 476 | |
| 477 | long SysTime(regs64_t* r){ |
| 478 | return 0; |
nothing calls this directly
no test coverage detected