diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-05-22 12:11:05 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-05-22 12:11:05 +0000 |
commit | ccfcc4622733b446d103146acb704ab73fbfbfe4 (patch) | |
tree | 5f2496b74bc9c579c7ebe8b05487c5cf54e40275 /hardinfo2/arch/linux/common/samba.h | |
parent | d056982a830fbebe98966876697ec724d01c14a6 (diff) |
Add NFS shares information
Diffstat (limited to 'hardinfo2/arch/linux/common/samba.h')
-rw-r--r-- | hardinfo2/arch/linux/common/samba.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hardinfo2/arch/linux/common/samba.h b/hardinfo2/arch/linux/common/samba.h index 538659a6..9da8518b 100644 --- a/hardinfo2/arch/linux/common/samba.h +++ b/hardinfo2/arch/linux/common/samba.h @@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static gchar *shares_list = NULL; +static gchar *smb_shares_list = NULL; void -scan_shared_directories(void) +scan_samba_shared_directories(void) { GKeyFile *keyfile; GError *error = NULL; @@ -26,14 +26,14 @@ scan_shared_directories(void) gchar *smbconf; gsize length; - if (shares_list) { - g_free(shares_list); + if (smb_shares_list) { + g_free(smb_shares_list); } keyfile = g_key_file_new(); if (!g_file_get_contents("/etc/samba/smb.conf", &smbconf, &length, &error)) { - shares_list = g_strdup("Cannot open /etc/samba/smb.conf=\n"); + smb_shares_list = g_strdup("Cannot open /etc/samba/smb.conf=\n"); g_error_free(error); goto cleanup; } @@ -43,12 +43,12 @@ scan_shared_directories(void) if (*_smbconf == ';') *_smbconf = '\0'; if (!g_key_file_load_from_data(keyfile, smbconf, length, 0, &error)) { - shares_list = g_strdup("Cannot parse smb.conf=\n"); + smb_shares_list = g_strdup("Cannot parse smb.conf=\n"); g_error_free(error); goto cleanup; } - shares_list = g_strdup(""); + smb_shares_list = g_strdup(""); groups = g_key_file_get_groups(keyfile, NULL); gchar **_groups = groups; @@ -60,7 +60,7 @@ scan_shared_directories(void) if (g_str_equal(available, "yes")) { gchar *path = g_key_file_get_string(keyfile, *groups, "path", NULL); - shares_list = g_strconcat(shares_list, *groups, "=", + smb_shares_list = g_strconcat(smb_shares_list, *groups, "=", path, "\n", NULL); g_free(path); } |