WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Rename memparse() to parse_size_and_unit(). A more gener

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Rename memparse() to parse_size_and_unit(). A more general-purpose
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 19 May 2005 21:11:51 +0000
Delivery-date: Thu, 19 May 2005 22:03:24 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1466.1.2, 2005/05/19 22:11:51+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Rename memparse() to parse_size_and_unit(). A more general-purpose
        name, and avoids unecessary clash with Linux function name.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 arch/x86/domain_build.c |    2 +-
 arch/x86/e820.c         |    2 +-
 common/lib.c            |    2 +-
 include/xen/lib.h       |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)


diff -Nru a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       2005-05-19 18:03:56 -04:00
+++ b/xen/arch/x86/domain_build.c       2005-05-19 18:03:56 -04:00
@@ -26,7 +26,7 @@
 static unsigned int opt_dom0_mem;
 static void parse_dom0_mem(char *s)
 {
-    unsigned long long bytes = memparse(s);
+    unsigned long long bytes = parse_size_and_unit(s);
     /* If no unit is specified we default to kB units, not bytes. */
     if ( isdigit(s[strlen(s)-1]) )
         opt_dom0_mem = (unsigned int)bytes;
diff -Nru a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c
--- a/xen/arch/x86/e820.c       2005-05-19 18:03:56 -04:00
+++ b/xen/arch/x86/e820.c       2005-05-19 18:03:56 -04:00
@@ -5,7 +5,7 @@
 
 /* opt_mem: Limit of physical RAM. Any RAM beyond this point is ignored. */
 unsigned long long opt_mem;
-static void parse_mem(char *s) { opt_mem = memparse(s); }
+static void parse_mem(char *s) { opt_mem = parse_size_and_unit(s); }
 custom_param("mem", parse_mem);
 
 struct e820map e820;
diff -Nru a/xen/common/lib.c b/xen/common/lib.c
--- a/xen/common/lib.c  2005-05-19 18:03:56 -04:00
+++ b/xen/common/lib.c  2005-05-19 18:03:56 -04:00
@@ -441,7 +441,7 @@
 
 #endif /* BITS_PER_LONG == 32 */
 
-unsigned long long memparse(char *s)
+unsigned long long parse_size_and_unit(char *s)
 {
        unsigned long long ret = simple_strtoull(s, &s, 0);
 
diff -Nru a/xen/include/xen/lib.h b/xen/include/xen/lib.h
--- a/xen/include/xen/lib.h     2005-05-19 18:03:56 -04:00
+++ b/xen/include/xen/lib.h     2005-05-19 18:03:56 -04:00
@@ -66,6 +66,6 @@
 unsigned long long simple_strtoull(
     const char *cp,char **endp, unsigned int base);
 
-unsigned long long memparse(char *s);
+unsigned long long parse_size_and_unit(char *s);
 
 #endif /* __LIB_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Rename memparse() to parse_size_and_unit(). A more general-purpose, BitKeeper Bot <=