diff options
Diffstat (limited to 'web/attachments/187009-check_disk.diff')
| -rw-r--r-- | web/attachments/187009-check_disk.diff | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/web/attachments/187009-check_disk.diff b/web/attachments/187009-check_disk.diff new file mode 100644 index 0000000..bc98702 --- /dev/null +++ b/web/attachments/187009-check_disk.diff | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | 60a61,63 | ||
| 2 | > /* If nonzero, display percents as % of space used rather than free */ | ||
| 3 | > static int show_used_pct = 0; | ||
| 4 | > | ||
| 5 | 160c163 | ||
| 6 | < double dused_inodes_percent; | ||
| 7 | --- | ||
| 8 | > double dused_inodes_percent, dfree_inodes_percent; | ||
| 9 | 249a253 | ||
| 10 | > dfree_inodes_percent = 100 - dused_inodes_percent; | ||
| 11 | 278,286d281 | ||
| 12 | < | ||
| 13 | < | ||
| 14 | < | ||
| 15 | < | ||
| 16 | < /* Moved this computation up here so we can add it | ||
| 17 | < * to perf */ | ||
| 18 | < inode_space_pct = (1 - dused_inodes_percent) * 100; | ||
| 19 | < | ||
| 20 | < | ||
| 21 | 304c299 | ||
| 22 | < dfree_pct); | ||
| 23 | --- | ||
| 24 | > (show_used_pct ? dused_pct : dfree_pct)); | ||
| 25 | 308c303 | ||
| 26 | < asprintf(&output, "%s inode=%.0f%%);", output, (1 - dused_inodes_percent) * 100); | ||
| 27 | --- | ||
| 28 | > asprintf(&output, "%s inode=%.0f%%);", output, (show_used_pct ? dused_inodes_percent : dfree_inodes_percent) ); | ||
| 29 | 385a381 | ||
| 30 | > {"used", no_argument, 0, 'f'}, | ||
| 31 | 404c400 | ||
| 32 | < c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklME", longopts, &option); | ||
| 33 | --- | ||
| 34 | > c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklMEU", longopts, &option); | ||
| 35 | 548a545,547 | ||
| 36 | > case 'U': /* Display output percentage as % free */ | ||
| 37 | > show_used_pct = 1; | ||
| 38 | > break; | ||
| 39 | 720a720,721 | ||
| 40 | > printf (" %s\n", "-U --used"); | ||
| 41 | > printf (" %s\n", _("Display output percentage as % free")); | ||
| 42 | 737c738 | ||
| 43 | < printf ("[-m] [-e] [-W limit] [-K limit] [-v] [-q] [-E]\n"); | ||
| 44 | --- | ||
| 45 | > printf ("[-m] [-e] [-W limit] [-K limit] [-v] [-q] [-E] [-U]\n"); | ||
