Meta: Scale back overly informal user-facing strings

We were getting a little overly memey in some places, so let's scale
things back to business-casual.

Informal language is fine in comments, commits and debug logs,
but let's keep the runtime nice and presentable. :^)
This commit is contained in:
Andreas Kling 2020-06-17 18:20:28 +02:00
parent d7bf609376
commit 723f4e5ee6
Notes: sideshowbarker 2024-07-19 05:35:53 +09:00
8 changed files with 15 additions and 33 deletions

View file

@ -1,5 +1,5 @@
root:x:0:
goodboys:x:1:anon
wheel:x:1:anon
tty:x:2:
phys:x:3:window,anon
audio:x:4:anon

View file

@ -176,7 +176,7 @@ void handle_crash(RegisterState& regs, const char* description, int signal, bool
dump(regs);
if (Process::current->is_ring0()) {
klog() << "Oh shit, we've crashed in ring 0 :(";
klog() << "Crash in ring 0 :(";
dump_backtrace();
hang();
}
@ -819,7 +819,7 @@ void cpu_setup()
if (g_cpu_supports_rdrand) {
klog() << "x86: Using RDRAND for good randomness";
} else {
klog() << "x86: No RDRAND support detected. Randomness will be shitty";
klog() << "x86: No RDRAND support detected, randomness will be poor";
}
}

View file

@ -142,7 +142,7 @@ void* kmalloc_impl(size_t size)
if (g_kmalloc_bytes_free < real_size) {
Kernel::dump_backtrace();
klog() << "kmalloc(): PANIC! Out of memory (sucks, dude)\nsum_free=" << g_kmalloc_bytes_free << ", real_size=" << real_size;
klog() << "kmalloc(): PANIC! Out of memory\nsum_free=" << g_kmalloc_bytes_free << ", real_size=" << real_size;
Kernel::hang();
}

View file

@ -190,7 +190,7 @@ int OptionParser::handle_short_option()
bool ok = lookup_short_option(option, needs_value);
if (!ok) {
optopt = option;
report_error("Unrecognized option \033[1m-%c\033[22m, dude", option);
report_error("Unrecognized option \033[1m-%c\033[22m", option);
return '?';
}
@ -218,7 +218,7 @@ int OptionParser::handle_short_option()
optarg = m_argv[m_arg_index + 1];
m_consumed_args = 2;
} else {
report_error("Missing value for option \033[1m-%c\033[22m, dude", option);
report_error("Missing value for option \033[1m-%c\033[22m", option);
return '?';
}
}
@ -266,7 +266,7 @@ int OptionParser::handle_long_option()
auto* option = lookup_long_option(m_argv[m_arg_index] + 2);
if (!option) {
report_error("Unrecognized option \033[1m%s\033[22m, dude", m_argv[m_arg_index]);
report_error("Unrecognized option \033[1m%s\033[22m", m_argv[m_arg_index]);
return '?';
}
// lookup_long_option() will also set optarg if the value of the option is
@ -278,7 +278,7 @@ int OptionParser::handle_long_option()
switch (option->has_arg) {
case no_argument:
if (optarg) {
report_error("Option \033[1m--%s\033[22m doesn't accept an argument, dude", option->name);
report_error("Option \033[1m--%s\033[22m doesn't accept an argument", option->name);
return '?';
}
m_consumed_args = 1;
@ -295,7 +295,7 @@ int OptionParser::handle_long_option()
optarg = m_argv[m_arg_index + 1];
m_consumed_args = 2;
} else {
report_error("Missing value for option \033[1m--%s\033[22m, dude", option->name);
report_error("Missing value for option \033[1m--%s\033[22m", option->name);
return '?';
}
break;

View file

@ -2,7 +2,7 @@
set -e
goodboys_gid=1
wheel_gid=1
tty_gid=2
phys_gid=3
audio_gid=4
@ -36,8 +36,8 @@ chmod 660 mnt/etc/WindowServer/WindowServer.ini
chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini
echo "/bin/sh" > mnt/etc/shells
chown 0:$goodboys_gid mnt/bin/su
chown 0:$goodboys_gid mnt/bin/KeyboardSettings
chown 0:$wheel_gid mnt/bin/su
chown 0:$wheel_gid mnt/bin/KeyboardSettings
chown 0:$phys_gid mnt/bin/shutdown
chown 0:$phys_gid mnt/bin/reboot
chown 0:0 mnt/boot/Kernel

View file

@ -78,7 +78,7 @@ void Client::handle_request(ByteBuffer raw_request)
}
if (request.method() != HTTP::HttpRequest::Method::GET) {
send_error_response(403, "Forbidden, bro!", request);
send_error_response(403, "Forbidden!", request);
return;
}
@ -115,7 +115,7 @@ void Client::handle_request(ByteBuffer raw_request)
auto file = Core::File::construct(real_path);
if (!file->open(Core::File::ReadOnly)) {
send_error_response(404, "Not found, bro!", request);
send_error_response(404, "Not found!", request);
return;
}

View file

@ -339,7 +339,7 @@ int Shell::builtin_exit(int, const char**)
{
if (!jobs.is_empty()) {
if (!m_should_ignore_jobs_on_next_exit) {
printf("Shell: Hey dude, you have %zu active job%s, run 'exit' again to really exit.\n", jobs.size(), jobs.size() > 1 ? "s" : "");
printf("Shell: You have %zu active job%s, run 'exit' again to really exit.\n", jobs.size(), jobs.size() > 1 ? "s" : "");
m_should_ignore_jobs_on_next_exit = true;
return 1;
}

View file

@ -35,21 +35,6 @@
#include <string.h>
#include <unistd.h>
bool detect_useless_use_of_cat(int argc)
{
// I can think of somewhat valid uses of zero-argument cat
// from a tty to a pipe, so let's allow those.
if (argc != 2)
return false;
struct stat statbuf;
int rc = fstat(1, &statbuf);
if (rc < 0)
return false;
return S_ISFIFO(statbuf.st_mode);
}
int main(int argc, char** argv)
{
if (pledge("stdio rpath", nullptr) < 0) {
@ -63,9 +48,6 @@ int main(int argc, char** argv)
args_parser.add_positional_argument(paths, "File path", "path", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);
if (detect_useless_use_of_cat(argc))
fprintf(stderr, "\033[34;1mMeow! Useless use of cat detected\033[0m\n");
Vector<int> fds;
if (!paths.is_empty()) {
for (const char* path : paths) {