From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19690 invoked by alias); 23 Jan 2009 14:21:05 -0000 Received: (qmail 19679 invoked by alias); 23 Jan 2009 14:21:04 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_63,J_CHICKENPOX_65,KAM_MX,SPF_HELO_PASS X-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_63,J_CHICKENPOX_65,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com Subject: gfs2-utils: master - libgfs2: Remove three unused functions To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: gfs2-utils.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3f5cef5f0a2c363fb874d7b25dabb306b3261bf2 X-Git-Newrev: 2c16b529ad7a362d64f56e95609c44de8428eec4 From: Steven Whitehouse Message-Id: <20090123142039.A43CFC024D@lists.fedorahosted.org> Date: Fri, 23 Jan 2009 14:21:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00229.txt.bz2 Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=2c16b529ad7a362d64f56e95609c44de8428eec4 Commit: 2c16b529ad7a362d64f56e95609c44de8428eec4 Parent: 3f5cef5f0a2c363fb874d7b25dabb306b3261bf2 Author: Steven Whitehouse AuthorDate: Fri Jan 23 13:20:03 2009 +0000 Committer: Steven Whitehouse CommitterDate: Fri Jan 23 13:20:03 2009 +0000 libgfs2: Remove three unused functions These were used in gfs1, but are not currently used by anything in gfs2. Signed-off-by: Steven Whitehouse --- 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; -}