On 10/08/2010 06:16 AM, Nikunj A. Dadhania wrote:
+static int +cmdMemtune(vshControl *ctl, const vshCmd *cmd) +{ + virDomainPtr dom; + int hard_limit, soft_limit, swap_hard_limit;
This is inherently limited to 32 bits.
+ hard_limit = vshCommandOptInt(cmd, VIR_DOMAIN_MEMORY_HARD_LIMIT,&hard_limit);
You should instead be using vshCommandOptLongLong, and larger types,
+ } else { + /* set the memory parameters */ + params = vshMalloc(ctl, sizeof(virMemoryParameter)* nparams); + + memset(params, 0, sizeof(virMemoryParameter)* nparams); + for(i = 0; i< nparams; i++) + { + temp =¶ms[i]; + temp->type = VIR_DOMAIN_MEMORY_FIELD_ULLONG;
to match the fact that you claim to be passing a long long. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list