diff options
author | Ondrej Čerman <ondrej.cerman@gmail.com> | 2019-07-07 11:29:53 +0200 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-07-10 12:25:23 -0700 |
commit | 15b554571ca140195cedbf8bcb7805c1a64f3a59 (patch) | |
tree | ef7b5c85b05aa61328b40accb64f253f49886a84 /modules | |
parent | 51b6b209d270a646e82a70e9ea8450af6902504d (diff) |
devices/storage: small fixes
Diffstat (limited to 'modules')
-rw-r--r-- | modules/devices/storage.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/devices/storage.c b/modules/devices/storage.c index 9fd576a2..a56da832 100644 --- a/modules/devices/storage.c +++ b/modules/devices/storage.c @@ -1,6 +1,7 @@ /* * HardInfo - Displays System Information * Copyright (C) 2003-2006 Leandro A. F. Pereira <leandro@hardinfo.org> + * modified by Ondrej Čerman (2019) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,7 +30,7 @@ gboolean __scan_udisks2_devices(void) { udiskd *disk; udiskp *part; gchar *udisks2_storage_list = NULL, *features = NULL, *moreinfo = NULL; - gchar *devid, *label, *tmp = NULL, *media_comp = NULL; + gchar *devid, *label, *size, *tmp = NULL, *media_comp = NULL; const gchar *url, *vendor_str, *media_label, *icon, *media_curr = NULL; int n = 0, i, j; @@ -168,6 +169,7 @@ gboolean __scan_udisks2_devices(void) { vendor_get_name(vendor_str)); } + size = size_human_readable((gfloat) disk->size); moreinfo = h_strdup_cprintf(_("Revision=%s\n" "Block Device=%s\n" "Serial=%s\n" @@ -177,11 +179,12 @@ gboolean __scan_udisks2_devices(void) { disk->revision, disk->block_dev, disk->serial, - size_human_readable((gfloat) disk->size), + size, features); + g_free(size); if (disk->rotation_rate > 0) { - moreinfo = h_strdup_cprintf(_("Rotation Rate=%d\n"), moreinfo, disk->rotation_rate); + moreinfo = h_strdup_cprintf(_("Rotation Rate=%d RPM\n"), moreinfo, disk->rotation_rate); } if (media_comp || media_curr) { moreinfo = h_strdup_cprintf(_("Media=%s\n" |