1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:47:34 +00:00

Userland: Fix printf specifiers with off_t

In theory we should probably use the 'j' qualifier, but we don't
support it.
This commit is contained in:
Jean-Baptiste Boric 2021-03-13 22:03:26 +01:00 committed by Andreas Kling
parent 7a079f7780
commit ade6343fca
3 changed files with 3 additions and 3 deletions

View file

@ -240,7 +240,7 @@ void Client::handle_directory_listing(const String& requested_path, const String
builder.append(escape_html_entities(name)); builder.append(escape_html_entities(name));
builder.append("</a></td><td>&nbsp;</td>"); builder.append("</a></td><td>&nbsp;</td>");
builder.appendf("<td>%10zd</td><td>&nbsp;</td>", st.st_size); builder.appendf("<td>%10lld</td><td>&nbsp;</td>", st.st_size);
builder.append("<td>"); builder.append("<td>");
builder.append(Core::DateTime::from_timestamp(st.st_mtime).to_string()); builder.append(Core::DateTime::from_timestamp(st.st_mtime).to_string());
builder.append("</td>"); builder.append("</td>");

View file

@ -312,7 +312,7 @@ static bool print_filesystem_object(const String& path, const String& name, cons
if (flag_human_readable) { if (flag_human_readable) {
printf(" %10s ", human_readable_size((size_t)st.st_size).characters()); printf(" %10s ", human_readable_size((size_t)st.st_size).characters());
} else { } else {
printf(" %10zd ", st.st_size); printf(" %10lld ", st.st_size);
} }
} }

View file

@ -48,7 +48,7 @@ static int stat(const char* file, bool should_follow_links)
if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode))
printf(" Device: %u,%u\n", major(st.st_rdev), minor(st.st_rdev)); printf(" Device: %u,%u\n", major(st.st_rdev), minor(st.st_rdev));
else else
printf(" Size: %zd\n", st.st_size); printf(" Size: %lld\n", st.st_size);
printf(" Links: %u\n", st.st_nlink); printf(" Links: %u\n", st.st_nlink);
printf(" Blocks: %u\n", st.st_blocks); printf(" Blocks: %u\n", st.st_blocks);
printf(" UID: %u", st.st_uid); printf(" UID: %u", st.st_uid);