apps: Remove pivot_root
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This functionality is intended to be used only by preinit, so it doesn't make sense to make it a command-line utility.
This commit is contained in:
parent
0002c2314c
commit
15f4f7c72f
@ -35,7 +35,6 @@ luna_app(time.cpp time)
|
||||
luna_app(ln.cpp ln)
|
||||
luna_app(mktemp.cpp mktemp)
|
||||
luna_app(sysfuzz.cpp sysfuzz)
|
||||
luna_app(pivot_root.cpp pivot_root)
|
||||
luna_app(cp.cpp cp)
|
||||
luna_app(kill.cpp kill)
|
||||
luna_app(gol.cpp gol)
|
||||
|
@ -1,19 +0,0 @@
|
||||
#include <os/ArgumentParser.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Result<int> luna_main(int argc, char** argv)
|
||||
{
|
||||
StringView new_root;
|
||||
StringView put_old;
|
||||
|
||||
os::ArgumentParser parser;
|
||||
parser.add_description("Move the current root directory to another directory and replace it with another mount.");
|
||||
parser.add_system_program_info("pivot_root"_sv);
|
||||
parser.add_positional_argument(new_root, "new_root", true);
|
||||
parser.add_positional_argument(put_old, "put_old", true);
|
||||
parser.parse(argc, argv);
|
||||
|
||||
long rc = syscall(SYS_pivot_root, new_root.chars(), put_old.chars());
|
||||
return Result<int>::from_syscall(rc);
|
||||
}
|
Loading…
Reference in New Issue
Block a user