From: Zdenek Kabelac Date: Mon, 25 Oct 2010 13:02:26 +0000 (+0000) Subject: Use 'const' struct id *pvid for device_from_pvid() X-Git-Tag: old-v2_02_75~9 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=e0256ba49a35d1758ab05b0c765a00de538d7d22;p=lvm2.git Use 'const' struct id *pvid for device_from_pvid() Update interface for device_from_pvid and use const pointer. --- diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 35d6f76c6..83ac1a5a4 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -733,7 +733,7 @@ struct dm_list *lvmcache_get_pvids(struct cmd_context *cmd, const char *vgname, return pvids; } -struct device *device_from_pvid(struct cmd_context *cmd, struct id *pvid, +struct device *device_from_pvid(struct cmd_context *cmd, const struct id *pvid, unsigned *scan_done_once) { struct label *label; diff --git a/lib/cache/lvmcache.h b/lib/cache/lvmcache.h index 4966a5ca3..28f85418f 100644 --- a/lib/cache/lvmcache.h +++ b/lib/cache/lvmcache.h @@ -94,7 +94,7 @@ struct lvmcache_vginfo *vginfo_from_vgname(const char *vgname, struct lvmcache_vginfo *vginfo_from_vgid(const char *vgid); struct lvmcache_info *info_from_pvid(const char *pvid, int valid_only); const char *vgname_from_vgid(struct dm_pool *mem, const char *vgid); -struct device *device_from_pvid(struct cmd_context *cmd, struct id *pvid, +struct device *device_from_pvid(struct cmd_context *cmd, const struct id *pvid, unsigned *scan_done_once); const char *pvid_from_devname(struct cmd_context *cmd, const char *dev_name);