From 5f01c706267c595de92406a32e7f31ef5056c2d0 Mon Sep 17 00:00:00 2001 From: Lucas de Castro Borges Date: Mon, 22 Apr 2024 00:35:53 -0300 Subject: New upstream version 2.0.3pre --- modules/computer/filesystem.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'modules/computer/filesystem.c') diff --git a/modules/computer/filesystem.c b/modules/computer/filesystem.c index 397dc636..e9c84811 100644 --- a/modules/computer/filesystem.c +++ b/modules/computer/filesystem.c @@ -1,10 +1,10 @@ /* * HardInfo - Displays System Information - * Copyright (C) 2003-2006 Leandro A. F. Pereira + * Copyright (C) 2003-2006 L. A. F. Pereira * * 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 - * the Free Software Foundation, version 2. + * the Free Software Foundation, version 2 or later. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -71,6 +71,8 @@ scan_filesystems(void) gchar *strhash; + gboolean rw = strstr(tmp[3], "rw") != NULL; + strreplacechr(tmp[0], "#", '_'); strhash = g_strdup_printf("[%s]\n" "%s=%s\n" @@ -81,7 +83,7 @@ scan_filesystems(void) "%s=%s\n", tmp[0], /* path */ _("Filesystem"), tmp[2], - _("Mounted As"), ( strstr(tmp[3], "rw") != NULL) ? _("Read-Write") : _("Read-Only"), + _("Mounted As"), rw ? _("Read-Write") : _("Read-Only"), _("Mount Point"), tmp[1], _("Size"), strsize, _("Used"), strused, @@ -90,9 +92,10 @@ scan_filesystems(void) moreinfo_add_with_prefix("COMP", key, strhash); g_free(key); - fs_list = h_strdup_cprintf("$FS%d$%s=%.2f %% (%s of %s)|%s\n", + fs_list = h_strdup_cprintf("$FS%d$%s%s=%.2f %% (%s of %s)|%s\n", fs_list, - count, tmp[0], use_ratio, stravail, strsize, tmp[1]); + count, tmp[0], rw ? "" : "🔒", + use_ratio, stravail, strsize, tmp[1]); g_free(strsize); g_free(stravail); -- cgit v1.2.3