public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/cache/lvmcache.c lib/form ...
Date: Thu, 01 Sep 2011 10:25:00 -0000	[thread overview]
Message-ID: <20110901102523.14028.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-09-01 10:25:23

Modified files:
	.              : WHATS_NEW 
	lib/cache      : lvmcache.c 
	lib/format_text: export.c import-export.h 
	lib/metadata   : metadata.h 

Log message:
	Use size_t return type
	
	Since these function returns buffer size - use size_t type for them.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2087&r2=1.2088
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.c.diff?cvsroot=lvm2&r1=1.117&r2=1.118
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.83&r2=1.84
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import-export.h.diff?cvsroot=lvm2&r1=1.27&r2=1.28
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.250&r2=1.251

--- LVM2/WHATS_NEW	2011/08/31 12:47:59	1.2087
+++ LVM2/WHATS_NEW	2011/09/01 10:25:22	1.2088
@@ -1,5 +1,6 @@
 Version 2.02.89 - 
 ==================================
+  Use size_t return type for text_vg_export_raw() and export_vg_to_buffer().
   Add configure --enable-lvmetad for building the (experimental) LVMetaD.
   Fix resource leak when strdup fails in _get_device_status() (2.02.85).
   Directly allocate buffer memory in a pvck scan instead of using a mempool.
--- LVM2/lib/cache/lvmcache.c	2011/08/30 14:55:16	1.117
+++ LVM2/lib/cache/lvmcache.c	2011/09/01 10:25:22	1.118
@@ -102,7 +102,7 @@
 	char uuid[64] __attribute__((aligned(8)));
 	struct lvmcache_vginfo *vginfo;
 	char *data;
-	int size;
+	size_t size;
 
 	if (!(vginfo = vginfo_from_vgid((const char *)&vg->id))) {
 		stack;
@@ -132,7 +132,7 @@
 		return;
 	}
 
-	log_debug("Metadata cache: VG %s (%s) stored (%d bytes%s).",
+	log_debug("Metadata cache: VG %s (%s) stored (%" PRIsize_t " bytes%s).",
 		  vginfo->vgname, uuid, size,
 		  precommitted ? ", precommitted" : "");
 }
--- LVM2/lib/format_text/export.c	2011/08/30 14:55:17	1.83
+++ LVM2/lib/format_text/export.c	2011/09/01 10:25:22	1.84
@@ -775,10 +775,10 @@
 }
 
 /* Returns amount of buffer used incl. terminating NUL */
-int text_vg_export_raw(struct volume_group *vg, const char *desc, char **buf)
+size_t text_vg_export_raw(struct volume_group *vg, const char *desc, char **buf)
 {
 	struct formatter *f;
-	int r = 0;
+	size_t r = 0;
 
 	_init();
 
@@ -809,7 +809,7 @@
 	return r;
 }
 
-int export_vg_to_buffer(struct volume_group *vg, char **buf)
+size_t export_vg_to_buffer(struct volume_group *vg, char **buf)
 {
 	return text_vg_export_raw(vg, "", buf);
 }
--- LVM2/lib/format_text/import-export.h	2011/08/30 14:55:17	1.27
+++ LVM2/lib/format_text/import-export.h	2011/09/01 10:25:22	1.28
@@ -65,7 +65,7 @@
 int read_tags(struct dm_pool *mem, struct dm_list *tags, const struct dm_config_value *cv);
 
 int text_vg_export_file(struct volume_group *vg, const char *desc, FILE *fp);
-int text_vg_export_raw(struct volume_group *vg, const char *desc, char **buf);
+size_t text_vg_export_raw(struct volume_group *vg, const char *desc, char **buf);
 struct volume_group *text_vg_import_file(struct format_instance *fid,
 					 const char *file,
 					 time_t *when, char **desc);
--- LVM2/lib/metadata/metadata.h	2011/08/30 14:55:17	1.250
+++ LVM2/lib/metadata/metadata.h	2011/09/01 10:25:22	1.251
@@ -454,7 +454,7 @@
 /*
  * For internal metadata caching.
  */
-int export_vg_to_buffer(struct volume_group *vg, char **buf);
+size_t export_vg_to_buffer(struct volume_group *vg, char **buf);
 int export_vg_to_config_tree(struct volume_group *vg, struct dm_config_tree **cft);
 struct volume_group *import_vg_from_buffer(const char *buf,
 					   struct format_instance *fid);


             reply	other threads:[~2011-09-01 10:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01 10:25 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-11-02 13:06 bmr
2007-04-23 18:21 wysochanski
2006-04-10 22:09 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=20110901102523.14028.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).