[libvirt] [PATCH] tools: Pass opaque data in vshCompleter and introduce autoCompleteOpaque

2016-09-06 Thread Nishith Shah
-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/vsh.c | 10 +- tools/vsh.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 3157922..3cc03ec 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -64,6 +64,11 @@ # define SA_SIGINFO 0

[libvirt] [PATCH v2 1/3] virsh: Introduce usage of option completers to auto-complete arguments

2016-09-05 Thread Nishith Shah
Call option completers if argument completion is requested using the corresponding option completer, if it is defined. Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- v2: Fix a infinite while loop in vshReadlineParse when using option completers tools/vsh.

[libvirt] [PATCH v2 2/3] virsh: Allow data or argument options to be completed as well

2016-09-05 Thread Nishith Shah
Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/vsh.c | 4 1 file changed, 4 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index b101645..45f55d9 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2607,10 +2607,6 @@ vshReadlineOptionsGenerator(const char *tex

[libvirt] [PATCH v2 3/3] virsh: Complete multiple options when any one option requires data

2016-09-05 Thread Nishith Shah
<- calls domain completer if defined, otherwise falls back to filename completion Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/vsh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 45f55d9..3157922 100644

[libvirt] [PATCH v2 0/3] virsh: Option completers and small improvements/fixes for autocomplete

2016-09-05 Thread Nishith Shah
-August/msg01009.html Nishith Shah (3): virsh: Introduce usage of option completers to auto-complete arguments virsh: Allow data or argument options to be completed as well virsh: Complete multiple options when any one option requires data tools/vsh.c | 75

Re: [libvirt] [PATCH 0/3] virsh: Option completers and small improvements/fixes for autocomplete

2016-08-24 Thread Nishith Shah
On Wed, Aug 24, 2016 at 9:54 PM, Michal Privoznik <mpriv...@redhat.com> wrote: > On 20.08.2016 07:52, Nishith Shah wrote: > > This series introduces option completers and adds some minor improvements > > and fixes(not bugs per se, just better/sane behavior)

Re: [libvirt] [PATCH 3/3] virsh: use vshError consistently after virBufferError checks

2016-08-24 Thread Nishith Shah
I guess you meant "If virBufferError() reports an error, then vshError() is needed to report the error situation instead of a simple vshPrint()." :-) Had me confused for a bit there. Nishith On Wed, Aug 24, 2016 at 7:44 PM, Pino Toscano wrote: > If virBufferError()

[libvirt] [PATCH 2/3] virsh: Allow data or argument options to be completed as well

