public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: wysochanski@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/lib/metadata metadata-exported.h metadata.c
Date: Thu, 13 Mar 2008 22:51:00 -0000	[thread overview]
Message-ID: <20080313225128.11485.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-03-13 22:51:27

Modified files:
	lib/metadata   : metadata-exported.h metadata.c 

Log message:
	Const cleanups in find_* functions.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.44&r2=1.45
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.158&r2=1.159

--- LVM2/lib/metadata/metadata-exported.h	2008/02/13 20:01:48	1.44
+++ LVM2/lib/metadata/metadata-exported.h	2008/03/13 22:51:24	1.45
@@ -428,14 +428,18 @@
 					   const char *layer_suffix);
 
 /* Find a PV within a given VG */
-struct pv_list *find_pv_in_vg(struct volume_group *vg, const char *pv_name);
-pv_t *find_pv_in_vg_by_uuid(struct volume_group *vg, struct id *id);
+struct pv_list *find_pv_in_vg(const struct volume_group *vg,
+			      const char *pv_name);
+pv_t *find_pv_in_vg_by_uuid(const struct volume_group *vg,
+			    const struct id *id);
 
 /* Find an LV within a given VG */
-struct lv_list *find_lv_in_vg(struct volume_group *vg, const char *lv_name);
+struct lv_list *find_lv_in_vg(const struct volume_group *vg,
+			      const char *lv_name);
 
 /* FIXME Merge these functions with ones above */
-struct logical_volume *find_lv(struct volume_group *vg, const char *lv_name);
+struct logical_volume *find_lv(const struct volume_group *vg,
+			       const char *lv_name);
 struct physical_volume *find_pv_by_name(struct cmd_context *cmd,
 					const char *pv_name);
 
--- LVM2/lib/metadata/metadata.c	2008/02/13 20:01:48	1.158
+++ LVM2/lib/metadata/metadata.c	2008/03/13 22:51:24	1.159
@@ -58,10 +58,11 @@
 static struct physical_volume *_find_pv_by_name(struct cmd_context *cmd,
 			 			const char *pv_name);
 
-static struct pv_list *_find_pv_in_vg(struct volume_group *vg, const char *pv_name);
+static struct pv_list *_find_pv_in_vg(const struct volume_group *vg,
+				      const char *pv_name);
 
-static struct physical_volume *_find_pv_in_vg_by_uuid(struct volume_group *vg,
-						      struct id *id);
+static struct physical_volume *_find_pv_in_vg_by_uuid(const struct volume_group *vg,
+						      const struct id *id);
 
 unsigned long pe_align(void)
 {
@@ -851,12 +852,14 @@
 }
 
 /* FIXME: liblvm todo - make into function that returns handle */
-struct pv_list *find_pv_in_vg(struct volume_group *vg, const char *pv_name)
+struct pv_list *find_pv_in_vg(const struct volume_group *vg,
+			      const char *pv_name)
 {
 	return _find_pv_in_vg(vg, pv_name);
 }
 
-static struct pv_list *_find_pv_in_vg(struct volume_group *vg, const char *pv_name)
+static struct pv_list *_find_pv_in_vg(const struct volume_group *vg,
+				      const char *pv_name)
 {
 	struct pv_list *pvl;
 
@@ -890,14 +893,15 @@
  * Note
  *   FIXME - liblvm todo - make into function that takes VG handle
  */
-pv_t *find_pv_in_vg_by_uuid(struct volume_group *vg, struct id *id)
+pv_t *find_pv_in_vg_by_uuid(const struct volume_group *vg,
+			    const struct id *id)
 {
 	return _find_pv_in_vg_by_uuid(vg, id);
 }
 
 
-static struct physical_volume *_find_pv_in_vg_by_uuid(struct volume_group *vg,
-						      struct id *id)
+static struct physical_volume *_find_pv_in_vg_by_uuid(const struct volume_group *vg,
+						      const struct id *id)
 {
 	struct pv_list *pvl;
 
@@ -908,7 +912,8 @@
 	return NULL;
 }
 
-struct lv_list *find_lv_in_vg(struct volume_group *vg, const char *lv_name)
+struct lv_list *find_lv_in_vg(const struct volume_group *vg,
+			      const char *lv_name)
 {
 	struct lv_list *lvl;
 	const char *ptr;
@@ -938,7 +943,8 @@
 	return NULL;
 }
 
-struct logical_volume *find_lv(struct volume_group *vg, const char *lv_name)
+struct logical_volume *find_lv(const struct volume_group *vg,
+			       const char *lv_name)
 {
 	struct lv_list *lvl = find_lv_in_vg(vg, lv_name);
 	return lvl ? lvl->lv : NULL;


             reply	other threads:[~2008-03-13 22:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 22:51 wysochanski [this message]
2009-01-26 22:13 agk
2009-01-27  0:40 agk
2009-01-27  1:48 agk
2009-06-09 14:29 wysochanski
2009-07-08 14:28 wysochanski
2009-07-08 14:31 wysochanski
2009-07-10 21:19 wysochanski
2009-07-15  6:10 mornfall
2009-07-15 17:26 agk
2009-07-26  1:53 wysochanski
2009-07-26  2:02 wysochanski
2010-04-13 17:26 wysochanski
2010-05-19 11:52 wysochanski
2010-06-28 20:36 wysochanski
2010-06-29 22:41 wysochanski

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=20080313225128.11485.qmail@sourceware.org \
    --to=wysochanski@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).