Displaying 3 results from an estimated 3 matches for "human_size_longest".
2023 Oct 06
2
[libnbd PATCH 0/2] Improve nbdinfo display of block constraints
Based on Laszlo's approval of my idea here:
https://listman.redhat.com/archives/libguestfs/2023-September/032661.html
but as I would like to resync human-size.h back to nbdkit, I'm
reluctant to apply patch 1 this until I get Rich's consent to
relicensing (this email serves as my consent for my contribution here):
https://listman.redhat.com/archives/libguestfs/2023-October/032755.html
2023 Sep 03
5
[PATCH libnbd 0/5] copy: Allow human sizes for --queue-size, etc
See companion patch:
Subject: [PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include
This is the second part of the patch. It adds the new
human_size_parse function to libnbd and then uses it for parsing
--queue-size, --request-size and --sparse.
The main complication here is that there was already a
common/utils/human-size.h header which ends up (eventually)
2023 Oct 08
1
[libnbd PATCH 2/2] info: Show human sizes for block_size values
...if (first)
>> @@ -304,6 +301,21 @@ show_boolean (const char *name, bool cond)
>> ansi_restore (fp);
>> }
>>
>> +/* Used for displaying sizes in non-JSON output. */
>> +void show_size (const char *name, int64_t size)
>> +{
>> + char size_str[HUMAN_SIZE_LONGEST];
>> + bool human_size_flag = false;
>> +
>> + if (size > 0) {
>> + human_size (size_str, size, &human_size_flag);
>> + if (human_size_flag)
>> + fprintf (fp, "\t%s: %" PRId64 " (%s)\n", name, size, size_str);
>> +...