From 720f5023a8f68aaaa54cb6b7bf46efee23b5b4c3 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 19 Jun 2017 14:38:35 -0500 Subject: Import Upstream version 0.4.1 --- arch/linux/common/.svn/text-base/nfs.h.svn-base | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 arch/linux/common/.svn/text-base/nfs.h.svn-base (limited to 'arch/linux/common/.svn/text-base/nfs.h.svn-base') diff --git a/arch/linux/common/.svn/text-base/nfs.h.svn-base b/arch/linux/common/.svn/text-base/nfs.h.svn-base new file mode 100644 index 00000000..5ae22797 --- /dev/null +++ b/arch/linux/common/.svn/text-base/nfs.h.svn-base @@ -0,0 +1,29 @@ +static gchar *nfs_shares_list = NULL; +void +scan_nfs_shared_directories(void) +{ + FILE *exports; + gchar buf[512]; + + if (nfs_shares_list) { + g_free(nfs_shares_list); + } + + nfs_shares_list = g_strdup(""); + + exports = fopen("/etc/exports", "r"); + if (!exports) + return; + + while (fgets(buf, 512, exports)) { + if (buf[0] != '/') + continue; + + strend(buf, ' '); + strend(buf, '\t'); + + nfs_shares_list = g_strconcat(nfs_shares_list, buf, "=\n", NULL); + } + fclose(exports); +} + -- cgit v1.2.3