All of lore.kernel.org
 help / color / mirror / Atom feed
From: zkabelac@sourceware.org <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/lib/cache lvmcache.c
Date: 25 Oct 2010 13:33:43 -0000	[thread overview]
Message-ID: <20101025133343.23659.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac at sourceware.org	2010-10-25 13:33:43

Modified files:
	lib/cache      : lvmcache.c 

Log message:
	Fix constness warnings
	
	After update of device_from_pvid() API fix constness warnings
	Also fix info_from_pvid() constness warning for char* usage.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.c.diff?cvsroot=lvm2&r1=1.96&r2=1.97

--- LVM2/lib/cache/lvmcache.c	2010/10/25 13:02:26	1.96
+++ LVM2/lib/cache/lvmcache.c	2010/10/25 13:33:42	1.97
@@ -514,7 +514,7 @@
 	struct lvmcache_info *info;
 	char *vgname;
 
-	if (!device_from_pvid(cmd, (struct id *)pvid, NULL)) {
+	if (!device_from_pvid(cmd, (const struct id *)pvid, NULL)) {
 		log_error("Couldn't find device with uuid %s.", pvid);
 		return NULL;
 	}
@@ -740,7 +740,7 @@
 	struct lvmcache_info *info;
 
 	/* Already cached ? */
-	if ((info = info_from_pvid((char *) pvid, 0))) {
+	if ((info = info_from_pvid((const char *) pvid, 0))) {
 		if (label_read(info->dev, &label, UINT64_C(0))) {
 			info = (struct lvmcache_info *) label->info;
 			if (id_equal(pvid, (struct id *) &info->dev->pvid))
@@ -751,7 +751,7 @@
 	lvmcache_label_scan(cmd, 0);
 
 	/* Try again */
-	if ((info = info_from_pvid((char *) pvid, 0))) {
+	if ((info = info_from_pvid((const char *) pvid, 0))) {
 		if (label_read(info->dev, &label, UINT64_C(0))) {
 			info = (struct lvmcache_info *) label->info;
 			if (id_equal(pvid, (struct id *) &info->dev->pvid))
@@ -767,7 +767,7 @@
 		*scan_done_once = 1;
 
 	/* Try again */
-	if ((info = info_from_pvid((char *) pvid, 0))) {
+	if ((info = info_from_pvid((const char *) pvid, 0))) {
 		if (label_read(info->dev, &label, UINT64_C(0))) {
 			info = (struct lvmcache_info *) label->info;
 			if (id_equal(pvid, (struct id *) &info->dev->pvid))



             reply	other threads:[~2010-10-25 13:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25 13:33 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-01 21:58 LVM2/lib/cache lvmcache.c zkabelac
2012-03-01 21:57 zkabelac
2012-02-28 18:20 agk
2012-02-28 11:08 zkabelac
2012-02-28 10:10 zkabelac
2012-02-13 14:26 zkabelac
2011-12-08 23:18 agk
2011-04-21 13:15 zkabelac
2011-03-13 23:01 zkabelac
2010-04-30 12:54 zkabelac
2010-03-16 19:06 agk
2010-01-11 19:12 snitzer
2010-01-11 19:08 snitzer
2009-04-24 12:03 mbroz
2008-11-28 15:51 agk
2008-06-06 12:43 agk
2008-04-15 14:54 agk
2008-01-30 16:18 agk
2007-11-05 17:12 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=20101025133343.23659.qmail@sourceware.org \
    --to=zkabelac@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.