mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
indent
This commit is contained in:
parent
ebae1dc0c6
commit
bb403f3361
@ -21,7 +21,6 @@
|
||||
#include <sys/file.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
/* Arbitrary limits copied from format1/disk_rep.h */
|
||||
#define MAX_PV 256
|
||||
#define MAX_LV 256
|
||||
@ -180,10 +179,9 @@ static struct list *_get_vgs(struct format_instance *fi)
|
||||
slash = rindex(tc->path, '/');
|
||||
if (slash) {
|
||||
vgname = pool_alloc(fi->cmd->mem, strlen(slash));
|
||||
strcpy(vgname, slash+1);
|
||||
}
|
||||
else {
|
||||
vgname = pool_alloc(fi->cmd->mem, strlen(tc->path)+1);
|
||||
strcpy(vgname, slash + 1);
|
||||
} else {
|
||||
vgname = pool_alloc(fi->cmd->mem, strlen(tc->path) + 1);
|
||||
strcpy(vgname, tc->path);
|
||||
}
|
||||
|
||||
@ -225,7 +223,8 @@ static struct list *_get_pvs(struct format_instance *fi)
|
||||
vg = _vg_read(fi, nl->name);
|
||||
if (vg) {
|
||||
list_iterate(pvh, &vg->pvs) {
|
||||
struct pv_list *vgpv = list_item(pvh, struct pv_list);
|
||||
struct pv_list *vgpv =
|
||||
list_item(pvh, struct pv_list);
|
||||
|
||||
pvl = pool_alloc(fi->cmd->mem, sizeof(*pvl));
|
||||
if (!pvl) {
|
||||
@ -297,10 +296,12 @@ static struct physical_volume *_pv_read(struct format_instance *fi,
|
||||
vg = _vg_read(fi, nl->name);
|
||||
if (vg) {
|
||||
list_iterate(pvh, &vg->pvs) {
|
||||
struct pv_list *vgpv = list_item(pvh, struct pv_list);
|
||||
struct pv_list *vgpv =
|
||||
list_item(pvh, struct pv_list);
|
||||
|
||||
if (strcmp(dev_name(vgpv->pv->dev), pv_name) == 0) {
|
||||
pv = pool_alloc(fi->cmd->mem, sizeof(*pv));
|
||||
if (!strcmp(dev_name(vgpv->pv->dev), pv_name)) {
|
||||
pv = pool_alloc(fi->cmd->mem,
|
||||
sizeof(*pv));
|
||||
if (!pv) {
|
||||
stack;
|
||||
pool_free(fi->cmd->mem, vg);
|
||||
@ -309,7 +310,10 @@ static struct physical_volume *_pv_read(struct format_instance *fi,
|
||||
/* Memberwise copy */
|
||||
*pv = *vgpv->pv;
|
||||
|
||||
pv->vg_name = pool_alloc(fi->cmd->mem, strlen(vgpv->pv->vg_name)+1);
|
||||
pv->vg_name =
|
||||
pool_alloc(fi->cmd->mem,
|
||||
strlen(vgpv->pv->
|
||||
vg_name) + 1);
|
||||
if (!pv->vg_name) {
|
||||
stack;
|
||||
pool_free(fi->cmd->mem, vg);
|
||||
@ -327,7 +331,6 @@ static struct physical_volume *_pv_read(struct format_instance *fi,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void _destroy(struct format_instance *fi)
|
||||
{
|
||||
struct text_c *tc = (struct text_c *) fi->private;
|
||||
|
Loading…
x
Reference in New Issue
Block a user