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