From 697e3bb2df5925a6fe632dad919060dc418a2a0e Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 6 Jun 2008 17:36:19 +0000 Subject: [PATCH] back out unnecessary changes for this release --- VERSION | 2 +- WHATS_NEW | 7 ------- lib/log/log.c | 14 -------------- lib/log/log.h | 2 -- lib/metadata/metadata.c | 3 +-- lib/report/report.c | 6 ------ tools/commands.h | 9 +++------ tools/lvm.c | 4 ---- tools/lvmcmdline.c | 16 +--------------- 9 files changed, 6 insertions(+), 57 deletions(-) diff --git a/VERSION b/VERSION index 69bf08b5a..2d46bc7cf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.02.37-cvs (2008-04-29) +2.02.37-cvs (2008-06-06) diff --git a/WHATS_NEW b/WHATS_NEW index 8b70fab62..dd053c8bb 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,10 +1,3 @@ -Version 2.02.38 - -================================= - In script-processing mode, stop if any command fails. - Warn if command exits with non-zero status code without a prior log_error. - Check lv_count in vg_validate. - Add --prefixes to reporting tools for field name prefix output format. - Version 2.02.37 - 6th June 2008 =============================== Make clvmd-cman use a hash rather than an array for node updown info. diff --git a/lib/log/log.c b/lib/log/log.c index e8806619e..f32e56ea3 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -51,7 +51,6 @@ static int _already_logging = 0; static int _mirror_in_sync = 0; static int _dmeventd_monitor = DEFAULT_DMEVENTD_MONITOR; static int _ignore_suspended_devices = 0; -static int _error_message_produced = 0; static lvm2_log_fn_t _lvm2_log_fn = NULL; @@ -239,16 +238,6 @@ void init_indent(int indent) _indent = indent; } -void init_error_message_produced(int error_message_produced) -{ - _error_message_produced = error_message_produced; -} - -int error_message_produced(void) -{ - return _error_message_produced; -} - int test_mode() { return _test; @@ -333,9 +322,6 @@ void print_log(int level, const char *file, int line, const char *format, ...) if (_log_suppress == 2) return; - if (level <= _LOG_ERR) - _error_message_produced = 1; - trformat = _(format); if (_lvm2_log_fn) { diff --git a/lib/log/log.h b/lib/log/log.h index 8b85758bf..d5e0664e7 100644 --- a/lib/log/log.h +++ b/lib/log/log.h @@ -79,7 +79,6 @@ void init_security_level(int level); void init_mirror_in_sync(int in_sync); void init_dmeventd_monitor(int reg); void init_ignore_suspended_devices(int ignore); -void init_error_message_produced(int error_message_produced); void set_cmd_name(const char *cmd_name); @@ -95,7 +94,6 @@ int lockingfailed(void); int security_level(void); int mirror_in_sync(void); int ignore_suspended_devices(void); -int error_message_produced(void); #define DMEVENTD_MONITOR_IGNORE -1 int dmeventd_monitor_mode(void); diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index d385814a8..8fc39515e 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -1213,11 +1213,10 @@ int vg_validate(struct volume_group *vg) if ((lv_count = (uint32_t) list_size(&vg->lvs)) != vg->lv_count + 2 * vg->snapshot_count) { - log_error("Internal error: #internal LVs (%u) != #LVs (%" + log_debug("Internal error: #internal LVs (%u) != #LVs (%" PRIu32 ") + 2 * #snapshots (%" PRIu32 ") in VG %s", list_size(&vg->lvs), vg->lv_count, vg->snapshot_count, vg->name); - r = 0; } list_iterate_items(lvl, &vg->lvs) { diff --git a/lib/report/report.c b/lib/report/report.c index f2ffd9827..d067bd305 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -1091,15 +1091,9 @@ void *report_init(struct cmd_context *cmd, const char *format, const char *keys, if (headings) report_flags |= DM_REPORT_OUTPUT_HEADINGS; - if (field_prefixes) - report_flags |= DM_REPORT_OUTPUT_FIELD_NAME_PREFIX; - rh = dm_report_init(report_type, _report_types, _fields, format, separator, report_flags, keys, cmd); - if (field_prefixes) - dm_report_set_output_field_name_prefix(rh, "lvm2_"); - return rh; } diff --git a/tools/commands.h b/tools/commands.h index efac7594c..7c0921c1c 100644 --- a/tools/commands.h +++ b/tools/commands.h @@ -368,7 +368,6 @@ xx(lvs, "\t[-o|--options [+]Field[,Field]]\n" "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" "\t[-P|--partial] " "\n" - "\t[--prefixes]\n" "\t[--segments]\n" "\t[--separator Separator]\n" "\t[--trustcache]\n" @@ -379,7 +378,7 @@ xx(lvs, "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n", aligned_ARG, all_ARG, ignorelockingfailure_ARG, noheadings_ARG, - nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, prefixes_ARG, + nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, segments_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG) @@ -577,7 +576,6 @@ xx(pvs, "\t[-o|--options [+]Field[,Field]]\n" "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" "\t[-P|--partial] " "\n" - "\t[--prefixes]\n" "\t[--segments]\n" "\t[--separator Separator]\n" "\t[--trustcache]\n" @@ -588,7 +586,7 @@ xx(pvs, "\t[PhysicalVolume [PhysicalVolume...]]\n", aligned_ARG, all_ARG, ignorelockingfailure_ARG, noheadings_ARG, - nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, prefixes_ARG, + nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, segments_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG) @@ -894,7 +892,6 @@ xx(vgs, "\t[-o|--options [+]Field[,Field]]\n" "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" "\t[-P|--partial] " "\n" - "\t[--prefixes]\n" "\t[--separator Separator]\n" "\t[--trustcache]\n" "\t[--unbuffered]\n" @@ -904,7 +901,7 @@ xx(vgs, "\t[VolumeGroupName [VolumeGroupName...]]\n", aligned_ARG, all_ARG, ignorelockingfailure_ARG, noheadings_ARG, - nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, prefixes_ARG, + nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG) xx(vgscan, diff --git a/tools/lvm.c b/tools/lvm.c index 3576515df..7d58ae829 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -236,10 +236,6 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline) log_error("No such command '%s'. Try 'help'.", argv[0]); - if ((ret != ECMD_PROCESSED) && !error_message_produced()) { - log_debug("Internal error: Failed command did not use log_error"); - log_error("Command failed with status code %d.", ret); - } _write_history(); } diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 0344c735e..bb3fdaecc 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -875,8 +875,6 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) int ret = 0; int locking_type; - init_error_message_produced(0); - /* each command should start out with sigint flag cleared */ sigint_clear(); @@ -1098,14 +1096,7 @@ static int _run_script(struct cmd_context *cmd, int argc, char **argv) continue; if (!strcmp(argv[0], "quit") || !strcmp(argv[0], "exit")) break; - ret = lvm_run_command(cmd, argc, argv); - if (ret != ECMD_PROCESSED) { - if (!error_message_produced()) { - log_debug("Internal error: Failed command did not use log_error"); - log_error("Command failed with status code %d.", ret); - } - break; - } + lvm_run_command(cmd, argc, argv); } if (fclose(script)) @@ -1227,11 +1218,6 @@ int lvm2_main(int argc, char **argv, unsigned is_static) if (ret == ENO_SUCH_CMD) log_error("No such command. Try 'help'."); - if ((ret != ECMD_PROCESSED) && !error_message_produced()) { - log_debug("Internal error: Failed command did not use log_error"); - log_error("Command failed with status code %d.", ret); - } - out: lvm_fin(cmd); if (ret == ECMD_PROCESSED) -- 2.43.5