2016-08-19 Thread Nishith Shah
Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/vsh.c | 4 1 file changed, 4 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 79656ed..e8aa7b3 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2607,10 +2607,6 @@ vshReadlineOptionsGenerator(const char *tex

[libvirt] [PATCH 1/3] virsh: Introduce usage of option completers to auto-complete arguments

2016-08-19 Thread Nishith Shah
Call option completers if argument completion is requested using the corresponding option completer, if it is defined. Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/vsh.c | 66 ++--- 1 file changed, 46 insertions(

[libvirt] [PATCH 0/3] virsh: Option completers and small improvements/fixes for autocomplete

2016-08-19 Thread Nishith Shah
small improvements like completing the options of type VSH_OT_ARGV or VSH_OT_DATA, and to complete multiple options as well, if a previous option requires an argument, and that argument has been provided. Nishith Shah (3): virsh: Introduce usage of option completers to auto-complete arguments

[libvirt] [PATCH 3/3] virsh: Complete multiple options when any one option requires data

2016-08-19 Thread Nishith Shah
<- calls domain completer if defined, otherwise falls back to filename completion Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/vsh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index e8aa7b3..2f1962b 100644

Re: [libvirt] wiki accounts for GSOC submissions

2016-08-11 Thread Nishith Shah
I don't have an account as well. username: nishithshah2211 email: nishithshah.2...@gmail.com Thanks, Nishith On Thu, Aug 11, 2016 at 7:01 PM, Cole Robinson wrote: > Next week is the time for GSOC students to submit their Final Evaluations. > Work needs to be hosted/linked

[libvirt] [PATCH 3/4] virsh: Add option to suppress error in various functions

2016-07-08 Thread Nishith Shah
A bool 'report' has been introduced in various functions, which when set to true will produce the error it is suppposed to produce, and when false, will suppress the error. These functions are used in the next patch for auto-completion. Signed-off-by: Nishith Shah <nishithshah.2...@gmail.

[libvirt] [PATCH 1/4] virsh: Break vshCmddefOptParse into helper functions

2016-07-08 Thread Nishith Shah
and opts_need_arg. Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/vsh.c | 58 +++--- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 2b78919..dcf99f2 100644 --- a/tools/vsh.c +++ b

[libvirt] [PATCH 0/4] virsh: Provide better auto-completion

2016-07-08 Thread Nishith Shah
. The third patch introduces quiet mode for the functions vshCmddefGetOption and vshCommandStringGetArg. The fourth patch introduces vshReadlineParse, which uses existing parsing functions and borrows from vshCommandParse to quite some extent and provides better auto-completion. Nishith Shah (4): virsh

[libvirt] [PATCH 4/4] virsh: Introduce vshReadlineParse for improved auto-completion

2016-07-08 Thread Nishith Shah
The new function works as expected, and matches the current level of autocomplete offered, along with several other improvements like quotes handling, multiple command completion and space handling. Now, it is easy to introduce options completer here. Signed-off-by: Nishith Shah <nishithsha

[libvirt] [PATCH 2/4] virsh: Fix variable types in readline generators

2016-07-08 Thread Nishith Shah
Use unsigned int for array indexes and size_t for length variables. Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/vsh.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index dcf99f2..c5d7578 100644 --- a/tools/vsh.c

Re: [libvirt] [PATCH v3 0/2] qemu: parse: Introduce qemuParseCommandLineMem

2016-05-20 Thread Nishith Shah
Thank you :) On Fri, May 20, 2016 at 6:20 PM, Cole Robinson <crobi...@redhat.com> wrote: > On 05/20/2016 03:09 AM, Nishith Shah wrote: > > This series moves the parsing of qemu -m memory into a separate function > > and adds suffix support for the -m option. > > >

[libvirt] [PATCH v3 2/2] qemu: parse: Handle suffixes for -m memory

2016-05-20 Thread Nishith Shah
According to QEMU docs, the '-m' option for specifying RAM is by default in MiB, and a suffix of "M" or "G" may be passed for values in MiB and GiB respectively. This commit adds support and a test for the same. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=812295 Si

[libvirt] [PATCH v3 1/2] qemu: parse: Use qemuParseCommandLineMem for -m memory

2016-05-20 Thread Nishith Shah
Move the parsing of -m memory to a new function, qemuParseCommandLineMem Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- src/qemu/qemu_parse_command.c | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_parse_comma

[libvirt] [PATCH v3 0/2] qemu: parse: Introduce qemuParseCommandLineMem

2016-05-20 Thread Nishith Shah
This series moves the parsing of qemu -m memory into a separate function and adds suffix support for the -m option. The first patch introduces the function qemuParseCommandLineMem, and the second patch handles suffixes for the -m values and adds a test for the same. Nishith Shah (2): qemu

Re: [libvirt] [PATCH v2 2/2] qemu: parse: Handle suffixes for -m memory

2016-05-19 Thread Nishith Shah
On Thu, May 19, 2016 at 5:40 PM, Cole Robinson <crobi...@redhat.com> wrote: > On 05/18/2016 02:36 AM, Nishith Shah wrote: > > diff --git a/src/qemu/qemu_parse_command.c > b/src/qemu/qemu_parse_command.c > > index 334dcf8..f027d51 100644 > > --- a/src/qemu/qemu_pars

[libvirt] [PATCH v2 2/2] qemu: parse: Handle suffixes for -m memory

2016-05-18 Thread Nishith Shah
According to QEMU docs, the '-m' option for specifying RAM is by default in MiB, and a suffix of "M" or "G" may be passed for values in MiB and GiB respectively. This commit adds support and a test for the same. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=812295 Si

[libvirt] [PATCH v2 1/2] qemu: parse: Use qemuParseCommandLineMem for -m memory

2016-05-18 Thread Nishith Shah
Move the parsing of -m memory to a new function, qemuParseCommandLineMem Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- src/qemu/qemu_parse_command.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_parse_comma

[libvirt] [PATCH v2 0/2] qemu: parse: Introduce qemuParseCommandLineMem

2016-05-18 Thread Nishith Shah
This series moves the parsing of qemu -m memory into a separate function and adds suffix support for the -m option. The first patch introduces the function qemuParseCommandLineMem, and the second patch handles suffixes for the -m values and adds a test for the same. Nishith Shah (2): qemu

[libvirt] [PATCH] qemu: Allow suffixes for the RAM option and fix it's type

2016-05-13 Thread Nishith Shah
lso, change the type of mem from int to unsigned long long as per convention and also because virDomainDefSetMemoryTotal expects the latter. Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- src/qemu/qemu_parse_command.c | 14 + tests/qemuargv2xmldat

Re: [libvirt] docs: Change or update the hacking page

2016-05-11 Thread Nishith Shah
On Wed, May 11, 2016 at 7:51 PM, Michal Privoznik wrote: > On 11.05.2016 16:01, Cole Robinson wrote: > > I've thought a bit about this too. I don't think the HACKING page is a > good > > landing page for new contributors. It _is_ useful document _everything_ > that a > >

Re: [libvirt] docs: Change or update the hacking page

2016-05-11 Thread Nishith Shah
think of it. Also, please post the other things that you think should be changed on that page in this thread. Thanks, Nishith [1]: http://libvirt.org/hacking.html [2]: https://nishithshah2211.github.io/git/libvirt/libvirt-git-workflow/ On Wed, May 11, 2016 at 11:30 AM, Nishith Shah <nishithsha

[libvirt] docs: Change or update the hacking page

2016-05-11 Thread Nishith Shah
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCHv2] virsh: blkdeviotune: accept human readable values for bytes

