1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

pvcreate: remove metadata.h header

Files in tools/ should only use metadata-exported.h not metadata.h.
Rename pvcreate_locked to pvcreate_single.
This commit is contained in:
Alasdair G Kergon 2013-07-09 02:37:56 +01:00
parent dd302daf64
commit 8adddbf101
6 changed files with 13 additions and 18 deletions

View File

@ -481,10 +481,8 @@ struct lvresize_params {
const char *ac_type;
};
struct physical_volume *pvcreate_single(struct cmd_context *cmd,
const char *pv_name,
struct pvcreate_params *pp,
int write_now);
int pvcreate_single(struct cmd_context *cmd, const char *pv_name,
struct pvcreate_params *pp);
void pvcreate_params_set_defaults(struct pvcreate_params *pp);
/*

View File

@ -635,7 +635,7 @@ static int vg_extend_single_pv(struct volume_group *vg, char *pv_name,
"physical volume", pv_name);
return 0;
} else if (!pv && pp) {
if (!(pv = pvcreate_single(vg->cmd, pv_name, pp, 0)))
if (!(pv = pvcreate_vol(vg->cmd, pv_name, pp, 0)))
return_0;
}
if (!add_pv_to_vg(vg, pv_name, pv, pp)) {
@ -1487,7 +1487,7 @@ static int _pvcreate_write(struct cmd_context *cmd, struct pv_to_create *pvc)
}
/*
* pvcreate_single() - initialize a device with PV label and metadata area
* pvcreate_vol() - initialize a device with PV label and metadata area
*
* Parameters:
* - pv_name: device path to initialize
@ -1497,10 +1497,8 @@ static int _pvcreate_write(struct cmd_context *cmd, struct pv_to_create *pvc)
* NULL: error
* struct physical_volume * (non-NULL): handle to physical volume created
*/
struct physical_volume * pvcreate_single(struct cmd_context *cmd,
const char *pv_name,
struct pvcreate_params *pp,
int write_now)
struct physical_volume *pvcreate_vol(struct cmd_context *cmd, const char *pv_name,
struct pvcreate_params *pp, int write_now)
{
struct physical_volume *pv = NULL;
struct device *dev;

View File

@ -345,8 +345,8 @@ int pvremove_single(struct cmd_context *cmd, const char *pv_name,
void *handle __attribute__((unused)), unsigned force_count,
unsigned prompt);
int pvcreate_locked(struct cmd_context *cmd, const char *pv_name,
struct pvcreate_params *pp);
struct physical_volume *pvcreate_vol(struct cmd_context *cmd, const char *pv_name,
struct pvcreate_params *pp, int write_now);
/* Manipulate PV structures */
int pv_add(struct volume_group *vg, struct physical_volume *pv);

View File

@ -786,8 +786,8 @@ out:
return r;
}
int pvcreate_locked(struct cmd_context *cmd, const char *pv_name,
struct pvcreate_params *pp)
int pvcreate_single(struct cmd_context *cmd, const char *pv_name,
struct pvcreate_params *pp)
{
int r = 0;
@ -796,7 +796,7 @@ int pvcreate_locked(struct cmd_context *cmd, const char *pv_name,
return 0;
}
if (!(pvcreate_single(cmd, pv_name, pp, 1)))
if (!(pvcreate_vol(cmd, pv_name, pp, 1)))
goto_out;
r = 1;

View File

@ -235,7 +235,7 @@ int lvm_pv_create(lvm_t libh, const char *pv_name, uint64_t size)
pp.size = size_sectors;
if (!pvcreate_locked(cmd, pv_name, &pp))
if (!pvcreate_single(cmd, pv_name, &pp))
return -1;
return 0;

View File

@ -15,7 +15,6 @@
#include "tools.h"
#include "metadata-exported.h"
#include "metadata.h"
/*
* Intial sanity checking of recovery-related command-line arguments.
@ -113,7 +112,7 @@ int pvcreate(struct cmd_context *cmd, int argc, char **argv)
dm_unescape_colons_and_at_signs(argv[i], NULL, NULL);
if (!pvcreate_locked(cmd, argv[i], &pp))
if (!pvcreate_single(cmd, argv[i], &pp))
ret = ECMD_FAILED;
}