-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[orbis-kernel] implement unlink, nmount/unmount nullfs
- Loading branch information
Showing
8 changed files
with
161 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
#include "sys/sysproto.hpp" | ||
#include "uio.hpp" | ||
#include "utils/Logs.hpp" | ||
|
||
orbis::SysResult orbis::sys_mount(Thread *thread, ptr<char> type, | ||
ptr<char> path, sint flags, caddr_t data) { | ||
return ErrorCode::NOSYS; | ||
} | ||
|
||
orbis::SysResult orbis::sys_unmount(Thread *thread, ptr<char> path, | ||
sint flags) { | ||
if (auto unmount = thread->tproc->ops->unmount) { | ||
return unmount(thread, path, flags); | ||
} | ||
|
||
return ErrorCode::NOSYS; | ||
} | ||
|
||
orbis::SysResult orbis::sys_nmount(Thread *thread, ptr<IoVec> iovp, uint iovcnt, | ||
sint flags) { | ||
ORBIS_LOG_ERROR(__FUNCTION__, iovp, iovcnt, flags); | ||
|
||
for (auto it = iovp; it < iovp + iovcnt; it += 2) { | ||
IoVec a{}, b{}; | ||
uread(a, it); | ||
uread(b, it + 1); | ||
|
||
std::string aSv((char *)a.base, a.len); | ||
std::string bSv((char *)b.base, b.len); | ||
|
||
std::fprintf(stderr, "%s: '%s':'%s'\n", __FUNCTION__, aSv.c_str(), bSv.c_str()); | ||
if (auto nmount = thread->tproc->ops->nmount) { | ||
return nmount(thread, iovp, iovcnt, flags); | ||
} | ||
return {}; | ||
|
||
return ErrorCode::NOSYS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters