All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 1/3] Fix reporting dmsetup info -c -o all
Date: Mon, 14 Dec 2009 16:18:58 +0100	[thread overview]
Message-ID: <4B265762.9020202@redhat.com> (raw)
In-Reply-To: <e5b04bbd53a48c1323977411eef561b191670bb2.1260547761.git.zkabelac@redhat.com>

On 12/11/2009 05:13 PM, Zdenek Kabelac wrote:
> Use whole bitmask of all options.

IOW fixes
dmsetup info -c -o all
to work and print all possible values.

ACK.

> @@ -379,7 +379,9 @@ static uint32_t _all_match(struct dm_report *rh, const char *field, size_t flen)
>  			       _all_match(rh, prefixed_all,
>  					  strlen(prefixed_all));
>  		} else
> -			return rh->report_types;
> +			/* all without type use full bitmask */
> +			return (!rh->report_types)
> +				? UINT_MAX : rh->report_types;

IMHO better

#define DM_REPORT_TYPE_ALL_FIELDS ~0
(or something like that instead of UINT_MAX)

>  	}
>  
>  	for (t = rh->types; t->data_fn; t++) {

Milan



  reply	other threads:[~2009-12-14 15:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 16:13 [PATCH 0/3] Fix and cleanups Zdenek Kabelac
2009-12-11 16:13 ` [PATCH 1/3] Fix reporting dmsetup info -c -o all Zdenek Kabelac
2009-12-14 15:18   ` Milan Broz [this message]
2009-12-11 16:13 ` [PATCH 2/3] Report unrecognised key instead of field Zdenek Kabelac
2009-12-11 16:13 ` [PATCH 3/3] Use standard C macro offsetof() Zdenek Kabelac

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=4B265762.9020202@redhat.com \
    --to=mbroz@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.