From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: device-mapper development <dm-devel@redhat.com>,
Alasdair Kergon <agk@redhat.com>
Subject: [PATCH] libdevmapper: (7/6) Add dm_report_get_report_types()
Date: Wed, 18 Apr 2007 15:23:00 -0400 [thread overview]
Message-ID: <46267014.9050100@ce.jp.nec.com> (raw)
In-Reply-To: <46264A57.1020800@ce.jp.nec.com>
[-- Attachment #1: Type: text/plain, Size: 211 bytes --]
Hi,
This patch was missing from the last post...
Since rh->report_types can be updated after dm_report_init(),
we need an interface to obtain it later.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
[-- Attachment #2: libdm-report-get-types.patch --]
[-- Type: text/x-patch, Size: 2075 bytes --]
Add dm_report_get_report_types() to obtain updated report_types field
after dm_report_set_filter() call.
---
dmsetup/dmsetup.c | 1 +
lib/.exported_symbols | 1 +
lib/libdevmapper.h | 1 +
lib/libdm-report.c | 5 +++++
4 files changed, 8 insertions(+)
Index: device-mapper.work/lib/.exported_symbols
===================================================================
--- device-mapper.work.orig/lib/.exported_symbols
+++ device-mapper.work/lib/.exported_symbols
@@ -128,5 +128,6 @@ dm_report_field_uint32
dm_report_field_uint64
dm_report_field_set_value
dm_report_set_filter
+dm_report_get_report_types
dm_regex_create
dm_regex_match
Index: device-mapper.work/lib/libdm-report.c
===================================================================
--- device-mapper.work.orig/lib/libdm-report.c
+++ device-mapper.work/lib/libdm-report.c
@@ -88,6 +88,11 @@ struct row {
struct dm_report_field *(*sort_fields)[]; /* Fields in sort order */
};
+uint32_t dm_report_get_report_types(struct dm_report *rh)
+{
+ return rh->report_types;
+}
+
static const struct dm_report_object_type *_find_type(struct dm_report *rh,
uint32_t report_type)
{
Index: device-mapper.work/lib/libdevmapper.h
===================================================================
--- device-mapper.work.orig/lib/libdevmapper.h
+++ device-mapper.work/lib/libdevmapper.h
@@ -687,6 +687,7 @@ struct dm_report *dm_report_init(uint32_
int dm_report_object(struct dm_report *rh, void *object);
int dm_report_output(struct dm_report *rh);
void dm_report_free(struct dm_report *rh);
+uint32_t dm_report_get_report_types(struct dm_report *rh);
/* Set filter */
int dm_report_set_filter(struct dm_report *rh,
Index: device-mapper.work/dmsetup/dmsetup.c
===================================================================
--- device-mapper.work.orig/dmsetup/dmsetup.c
+++ device-mapper.work/dmsetup/dmsetup.c
@@ -1924,6 +1924,7 @@ static int _report_init(struct command *
goto out;
}
+ report_type = dm_report_get_report_types(_report);
r = 1;
out:
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
prev parent reply other threads:[~2007-04-18 19:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-18 16:41 [PATCH] libdevmapper: (0/6) Filtering feature in dm_report Jun'ichi Nomura
2007-04-18 16:47 ` [PATCH] libdevmapper: (1/6) Tidy up _field_match() and _key_match() Jun'ichi Nomura
2007-04-18 16:47 ` [PATCH] libdevmapper: (2/6) Fix trailing separator Jun'ichi Nomura
2007-04-18 16:47 ` [PATCH] libdevmapper: (3/6) Move lib/regex from LVM2 Jun'ichi Nomura
2007-04-18 19:23 ` [PATCH] LVM2: (1/2) Use dm_regex Jun'ichi Nomura
2007-04-18 16:47 ` [PATCH] libdevmapper: (4/6) Add filtering feature to dm_report Jun'ichi Nomura
2007-04-18 19:32 ` [PATCH] LVM2: (2/2) Use dm_report filter Jun'ichi Nomura
2007-04-18 16:47 ` [PATCH] libdevmapper: (5/6) Add '--filter' option to dmsetup Jun'ichi Nomura
2007-04-18 16:47 ` [PATCH] libdevmapper: (6/6) Add deps and treenode fields for dmsetup info -c Jun'ichi Nomura
2007-04-18 19:23 ` Jun'ichi Nomura [this message]
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=46267014.9050100@ce.jp.nec.com \
--to=j-nomura@ce.jp.nec.com \
--cc=agk@redhat.com \
--cc=dm-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.