[libvirt] [PATCH v3 0/2] Add function for XML yes|no string handling

Shotaro Gotanda posted 2 patches 5 years, 1 month ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190313063011.16317-1-g.sho1500@gmail.com
src/conf/domain_conf.c | 30 +++++-------------------------
src/conf/secret_conf.c | 12 ++----------
src/util/virstring.c   | 21 +++++++++++++++++++++
src/util/virstring.h   |  3 +++
4 files changed, 31 insertions(+), 35 deletions(-)
[libvirt] [PATCH v3 0/2] Add function for XML yes|no string handling
Posted by Shotaro Gotanda 5 years, 1 month ago
Changes since v2:
- adjust the code to the coding guideline


Shotaro Gotanda (2):
  util: add virStringParseYesNo()
  conf: Use virStringParseYesNo()

 src/conf/domain_conf.c | 30 +++++-------------------------
 src/conf/secret_conf.c | 12 ++----------
 src/util/virstring.c   | 21 +++++++++++++++++++++
 src/util/virstring.h   |  3 +++
 4 files changed, 31 insertions(+), 35 deletions(-)

-- 
2.19.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/2] Add function for XML yes|no string handling
Posted by Cole Robinson 5 years, 1 month ago
On 3/13/19 2:30 AM, Shotaro Gotanda wrote:
> Changes since v2:
> - adjust the code to the coding guideline
> 
> 
> Shotaro Gotanda (2):
>   util: add virStringParseYesNo()
>   conf: Use virStringParseYesNo()
> 
>  src/conf/domain_conf.c | 30 +++++-------------------------
>  src/conf/secret_conf.c | 12 ++----------
>  src/util/virstring.c   | 21 +++++++++++++++++++++
>  src/util/virstring.h   |  3 +++
>  4 files changed, 31 insertions(+), 35 deletions(-)
> 

FYI I updated the bitesizedtask wiki page to describe more cases we can
use it. Most of the remaining ones are cases where we only check for
"yes", so everything else is implicitly false. In that case if YesNo
errors we should just set the value to false and move on

https://wiki.libvirt.org/page/BiteSizedTasks#More_usage_of_virStringParseYesNo

- Cole

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list