diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2008-06-27 10:53:15 -0300 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2008-06-27 10:53:15 -0300 | 
| commit | 135dd6a9323f25ff3526cd41a5f8272e395777a6 (patch) | |
| tree | a0f84dab373c674d96eea9b12174814f5fa16ac7 /hardinfo2 | |
| parent | b38b96960aeca2adb8797c2a05b983cdae30c88c (diff) | |
Remove Human/System user distinction (can't think on a reliable way to distinguish between the two).
Diffstat (limited to 'hardinfo2')
| -rw-r--r-- | hardinfo2/arch/common/users.h | 17 | ||||
| -rw-r--r-- | hardinfo2/computer.c | 6 | 
2 files changed, 7 insertions, 16 deletions
| diff --git a/hardinfo2/arch/common/users.h b/hardinfo2/arch/common/users.h index fd8f7834..d195fe31 100644 --- a/hardinfo2/arch/common/users.h +++ b/hardinfo2/arch/common/users.h @@ -1,5 +1,4 @@ -static gchar *sys_users = NULL, -             *human_users = NULL; +static gchar *users = NULL;  static gboolean  remove_users(gpointer key, gpointer value, gpointer data) @@ -17,15 +16,13 @@ scan_users_do(void)      if (!passwd)        return; -    if (sys_users) { -      g_free(sys_users); -      g_free(human_users); +    if (users) { +      g_free(users);        g_hash_table_foreach_remove(moreinfo, remove_users, NULL);      } -    sys_users = g_strdup(""); -    human_users = g_strdup(""); +    users = g_strdup("");      while (fgets(buffer, 512, passwd)) {        gchar **tmp; @@ -44,11 +41,7 @@ scan_users_do(void)        uid = atoi(tmp[2]);        strend(tmp[4], ','); -      if (uid >= 1000 && uid <= 65530) { -        human_users = h_strdup_cprintf("$%s$%s=%s\n", human_users, key, tmp[0], tmp[4]); -      } else { -        sys_users = h_strdup_cprintf("$%s$%s=%s\n", sys_users, key, tmp[0], tmp[4]); -      }       +      users = h_strdup_cprintf("$%s$%s=%s\n", sys_users, key, tmp[0], tmp[4]);        g_strfreev(tmp);      } diff --git a/hardinfo2/computer.c b/hardinfo2/computer.c index aa99d53c..4e9a49e5 100644 --- a/hardinfo2/computer.c +++ b/hardinfo2/computer.c @@ -351,10 +351,8 @@ gchar *callback_users()      return g_strdup_printf("[$ShellParam$]\n"  			   "ReloadInterval=10000\n"  			   "ViewType=1\n" -			   "[Human Users]\n" -			   "%s\n" -			   "[System Users]\n" -			   "%s\n", human_users, sys_users); +			   "[Users]\n" +			   "%s\n", sys_users);  }  gchar *get_os_kernel(void) | 
