You need to sign in or sign up before continuing.
- 12 4月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
virDomainFree has it's quirks (does not like NULL pointers, resets libvirt errors). Replace it by a virsh helper which will allow us to centrally fix issues with it. The syntax-check rule will prohibit new uses of virDomainFree.
-
由 Peter Krempa 提交于
Move virshLookupDomainBy, virshCommandOptDomainBy and virshCommandOptDomainBy to the helper file. Additionally turn the virshCommandOptDomainBy macro into a function.
-
- 25 11月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
We have couple of functions that operate over NULL terminated lits of strings. However, our naming sucks: virStringJoin virStringFreeList virStringFreeListCount virStringArrayHasString virStringGetFirstWithPrefix We can do better: virStringListJoin virStringListFree virStringListFreeCount virStringListHasString virStringListGetFirstWithPrefix Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 11月, 2016 1 次提交
-
-
由 Erik Skultety 提交于
Although there already was an effort (b620bdee) to replace vshPrint occurrences with vshPrintExtra due to '--quiet' flag, there were still some leftovers. So this patch fixes them, hopefully for good. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356881Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 24 8月, 2016 1 次提交
-
-
由 Pino Toscano 提交于
Turn various vshPrint() informative messages into vshPrintExtra(), so they are not printed when requesting the quiet mode; neither XML/info outputs nor the results of commands are affected. Also change the expected outputs of the virsh-undefine test, since virsh is invoked in quiet mode there. Some informative messages might still be converted (and thus silenced when in quiet mode), but this is an improvements nonetheless. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1358179
-
- 12 1月, 2016 3 次提交
-
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. The macro will take a single argument _helpstr which for many options in virsh-domain.c is simply "affect current domain". So, create a second macro within that file in order to define the more common use as a revector to the common macro with the common _helpstr. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. The macro will take a single argument _helpstr which for many options in virsh-domain.c is simply "affect running domain". So, create a second macro within that file in order to define the more common use as a revector to the common macro with the common _helpstr. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. The macro will take a single argument _helpstr which will be used to pass the translatable helpstr since not all domain options can take the same string. The majority of the options take 'N_("domain name, id or uuid")', so create a separate macro with a _FULL suffix while those that do not take the same string will use the VIRSH_COMMON_OPT_DOMAIN macro. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 14 8月, 2015 1 次提交
-
-
由 Erik Skultety 提交于
In order to share as much virsh' logic as possible with upcomming virt-admin client we need to split virsh logic into virsh specific and client generic features. Since majority of virsh methods should be generic enough to be used by other clients, it's much easier to rename virsh specific data to virshX than doing this vice versa. It moved generic virsh commands (including info and opts structures) to generic module vsh.c. Besides renaming methods and structures, this patch also involves introduction of a client specific control structure being referenced as private data in the original control structure, introduction of a new global vsh Initializer, which currently doesn't do much, but there is a potential for added functionality in the future. Lastly it introduced client hooks which are especially necessary during client connecting phase.
-
- 02 6月, 2015 1 次提交
-
-
由 Andrea Bolognani 提交于
This will allow us to use vshError() to report errors from inside vshCommandOpt*(), instead of replicating the same logic and error messages all over the place. We also have more context inside the vshCommandOpt*() functions, for example the actual value used on the command line, which means we can produce more detailed error messages. vshCommandOptBool() is the exception here, because it's explicitly designed not to report any error.
-
- 02 4月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
Include them in the files that need them instead.
-
- 12 1月, 2015 1 次提交
-
-
由 Hao Liu 提交于
Commit 6b9964 enforces checking invalid use of VSH_OT_STRING with VSH_OFLAG_REQ. This commit tries to do the same thing to stop using VSH_OT_DATA without VSH_OFLAG_REQ and also fix existing misuse. Signed-off-by: NHao Liu <hliu@redhat.com>
-
- 15 11月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
This macro is being used as an inline body after an if and might get pretty confusing. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 11 9月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Since 0766783a Coverity complains that the EDIT_FREE definition results in DEADCODE. As it turns out with the change to use the EDIT_FREE macro the call to vir*Free() wouldn't be necessary nor would it happen... Prior code to above commitid would : vir*Ptr foo = NULL; ... foo = vir*GetXMLDesc() ... vir*Free(foo); foo = vir*DefineXML() ... And thus the free was needed. With the change to use EDIT_FREE the same code changed to: vir*Ptr foo = NULL; vir*Ptr foo_edited = NULL; ... foo = vir*GetXMLDesc() ... if (foo_edited) vir*Free(foo_edited); foo_edited = vir*DefineXML() ... However, foo_edited could never be set in the code path - even with all the goto's since the only way for it to be set is if vir*DefineXML() succeeds in which case the code to allow a retry (and thus all the goto's) never leaves foo_edited set All error paths lead to "cleanup:" which causes both foo and foo_edited to call the respective vir*Free() routines if set. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 14 3月, 2014 1 次提交
-
-
由 Laine Stump 提交于
These are never seen externally, only passed into libvirt APIs, so in practice this makes no real difference, but it's good to be consistent.
-
- 20 8月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
At a slightly larger memory expense allow stealing of items from the string array returned from vshStringToArray and turn the result into a string list compatible with virStringSplit. This will allow to use the common dealloc function. This patch also fixes a few forgotten checks of return from vshStringToArray and one memory leak.
-
- 26 7月, 2013 1 次提交
-
-
由 Jim Fehlig 提交于
Noticed that the expected "not supported" error is dropped when invoking 'virsh snapshot-list dom' on a Xen installation running the libxl driver virsh snapshot-list test error: Invalid snapshot: virDomainSnapshotFree The error is overwritten by a call to virDomainSnapshotFree in cleanup code within cmdSnapshotList. Prevent overwritting the real error by not calling virDomainSnapshotFree with a NULL virDomainSnapshotPtr.
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 5月, 2013 1 次提交
-
-
由 Laine Stump 提交于
These all existed before virfile.c was created, and for some reason weren't moved. This is mostly straightfoward, although the syntax rule prohibiting write() had to be changed to have an exception for virfile.c instead of virutil.c. This movement pointed out that there is a function called virBuildPath(), and another almost identical function called virFileBuildPath(). They really should be a single function, which I'll take care of as soon as I figure out what the arglist should look like.
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 21 3月, 2013 4 次提交
-
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Use the exclusive parameter checker and touch up some parts to simplify code.
-
由 Peter Krempa 提交于
Simplify error handling and mutually exclusive option checking.
-
- 15 3月, 2013 2 次提交
-
-
由 Martin Kletzander 提交于
After we switched to C99 initialization, I noticed there were many places where the specification of .flags parameter differed. After going through many options and deciding whether to unify the initialization to be '.flags = 0' or '.flags = VSH_OFLAG_NONE', I realized both can be removed and it makes the code easier to go through.
-
由 Martin Kletzander 提交于
According to the man page, the memspec parameter should have the '--memspec' option mandatory and this is as close as we can get to that. What this change does is explained below. man virsh: snapshot-create-as ... [[--live] [--memspec memspec]] virsh help snapshot-create-as before this patch: SYNOPSIS snapshot-create-as ... [<memspec>] ... ... OPTIONS [--memspec] <string> ... virsh help snapshot-create-as after this patch: SYNOPSIS snapshot-create-as ... [--memspec <string>] ... ... OPTIONS --memspec <string> ...
-
- 11 3月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Properly check the return value of vshCommandOptStringReq for xmlfile: * error out on incorrect input (--xmlfile '') * use default XML <domainsnapshot/> with no --xmlfile specified (Broken by commit b2e85855) Bug: https://bugzilla.redhat.com/show_bug.cgi?id=919826
-
- 05 3月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Help script creators by not having to parse the names from the table.
-
- 13 2月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
- 11 2月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Manual for "virsh snapshot-create-as" states that --no-metadata and --print-xml are incompatible. Honor this detail in the code.
-
由 Peter Krempa 提交于
This patch simplifies the creation of XML, some error paths and adds correct approach to check for virBuffer errors.
-
- 08 2月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The query didn't match the external state correctly for offline internal snapshots.
-
- 04 2月, 2013 3 次提交
-
-
由 Peter Krempa 提交于
also avoids potential NULL pointer dereference: $ virsh snapshot-current asdf "" error: invalid snapshotname argument '(null)' by removing the error message in favor of vshCommandOptStringReq
-
由 Peter Krempa 提交于
This patch simplifies error paths and switches to use vshCommandOptStringReq for argument retrieval in cmdSnapshotDumpXML
-
由 Peter Krempa 提交于
buffer won't be NULL in any case when reaching the check and the first block of the if statement was lacking parentheses
-
- 17 1月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 21 12月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-