[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 2/5] Add lvmcache function to lookup a vgname from a pvid.



On Wed, Apr 28, 2010 at 11:55:39AM -0400, Dave Wysochanski wrote:
> +char *lvmcache_vgname_from_pvid(struct cmd_context *cmd, const char *pvid)

> +	if (!(vgname = dm_pool_alloc(cmd->mem, NAME_LEN+1))) {
> +		log_errno(ENOMEM, "vgname allocation failed");
> +		return NULL;
> +	}
> +	strncpy(vgname, info->vginfo->vgname, NAME_LEN);
> +	return vgname;


dm_pool_strdup()

Alasdair


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]