From 3ff89680eb8e7309e879001de5b2d0f33e0cdae1 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Tue, 18 Feb 2025 12:27:09 +0200 Subject: uuuuuh wip hard drives thing --- sbin/fdmaker/fdmaker.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sbin') diff --git a/sbin/fdmaker/fdmaker.c b/sbin/fdmaker/fdmaker.c index 7591147..95ef98c 100644 --- a/sbin/fdmaker/fdmaker.c +++ b/sbin/fdmaker/fdmaker.c @@ -6,6 +6,7 @@ #include #include #include +#include int main() { // make process be sigma (why did i think of this) @@ -27,6 +28,15 @@ int main() { write(2, "ioctl TIOCSCTTY", 16); exit(1); } + char path[128] = {0}; + int len = write(fd, "\nEnter path to shell (nothing for /bin/shel): ", 47); + path[len - 1] = '\0'; + read(0, path, sizeof(path)); + if (len == 47) { + strcpy(path, "/bin/shel"); + } + // write(1, path, strlen(path)); write(fd, "\e[2J\e[0;0Hwelcome to nyaOS - a distro made by an idiot with no C experience that still somehow works\n\n", 103); - execve("/bin/shel", 0, 0); + + execve(path, 0, 0); } \ No newline at end of file -- cgit 1.4.1-2-gfad0