mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add DISTCLEAN_TARGETS to make template for configure.h.
More fixes to error paths.
This commit is contained in:
parent
f7dd14588f
commit
aba30ebcdb
@ -38,6 +38,7 @@ ifeq ($(MAKECMDGOALS),distclean)
|
||||
lib/snapshot \
|
||||
po \
|
||||
test/mm test/device test/format1 test/regex test/filters
|
||||
DISTCLEAN_TARGETS += lib/misc/configure.h
|
||||
endif
|
||||
|
||||
include make.tmpl
|
||||
|
@ -1,5 +1,7 @@
|
||||
Version 2.02.07 -
|
||||
=================================
|
||||
Add DISTCLEAN_TARGETS to make template for configure.h.
|
||||
More fixes to error paths.
|
||||
Fix lvcreate corelog validation.
|
||||
Add --config for overriding most config file settings from cmdline.
|
||||
Quote arguments when printing command line.
|
||||
|
@ -329,7 +329,7 @@ static int _percent_run(struct dev_manager *dm, const char *name,
|
||||
|
||||
if (segtype->ops->target_percent &&
|
||||
!segtype->ops->target_percent(&dm->target_state, dm->mem,
|
||||
dm->cmd->cft, seg, params,
|
||||
dm->cmd, seg, params,
|
||||
&total_numerator,
|
||||
&total_denominator,
|
||||
percent))
|
||||
|
@ -613,46 +613,27 @@ static int _build_pv_names(struct formatter *f, struct volume_group *vg)
|
||||
struct physical_volume *pv;
|
||||
char buffer[32], *name;
|
||||
|
||||
if (!(f->mem = dm_pool_create("text pv_names", 512))) {
|
||||
stack;
|
||||
goto bad;
|
||||
}
|
||||
if (!(f->mem = dm_pool_create("text pv_names", 512)))
|
||||
return_0;
|
||||
|
||||
if (!(f->pv_names = dm_hash_create(128))) {
|
||||
stack;
|
||||
goto bad;
|
||||
}
|
||||
if (!(f->pv_names = dm_hash_create(128)))
|
||||
return_0;
|
||||
|
||||
list_iterate_items(pvl, &vg->pvs) {
|
||||
pv = pvl->pv;
|
||||
|
||||
/* FIXME But skip if there's already an LV called pv%d ! */
|
||||
if (lvm_snprintf(buffer, sizeof(buffer), "pv%d", count++) < 0) {
|
||||
stack;
|
||||
goto bad;
|
||||
}
|
||||
if (lvm_snprintf(buffer, sizeof(buffer), "pv%d", count++) < 0)
|
||||
return_0;
|
||||
|
||||
if (!(name = dm_pool_strdup(f->mem, buffer))) {
|
||||
stack;
|
||||
goto bad;
|
||||
}
|
||||
if (!(name = dm_pool_strdup(f->mem, buffer)))
|
||||
return_0;
|
||||
|
||||
if (!dm_hash_insert(f->pv_names, dev_name(pv->dev), name)) {
|
||||
stack;
|
||||
goto bad;
|
||||
}
|
||||
if (!dm_hash_insert(f->pv_names, dev_name(pv->dev), name))
|
||||
return_0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
bad:
|
||||
if (f->mem)
|
||||
dm_pool_destroy(f->mem);
|
||||
|
||||
if (f->pv_names)
|
||||
dm_hash_destroy(f->pv_names);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _text_vg_export(struct formatter *f,
|
||||
@ -664,35 +645,33 @@ static int _text_vg_export(struct formatter *f,
|
||||
stack;
|
||||
goto out;
|
||||
}
|
||||
#define fail do {stack; goto out;} while(0)
|
||||
|
||||
if (f->header && !_print_header(f, desc))
|
||||
fail;
|
||||
goto_out;
|
||||
|
||||
if (!out_text(f, "%s {", vg->name))
|
||||
fail;
|
||||
goto_out;
|
||||
|
||||
_inc_indent(f);
|
||||
|
||||
if (!_print_vg(f, vg))
|
||||
fail;
|
||||
goto_out;
|
||||
|
||||
outnl(f);
|
||||
if (!_print_pvs(f, vg))
|
||||
fail;
|
||||
goto_out;
|
||||
|
||||
outnl(f);
|
||||
if (!_print_lvs(f, vg))
|
||||
fail;
|
||||
goto_out;
|
||||
|
||||
_dec_indent(f);
|
||||
if (!out_text(f, "}"))
|
||||
fail;
|
||||
goto_out;
|
||||
|
||||
if (!f->header && !_print_header(f, desc))
|
||||
fail;
|
||||
goto_out;
|
||||
|
||||
#undef fail
|
||||
r = 1;
|
||||
|
||||
out:
|
||||
|
@ -72,7 +72,7 @@ struct segtype_handler {
|
||||
struct dm_tree_node *node, uint64_t len,
|
||||
uint32_t *pvmove_mirror_count);
|
||||
int (*target_percent) (void **target_state, struct dm_pool * mem,
|
||||
struct config_tree *cft,
|
||||
struct cmd_context *cmd,
|
||||
struct lv_segment *seg, char *params,
|
||||
uint64_t *total_numerator,
|
||||
uint64_t *total_denominator, float *percent);
|
||||
|
@ -89,7 +89,7 @@ static int _snap_text_export(const struct lv_segment *seg, struct formatter *f)
|
||||
#ifdef DEVMAPPER_SUPPORT
|
||||
static int _snap_target_percent(void **target_state __attribute((unused)),
|
||||
struct dm_pool *mem __attribute((unused)),
|
||||
struct config_tree *cft __attribute((unused)),
|
||||
struct cmd_context *cmd __attribute((unused)),
|
||||
struct lv_segment *seg __attribute((unused)),
|
||||
char *params, uint64_t *total_numerator,
|
||||
uint64_t *total_denominator, float *percent)
|
||||
|
@ -195,8 +195,8 @@ clean: $(SUBDIRS.clean)
|
||||
$(SOURCES:%.c=%.pot) $(LDDEPS)
|
||||
|
||||
distclean: $(SUBDIRS.distclean)
|
||||
$(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
|
||||
$(SOURCES:%.c=%.pot) $(LDDEPS) \
|
||||
$(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(DISTCLEAN_TARGETS) \
|
||||
$(SOURCES:%.c=%.d) $(SOURCES:%.c=%.pot) $(LDDEPS) \
|
||||
config.cache config.log config.status \
|
||||
Makefile make.tmpl core \
|
||||
version.h lvm2.po
|
||||
|
Loading…
Reference in New Issue
Block a user