[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v3] support setting bandwidth from virsh attach-interface



On 18.10.2011 09:32, Hu Tao wrote:
> Adds two options, inbound and outbound, to attach-interface to set
> bandwidth when attaching interfaces
> ---
>  tools/virsh.c   |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  tools/virsh.pod |    5 ++-
>  2 files changed, 91 insertions(+), 3 deletions(-)
> 

ACK and pushed with this squashed in:


diff --git a/tools/virsh.c b/tools/virsh.c
index 3e2c46f..42f62d7 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -11239,12 +11239,13 @@ static const vshCmdOptDef
opts_attach_interface[] = {
  * thus 'average,,burst' and 'average,peak' are also legal. */
 static int parseRateStr(const char *rateStr, virRatePtr rate)
 {
-    const char *average = NULL, *peak = NULL, *burst = NULL;
+    const char *average = NULL;
+    char *peak = NULL, *burst = NULL;

     average = rateStr;
     if (!average)
         return -1;
-    if (virStrToLong_ull(average, (char **)&peak, 10, &rate->average) < 0)
+    if (virStrToLong_ull(average, &peak, 10, &rate->average) < 0)
         return -1;

     /* peak will be updated to point to the end of rateStr in case
@@ -11252,7 +11253,7 @@ static int parseRateStr(const char *rateStr,
virRatePtr rate)
     if (peak && *peak != '\0') {
         burst = strchr(peak + 1, ',');
         if (!(burst && (burst - peak == 1))) {
-            if (virStrToLong_ull(peak + 1, (char **)&burst, 10,
&rate->peak) < 0)
+            if (virStrToLong_ull(peak + 1, &burst, 10, &rate->peak) < 0)
                 return -1;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]