diff options
author | WlodekM <[email protected]> | 2025-02-18 12:27:09 +0200 |
---|---|---|
committer | WlodekM <[email protected]> | 2025-02-18 12:27:09 +0200 |
commit | 3ff89680eb8e7309e879001de5b2d0f33e0cdae1 (patch) | |
tree | f21bd5d2a773f96bf259891d21fb04f8184aeb65 /sbin/fdmaker/fdmaker.c | |
parent | 235001629adf67f173ae4db28eb42a301f9de878 (diff) |
uuuuuh wip hard drives thing
Diffstat (limited to 'sbin/fdmaker/fdmaker.c')
-rw-r--r-- | sbin/fdmaker/fdmaker.c | 12 |
1 files changed, 11 insertions, 1 deletions
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 <sys/types.h> #include <sys/stat.h> #include <sys/sysmacros.h> +#include <string.h> 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 |