All of lore.kernel.org
 help / color / mirror / Atom feed
From: agk@sourceware.org <agk@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/report/report.c
Date: 22 Jan 2007 15:07:21 -0000	[thread overview]
Message-ID: <20070122150721.15625.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk at sourceware.org	2007-01-22 15:07:21

Modified files:
	.              : WHATS_NEW 
	lib/report     : report.c 

Log message:
	Streamline dm_report_field_* interface.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.549&r2=1.550
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.52&r2=1.53

--- LVM2/WHATS_NEW	2007/01/19 22:21:44	1.549
+++ LVM2/WHATS_NEW	2007/01/22 15:07:20	1.550
@@ -1,5 +1,6 @@
 Version 2.02.20 -
 ===================================
+  Streamline dm_report_field_* interface.
   Change remaining dmeventd terminology 'register' to 'monitor'.
   Update reporting man pages.
   No longer necessary to specify alignment for report fields.
--- LVM2/lib/report/report.c	2007/01/18 17:48:29	1.52
+++ LVM2/lib/report/report.c	2007/01/22 15:07:21	1.53
@@ -66,7 +66,7 @@
 			struct dm_report_field *field,
 			const void *data, void *private)
 {
-	return dm_report_field_string(rh, mem, field, data);
+	return dm_report_field_string(rh, field, (const char **) data);
 }
 
 static int _dev_name_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -75,7 +75,7 @@
 {
 	const char *name = dev_name(*(const struct device **) data);
 
-	return dm_report_field_string(rh, mem, field, &name);
+	return dm_report_field_string(rh, field, &name);
 }
 
 static int _devices_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -227,9 +227,9 @@
 	uint64_t minusone = UINT64_C(-1);
 
 	if (lv_info(lv->vg->cmd, lv, &info, 0) && info.exists)
-		return dm_report_field_int(rh, mem, field, &info.major);
+		return dm_report_field_int(rh, field, &info.major);
 
-	return dm_report_field_int(rh, mem, field, &minusone);
+	return dm_report_field_uint64(rh, field, &minusone);
 }
 
 static int _lvkmin_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -241,9 +241,9 @@
 	uint64_t minusone = UINT64_C(-1);
 
 	if (lv_info(lv->vg->cmd, lv, &info, 0) && info.exists)
-		return dm_report_field_int(rh, mem, field, &info.minor);
+		return dm_report_field_int(rh, field, &info.minor);
 
-	return dm_report_field_int(rh, mem, field, &minusone);
+	return dm_report_field_uint64(rh, field, &minusone);
 }
 
 static int _lvstatus_disp(struct dm_report *rh, struct dm_pool *mem,
@@ -423,8 +423,8 @@
 	const struct logical_volume *lv = (const struct logical_volume *) data;
 
 	if (lv_is_cow(lv))
-		return dm_report_field_string(rh, mem, field,
-					      &origin_from_cow(lv)->name);
+		return dm_report_field_string(rh, field,
+					      (const char **) &origin_from_cow(lv)->name);
 
 	dm_report_field_set_value(field, "", NULL);
 	return 1;
@@ -440,8 +440,8 @@
 	list_iterate_items(seg, &lv->segments) {
 		if (!seg_is_mirrored(seg) || !seg->log_lv)
 			continue;
-		return dm_report_field_string(rh, mem, field,
-					      &seg->log_lv->name);
+		return dm_report_field_string(rh, field,
+					      (const char **) &seg->log_lv->name);
 	}
 
 	dm_report_field_set_value(field, "", NULL);
@@ -458,7 +458,7 @@
 
 	if (lv_is_visible(lv)) {
 		repstr = lv->name;
-		return dm_report_field_string(rh, mem, field, &repstr);
+		return dm_report_field_string(rh, field, (const char **) &repstr);
 	}
 
 	len = strlen(lv->name) + 3;
@@ -494,7 +494,7 @@
 		if (!(seg->status & PVMOVE))
 			continue;
 		name = dev_name(seg_dev(seg, 0));
-		return dm_report_field_string(rh, mem, field, &name);
+		return dm_report_field_string(rh, field, &name);
 	}
 
 	dm_report_field_set_value(field, "", NULL);
@@ -708,14 +708,14 @@
 			struct dm_report_field *field,
 			const void *data, void *private)
 {
-	return dm_report_field_uint32(rh, mem, field, data);
+	return dm_report_field_uint32(rh, field, data);
 }
 
 static int _int32_disp(struct dm_report *rh, struct dm_pool *mem,
 		       struct dm_report_field *field,
 		       const void *data, void *private)
 {
-	return dm_report_field_int32(rh, mem, field, data);
+	return dm_report_field_int32(rh, field, data);
 }
 
 static int _lvsegcount_disp(struct dm_report *rh, struct dm_pool *mem,



             reply	other threads:[~2007-01-22 15:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-22 15:07 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-20 22:24 LVM2 ./WHATS_NEW lib/report/report.c agk
2010-01-07 14:37 zkabelac
2009-02-06 12:41 mbroz
2009-02-16 20:25 ` Alasdair G Kergon
2009-01-10 17:09 agk
2009-01-10 15:04 wysochanski
2008-12-15 13:30 wysochanski
2007-01-18 17:48 agk

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=20070122150721.15625.qmail@sourceware.org \
    --to=agk@sourceware.org \
    --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.