apps: Remove pivot_root
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:
apio 2023-09-04 13:12:55 +02:00
parent 0002c2314c
commit 15f4f7c72f
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 0 additions and 20 deletions

View File

@ -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)

View File

@ -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);
}