diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 00:35:53 -0300 | 
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 00:35:53 -0300 | 
| commit | 5f01c706267c595de92406a32e7f31ef5056c2d0 (patch) | |
| tree | d1e74ef54efc41ada622900fe3e2a50dee44a237 /modules/computer/filesystem.c | |
| parent | 09fcc751ef158898c315ebc9299a0fa3a722d914 (diff) | |
New upstream version 2.0.3preupstream/2.0.3pre
Diffstat (limited to 'modules/computer/filesystem.c')
| -rw-r--r-- | modules/computer/filesystem.c | 13 | 
1 files changed, 8 insertions, 5 deletions
| 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 <leandro@hardinfo.org> + *    Copyright (C) 2003-2006 L. A. F. Pereira <l@tia.mat.br>   *   *    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); | 
