diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2010-10-25 13:33:42 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2010-10-25 13:33:42 +0000 |
commit | faa1268182e9b8989cbc13db4072541b6593df19 (patch) | |
tree | d2e86b3737b8fb1840f827ddcadce98972772c64 /lib/cache/lvmcache.c | |
parent | a636bccabae4945f28fc7f350af375d35c4fd943 (diff) | |
download | lvm2-faa1268182e9b8989cbc13db4072541b6593df19.tar.gz lvm2-faa1268182e9b8989cbc13db4072541b6593df19.tar.xz lvm2-faa1268182e9b8989cbc13db4072541b6593df19.zip |
Fix constness warnings
After update of device_from_pvid() API fix constness warnings
Also fix info_from_pvid() constness warning for char* usage.
Diffstat (limited to 'lib/cache/lvmcache.c')
-rw-r--r-- | lib/cache/lvmcache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 83ac1a5a..60edcec0 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -514,7 +514,7 @@ char *lvmcache_vgname_from_pvid(struct cmd_context *cmd, const char *pvid) 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 device *device_from_pvid(struct cmd_context *cmd, const struct id *pvid, 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 @@ struct device *device_from_pvid(struct cmd_context *cmd, const struct id *pvid, 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 @@ struct device *device_from_pvid(struct cmd_context *cmd, const struct id *pvid, *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)) |