apps+libos+shell+wind: Correct a bunch of format strings
All checks were successful
Build and test / build (push) Successful in 1m41s
All checks were successful
Build and test / build (push) Successful in 1m41s
This commit is contained in:
parent
f9b39c5ff3
commit
7d69ac56e2
@ -95,7 +95,7 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
if (fds[i + 1].revents & POLLIN) clients[i]->check_for_messages();
|
if (fds[i + 1].revents & POLLIN) clients[i]->check_for_messages();
|
||||||
if (fds[i + 1].revents & POLLHUP)
|
if (fds[i + 1].revents & POLLHUP)
|
||||||
{
|
{
|
||||||
os::println("launch: Client %d disconnected", i);
|
os::println("launch: Client %zu disconnected", i);
|
||||||
fds.remove_at(i + 1);
|
fds.remove_at(i + 1);
|
||||||
auto client = clients.remove_at(i);
|
auto client = clients.remove_at(i);
|
||||||
client->disconnect();
|
client->disconnect();
|
||||||
|
11
apps/ls.cpp
11
apps/ls.cpp
@ -212,14 +212,15 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
if (colors)
|
if (colors)
|
||||||
{
|
{
|
||||||
os::println("%s %u %4s %4s %10lu %s%s" RESET_COLORS "%s" SYMLINK_COLOR "%s" RESET_COLORS,
|
os::println("%s %lu %4s %4s %10lu %s%s" RESET_COLORS "%s" SYMLINK_COLOR "%s" RESET_COLORS,
|
||||||
formatted_mode, st.st_nlink, owner.chars(), group.chars(), st.st_size,
|
formatted_mode, st.st_nlink, owner.chars(), group.chars(), st.st_size,
|
||||||
file_type_color(file), file.name.chars(), link.is_empty() ? "" : " -> ", link.chars());
|
file_type_color(file), file.name.chars(), link.is_empty() ? "" : " -> ", link.chars());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os::println("%s %u %4s %4s %10lu %s%s%s", formatted_mode, st.st_nlink, owner.chars(), group.chars(),
|
os::println("%s %lu %4s %4s %10lu %s%s%s", formatted_mode, st.st_nlink, owner.chars(),
|
||||||
st.st_size, file.name.chars(), link.is_empty() ? "" : " -> ", link.chars());
|
group.chars(), st.st_size, file.name.chars(), link.is_empty() ? "" : " -> ",
|
||||||
|
link.chars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -227,13 +228,13 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
auto size = TRY(to_dynamic_unit(st.st_size, 10, false, si ? Unit::SI : Unit::Binary, false));
|
auto size = TRY(to_dynamic_unit(st.st_size, 10, false, si ? Unit::SI : Unit::Binary, false));
|
||||||
if (colors)
|
if (colors)
|
||||||
{
|
{
|
||||||
os::println("%s %u %4s %4s %6s %s%s" RESET_COLORS "%s" SYMLINK_COLOR "%s" RESET_COLORS,
|
os::println("%s %lu %4s %4s %6s %s%s" RESET_COLORS "%s" SYMLINK_COLOR "%s" RESET_COLORS,
|
||||||
formatted_mode, st.st_nlink, owner.chars(), group.chars(), size.chars(),
|
formatted_mode, st.st_nlink, owner.chars(), group.chars(), size.chars(),
|
||||||
file_type_color(file), file.name.chars(), link.is_empty() ? "" : " -> ", link.chars());
|
file_type_color(file), file.name.chars(), link.is_empty() ? "" : " -> ", link.chars());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os::println("%s %u %4s %4s %6s %s%s%s", formatted_mode, st.st_nlink, owner.chars(), group.chars(),
|
os::println("%s %lu %4s %4s %6s %s%s%s", formatted_mode, st.st_nlink, owner.chars(), group.chars(),
|
||||||
size.chars(), file.name.chars(), link.is_empty() ? "" : " -> ", link.chars());
|
size.chars(), file.name.chars(), link.is_empty() ? "" : " -> ", link.chars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
os::println("%s"_sv, str.chars());
|
os::println("%s", str.chars());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
|
|
||||||
auto cmdline = TRY(String::join(command, " "));
|
auto cmdline = TRY(String::join(command, " "));
|
||||||
|
|
||||||
os::println("%s %d.%.2ds user %d.%.2ds system"_sv, cmdline.chars(), usage.ru_utime.tv_sec,
|
os::println("%s %ld.%.2lds user %ld.%.2lds system", cmdline.chars(), usage.ru_utime.tv_sec,
|
||||||
usage.ru_utime.tv_usec / 10000, usage.ru_stime.tv_sec, usage.ru_stime.tv_usec / 10000);
|
usage.ru_utime.tv_usec / 10000, usage.ru_stime.tv_sec, usage.ru_stime.tv_usec / 10000);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -23,7 +23,7 @@ namespace os::SharedMemory
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
int olderr = errno;
|
int olderr = errno;
|
||||||
os::eprintln("os: could not create shared memory region: shm_open failed (%s) - %s", path,
|
os::eprintln("os: could not create shared memory region: shm_open failed (%s) - %s", path.chars(),
|
||||||
strerror(olderr));
|
strerror(olderr));
|
||||||
return err(olderr);
|
return err(olderr);
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
if (maybe_cmd.error() == EINTR)
|
if (maybe_cmd.error() == EINTR)
|
||||||
{
|
{
|
||||||
os::println("");
|
os::print("\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return maybe_cmd.release_error();
|
return maybe_cmd.release_error();
|
||||||
@ -200,7 +200,7 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
int sig = WTERMSIG(status);
|
int sig = WTERMSIG(status);
|
||||||
if (sig != SIGINT && sig != SIGQUIT) os::println("[sh] Process %d exited: %s", child, strsignal(sig));
|
if (sig != SIGINT && sig != SIGQUIT) os::println("[sh] Process %d exited: %s", child, strsignal(sig));
|
||||||
else
|
else
|
||||||
os::println("");
|
os::print("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
if (fds[i + 4].revents & POLLHUP) clients[i]->should_be_disconnected = true;
|
if (fds[i + 4].revents & POLLHUP) clients[i]->should_be_disconnected = true;
|
||||||
if (clients[i]->should_be_disconnected)
|
if (clients[i]->should_be_disconnected)
|
||||||
{
|
{
|
||||||
os::println("wind: Client %d disconnected", i);
|
os::println("wind: Client %zu disconnected", i);
|
||||||
fds.remove_at(i + 4);
|
fds.remove_at(i + 4);
|
||||||
auto client = clients.remove_at(i);
|
auto client = clients.remove_at(i);
|
||||||
client->conn->disconnect();
|
client->conn->disconnect();
|
||||||
|
Loading…
Reference in New Issue
Block a user