All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 4/5] lvm2app: Correct missing string properties
Date: Wed, 06 May 2015 12:25:08 +0200	[thread overview]
Message-ID: <5549EC04.1060302@redhat.com> (raw)
In-Reply-To: <1430861659-2755-5-git-send-email-tasleson@redhat.com>

On 05/05/2015 11:34 PM, Tony Asleson wrote:
> Synopsis: STR_LIST needs to be treated as STR for properties.
> 
> For any lvm property that was internally 'typed' as a string list we were failing
> to return a string in the property API.  This was due to the fact that for the
> properties to work the value needs to either be evaulated as a string or a
> number.  This change corrects the macro used to build the memory array of
> structures so that the string bitfield is set as needed to ensure that the value
> is a string.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1139920
> 
> Signed-off-by: Tony Asleson <tasleson@redhat.com>
> ---
>  lib/properties/prop_common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/properties/prop_common.h b/lib/properties/prop_common.h
> index 0b1678d..9cc963a 100644
> --- a/lib/properties/prop_common.h
> +++ b/lib/properties/prop_common.h
> @@ -132,6 +132,6 @@ static int _ ## NAME ## _get (const void *obj, struct lvm_property_type *prop) \
>  
>  #define FIELD_MODIFIABLE 0x00000001
>  #define FIELD(type, strct, field_type, head, field, width, fn, id, desc, settable) \
> -	{ type, #id, settable, field_type == STR, ((field_type == NUM) || (field_type == BIN) || (field_type == SIZ) || (field_type == PCT) || (field_type == SNUM)), ((field_type == SNUM) || (field_type == PCT)), { .integer = 0 }, _ ## id ## _get, _ ## id ## _set },
> +	{ type, #id, settable, (field_type == STR || field_type == STR_LIST), ((field_type == NUM) || (field_type == BIN) || (field_type == SIZ) || (field_type == PCT) || (field_type == SNUM)), ((field_type == SNUM) || (field_type == PCT)), { .integer = 0 }, _ ## id ## _get, _ ## id ## _set },

My mistake! I always forget to add these. Thanks for fixing this!

-- 
Peter



  reply	other threads:[~2015-05-06 10:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 21:34 [PATCH 0/5] V2 lvm2app & python bindings bug fixes Tony Asleson
2015-05-05 21:34 ` [PATCH 1/5] lvm2app: Add signed numerical property values Tony Asleson
2015-05-06 10:23   ` Peter Rajnoha
2015-05-05 21:34 ` [PATCH 2/5] python: Build correct python value for numerical property Tony Asleson
2015-05-05 21:34 ` [PATCH 3/5] python: Check for NULL value before constructing string property Tony Asleson
2015-05-05 21:34 ` [PATCH 4/5] lvm2app: Correct missing string properties Tony Asleson
2015-05-06 10:25   ` Peter Rajnoha [this message]
2015-05-05 21:34 ` [PATCH 5/5] Python: Improve lv property test coverage Tony Asleson
  -- strict thread matches above, loose matches on Subject: below --
2015-05-05 19:25 [PATCH 0/5] lvm2app & python bindings bug fixes Tony Asleson
2015-05-05 19:25 ` [PATCH 4/5] lvm2app: Correct missing string properties Tony Asleson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5549EC04.1060302@redhat.com \
    --to=prajnoha@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.