This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE3 - libgfs2: Remove three unused functions


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d6d5fb82d9671ab425c28da620044ecbaef43d9b
Commit:        d6d5fb82d9671ab425c28da620044ecbaef43d9b
Parent:        1dc7c61a45769777c291183148a1eb8861efab7d
Author:        Steven Whitehouse <swhiteho@redhat.com>
AuthorDate:    Fri Jan 23 13:20:03 2009 +0000
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Fri Jan 23 16:36:58 2009 +0100

libgfs2: Remove three unused functions

These were used in gfs1, but are not currently used by anything
in gfs2.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
 gfs2/libgfs2/libgfs2.h |    3 --
 gfs2/libgfs2/misc.c    |   72 ------------------------------------------------
 2 files changed, 0 insertions(+), 75 deletions(-)

diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 7fe530c..facd04c 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -642,9 +642,6 @@ char *get_list(void);
 char **str2lines(char *str);
 char *find_debugfs_mount(void);
 char *mp2fsname(char *mp);
-char *name2value(char *str, char *name);
-uint32_t name2u32(char *str, char *name);
-uint64_t name2u64(char *str, char *name);
 char *__get_sysfs(char *fsname, char *filename);
 char *get_sysfs(char *fsname, char *filename);
 unsigned int get_sysfs_uint(char *fsname, char *filename);
diff --git a/gfs2/libgfs2/misc.c b/gfs2/libgfs2/misc.c
index 61ea65b..97fd6ab 100644
--- a/gfs2/libgfs2/misc.c
+++ b/gfs2/libgfs2/misc.c
@@ -562,75 +562,3 @@ mp2fsname(char *mp)
 
 	return fsname;
 }
-
-/**
- * name2value - find the value of a name-value pair in a string
- * @str_in:
- * @name:
- *
- * Returns: the value string in a static buffer
- */
-
-char *
-name2value(char *str_in, char *name)
-{
-	char str[strlen(str_in) + 1];
-	static char value[PATH_MAX];
-	char **lines;
-	unsigned int x;
-	unsigned int len = strlen(name);
-
-	strcpy(str, str_in);
-	value[0] = 0;
-
-	lines = str2lines(str);
-
-	for (x = 0; *lines[x]; x++)
-		if (memcmp(lines[x], name, len) == 0 &&
-		    lines[x][len] == ' ') {
-			strcpy(value, lines[x] + len + 1);
-			break;
-		}
-
-	free(lines);
-
-	return value;
-}
-
-/**
- * name2u32 - find the value of a name-value pair in a string
- * @str_in:
- * @name:
- *
- * Returns: the value uint32
- */
-
-uint32_t
-name2u32(char *str, char *name)
-{
-	char *value = name2value(str, name);
-	uint32_t x = 0;
-
-	sscanf(value, "%u", &x);
-
-	return x;
-}
-
-/**
- * name2u64 - find the value of a name-value pair in a string
- * @str_in:
- * @name:
- *
- * Returns: the value uint64
- */
-
-uint64_t
-name2u64(char *str, char *name)
-{
-	char *value = name2value(str, name);
-	uint64_t x = 0;
-
-	sscanf(value, "%"SCNu64, &x);
-
-	return x;
-}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]