2016-05-09 Thread Nishith Shah
On Mon, May 9, 2016 at 11:32 AM, Michal Privoznik <mpriv...@redhat.com> wrote: > On 04.05.2016 16:25, Nishith Shah wrote: > > [1] .. here. > > > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so that > > values with suffixes can be passed whe

Re: [libvirt] [PATCHv2] virsh: blkdeviotune: accept human readable values for bytes

2016-05-04 Thread Nishith Shah
gmail.com > > <mailto:niteshkonkar.libv...@gmail.com>> wrote: > > > > Hello Nishith, > > > > Just a small suggestion on the indentation part of the patch. I > think your > > indentation is off by 1 space. > > > > Thanks, > >

Re: [libvirt] [PATCHv2] virsh: blkdeviotune: accept human readable values for bytes

2016-05-04 Thread Nishith Shah
tion part of the patch. I think >> your indentation is off by 1 space. >> >> Thanks, >> Nitesh Konkar. >> >> >> On Wed, May 4, 2016 at 7:55 PM, Nishith Shah <nishithshah.2...@gmail.com> >> wrote: >> >>> Use vshCommandOptScal

[libvirt] [PATCHv2] virsh: blkdeviotune: accept human readable values for bytes

2016-05-04 Thread Nishith Shah
://bugzilla.redhat.com/show_bug.cgi?id=885380 which can be closed. Signed-off-by: Nishith Shah <nishithshah.2...@gmail.com> --- tools/virsh-domain.c | 24 tools/virsh.pod | 18 -- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/tools/virsh-doma

Re: [libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Nishith Shah
On Tue, May 3, 2016 at 11:17 PM, Cole Robinson <crobi...@redhat.com> wrote: > On 05/03/2016 10:09 AM, Nishith Shah wrote: > > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is > > no need to pass values in raw bytes, which is seldom the case. > &g

Re: [libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Nishith Shah
On Tue, May 3, 2016 at 8:00 PM, Peter Krempa <pkre...@redhat.com> wrote: > On Tue, May 03, 2016 at 14:09:42 +, Nishith Shah wrote: > > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is > > no need to pass values in raw bytes, which is seldom the ca

[libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Nishith Shah
Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is no need to pass values in raw bytes, which is seldom the case. --- tools/virsh-domain.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/virsh-domain.c