1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

Add /proc/mm and a /bin/mm utility that just dumps it.

This shows some info about the MM. Right now it's just the zone count
and the number of free physical pages. Lots more can be added.

Also added "exit" to sh so we can nest shells and exit from them.

I also noticed that we were leaking all the physical pages, so fixed that.
This commit is contained in:
Andreas Kling 2018-10-28 10:26:07 +01:00
parent 0a6a2521e8
commit c76dc9a047
10 changed files with 115 additions and 21 deletions

View file

@ -26,6 +26,13 @@ static int sh_pwd(int, const char**)
return 0;
}
static int sh_exit(int, const char**)
{
printf("Good-bye!\n");
exit(0);
return 0;
}
static int sh_cd(int argc, const char** argv)
{
if (argc == 1) {
@ -77,6 +84,10 @@ static bool handle_builtin(int argc, const char** argv, int& retval)
retval = sh_pwd(argc, argv);
return true;
}
if (!strcmp(argv[0], "exit")) {
retval = sh_exit(argc, argv);
return true;
}
return false;
}