1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-30 10:50:34 +03:00

Remove use of void * from pvcreate_single.

We should use struct pvcreate_params to utilize compiler typechecking.


Author: Dave Wysochanski <dwysocha@redhat.com>
This commit is contained in:
Dave Wysochanski 2009-07-26 02:02:22 +00:00
parent aaeec65415
commit 458baea830
2 changed files with 3 additions and 6 deletions

View File

@ -355,7 +355,7 @@ struct pvcreate_params {
};
pv_t * pvcreate_single(struct cmd_context *cmd, const char *pv_name,
void *handle);
struct pvcreate_params *pp);
/*
* Utility functions

View File

@ -1119,19 +1119,16 @@ static void fill_default_pvcreate_params(struct pvcreate_params *pp)
* pv_t * (non-NULL): handle to physical volume created
*/
pv_t * pvcreate_single(struct cmd_context *cmd, const char *pv_name,
void *handle)
struct pvcreate_params *pp)
{
struct pvcreate_params *pp;
void *pv;
struct device *dev;
struct dm_list mdas;
struct pvcreate_params default_pp;
fill_default_pvcreate_params(&default_pp);
if (!handle)
if (!pp)
pp = &default_pp;
else
pp = (struct pvcreate_params *) handle;
if (pp->idp) {
if ((dev = device_from_pvid(cmd, pp->idp)) &&