Re: [libvirt] [PATCH 1/4] storage: disk: Fix parthelper '-g' option handling.

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

 



On Fri, Jul 10, 2009 at 03:32:20PM -0400, Cole Robinson wrote:
> Typo was breaking 'parthelper -g', preventing disk pool definition.
> ---
>  src/parthelper.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/parthelper.c b/src/parthelper.c
> index f456ccc..5df46e8 100644
> --- a/src/parthelper.c
> +++ b/src/parthelper.c
> @@ -36,7 +36,7 @@
>  #include <stdio.h>
>  
>  /* we don't need to include the full internal.h just for this */
> -#define STRNEQ(a,b) (strcmp((a),(b)) != 0)
> +#define STREQ(a,b) (strcmp((a),(b)) == 0)

Dubious optimization to re-define this here, we should just include
the real internal.h 

>  
>  /* Make the comparisons below fail if your parted headers
>     are so old that they lack the definition.  */
> @@ -56,7 +56,7 @@ int main(int argc, char **argv)
>      PedPartition *part;
>      int cmd = DISK_LAYOUT;
>  
> -    if (argc ==  3 && STRNEQ(argv[2], "-g")) {
> +    if (argc == 3 && STREQ(argv[2], "-g")) {
>          cmd = DISK_GEOMETRY;
>      } else if (argc != 2) {
>          fprintf(stderr, "syntax: %s DEVICE [-g]\n", argv[0]);

ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]