mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-22 03:02:06 +03:00
Ticket #3214: avoid invalid free nodes display.
nfree and nodes can be -1. Don't print such numbers at info panel. Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f74754c03d
commit
bcbea25234
@ -149,8 +149,13 @@ info_show_info (WInfo * info)
|
|||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
widget_move (w, 16, 3);
|
widget_move (w, 16, 3);
|
||||||
if (myfs_stats.nfree == 0 && myfs_stats.nodes == 0)
|
if ((myfs_stats.nfree == 0 && myfs_stats.nodes == 0) ||
|
||||||
|
(myfs_stats.nfree == (uintmax_t) (-1) && myfs_stats.nodes == (uintmax_t) (-1)))
|
||||||
tty_print_string (_("No node information"));
|
tty_print_string (_("No node information"));
|
||||||
|
else if (myfs_stats.nfree == (uintmax_t) (-1))
|
||||||
|
tty_printf ("%s -/%" PRIuMAX, _("Free nodes:"), myfs_stats.nodes);
|
||||||
|
else if (myfs_stats.nodes == (uintmax_t) (-1))
|
||||||
|
tty_printf ("%s %" PRIuMAX "/-", _("Free nodes:"), myfs_stats.nfree);
|
||||||
else
|
else
|
||||||
tty_printf ("%s %" PRIuMAX "/%" PRIuMAX " (%d%%)",
|
tty_printf ("%s %" PRIuMAX "/%" PRIuMAX " (%d%%)",
|
||||||
_("Free nodes:"),
|
_("Free nodes:"),
|
||||||
|
Loading…
Reference in New Issue
Block a user