From 15b554571ca140195cedbf8bcb7805c1a64f3a59 Mon Sep 17 00:00:00 2001 From: Ondrej Čerman Date: Sun, 7 Jul 2019 11:29:53 +0200 Subject: devices/storage: small fixes --- modules/devices/storage.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modules/devices') 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 + * 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" -- cgit v1.2.3