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-devel

[Xen-devel] [PATCH] Fix parse_size_and_unit() breakage in xen-3.0.4-test

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix parse_size_and_unit() breakage in xen-3.0.4-testing (kdump broken)
From: Magnus Damm <magnus@xxxxxxxxxxxxx>
Date: Wed, 10 Jan 2007 17:42:15 +0900
Cc: Christoph Egger <Christoph.Egger@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Magnus Damm <magnus@xxxxxxxxxxxxx>, Hiromichi Itou <ito@xxxxxxxx>
Delivery-date: Wed, 10 Jan 2007 00:42:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Fix parse_size_and_unit() breakage in xen-3.0.4-testing (kdump broken)

Kdump has been broken since xen-3.0.4-testing.hg-13109.
Many thanks to Hiromichi Itou for tracking this down.

Signed-Off-By: Magnus Damm <magnus@xxxxxxxxxxxxx>

---

Applies to xen-3.0.4-testing-13130.

--- 0001/xen/common/lib.c
+++ work/xen/common/lib.c       2007-01-10 11:18:38.000000000 +0900
@@ -442,7 +442,7 @@ s64 __moddi3(s64 a, s64 b)
 unsigned long long parse_size_and_unit(const char *s, const char **ps)
 {
        unsigned long long ret;
-       const char *s1;
+       const char *s1 = NULL;
 
        ret = simple_strtoull(s, &s1, 0);
 
@@ -454,7 +454,7 @@ unsigned long long parse_size_and_unit(c
        case 'K': case 'k':
                ret <<= 10;
        case 'B': case 'b':
-               s++;
+               s1++;
                break;
        default:
                ret <<= 10; /* default to kB */

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