]> sourceware.org Git - lvm2.git/commitdiff
Add DISTCLEAN_TARGETS to make template for configure.h.
authorAlasdair Kergon <agk@redhat.com>
Tue, 16 May 2006 20:53:13 +0000 (20:53 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 16 May 2006 20:53:13 +0000 (20:53 +0000)
  More fixes to error paths.

Makefile.in
WHATS_NEW
lib/activate/dev_manager.c
lib/format_text/export.c
lib/metadata/segtype.h
lib/snapshot/snapshot.c
make.tmpl.in

index 1fb34be557f5eae8189b2030e206460951a387dc..6fb323409d0e34faed182ef51017b2d2a4f359d2 100644 (file)
@@ -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
index 8c81d623e7c6716653ce3f41895c66ce3d291be0..c51ec00f5016bae95073ebd15df8d9c38b3151ac 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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.
index 8610012bafe4896c1071e2531734f1261c47b6da..46e659312accbc9a72f0aedb5d65cf516a150101 100644 (file)
@@ -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))
index 5603698cdf26b76d82f384abadb23140eac57b06..65f06d4f33d9557d7722ac8bd3658ed105ad21d9 100644 (file)
@@ -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:
index 0a21ef8b7863204ddac6d2f874f1d174c39957c2..82fbc4d1de40c62c6ed9de3dc808aa7591b87ceb 100644 (file)
@@ -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);
index 691853c3cf45fc0bee51a0186631ef21db3a48be..9d6f54a69197cce5fa4b0a1856b644626f20f06d 100644 (file)
@@ -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)
index 1ee7bd1a8b87b3f5f96025b9767706585aa5b123..8752ee2c4ec8dd8e6c1e0ada4526198fff2697a6 100644 (file)
@@ -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
This page took 0.048426 seconds and 5 git commands to generate.