sh: Show hashtag on root's prompt

This commit is contained in:
apio 2023-04-08 14:47:50 +02:00
parent 059c2bfa3f
commit 46ee0eb937
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -74,7 +74,7 @@ int main(int argc, char** argv)
while (1) while (1)
{ {
if (file == "-") fputs("sh$ ", stdout); if (file == "-") fputs(getuid() == 0 ? "sh# " : "sh$ ", stdout);
char cmd[4096]; char cmd[4096];
char* rc = fgets(cmd, sizeof(cmd), f); char* rc = fgets(cmd, sizeof(cmd), f);