diff --git a/src/bin/Jamfile b/src/bin/Jamfile index 3165feb9f9..30bdae6dad 100644 --- a/src/bin/Jamfile +++ b/src/bin/Jamfile @@ -35,7 +35,6 @@ StdBinCommands error.c fortune.c finddir.c - fstrim.cpp get_driver_settings.cpp hd.c listarea.c @@ -113,6 +112,11 @@ if $(TARGET_PLATFORM) = libbe_test { : tests!apps ; } +# standard commands that need libbe.so, libshared.a +StdBinCommands + fstrim.cpp + : shared be : $(haiku-utils_rsrc) ; + # standard commands that need libbe.so and libsupc++.so StdBinCommands alert.cpp diff --git a/src/bin/fstrim.cpp b/src/bin/fstrim.cpp index c91b22d2c4..b29138bb56 100644 --- a/src/bin/fstrim.cpp +++ b/src/bin/fstrim.cpp @@ -19,6 +19,7 @@ #include #include +#include static struct option const kLongOptions[] = { @@ -262,9 +263,14 @@ main(int argc, char** argv) retval = EXIT_FAILURE; } - printf("Trimmed %" B_PRIu64 " bytes from device%s.\n", - trimData.trimmed_size, - retval == EXIT_SUCCESS ? "" : " (number may be inaccurate)"); + if (retval == EXIT_SUCCESS || trimData.trimmed_size > 0) { + char trimmedSize[128]; + string_for_size(trimData.trimmed_size, trimmedSize, 128); + + printf("Trimmed %" B_PRIu64 " bytes (%s) from device%s.\n", + trimData.trimmed_size, trimmedSize, + retval == EXIT_SUCCESS ? "" : " (number may be inaccurate)"); + } return retval; }