public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/commands toolcontext.c
@ 2004-06-29 13:29 agk
0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2004-06-29 13:29 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2004-06-29 13:28:58
Modified files:
lib/commands : toolcontext.c
Log message:
Reduce severity of setlocale failure message (ie suppress during boot).
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.23&r2=1.24
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2012-03-12 14:35 zkabelac
0 siblings, 0 replies; 16+ messages in thread
From: zkabelac @ 2012-03-12 14:35 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-03-12 14:35:58
Modified files:
lib/commands : toolcontext.c
Log message:
Simplify error path code for filter initialization
Use 'int' counter.
Use 'bad' with goto_bad macro.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.154&r2=1.155
--- LVM2/lib/commands/toolcontext.c 2012/03/12 14:15:04 1.154
+++ LVM2/lib/commands/toolcontext.c 2012/03/12 14:35:57 1.155
@@ -730,7 +730,7 @@
static struct dev_filter *_init_filter_components(struct cmd_context *cmd)
{
- unsigned nr_filt = 0;
+ int nr_filt = 0;
const struct dm_config_node *cn;
struct dev_filter *filters[MAX_FILTERS];
struct dev_filter *composite;
@@ -761,14 +761,14 @@
else if (!(filters[nr_filt++] = regex_filter_create(cn->v))) {
log_error("Failed to create regex device filter");
- goto err;
+ goto bad;
}
/* device type filter. Required. */
cn = find_config_tree_node(cmd, "devices/types");
if (!(filters[nr_filt++] = lvm_type_filter_create(cmd->proc_dir, cn))) {
log_error("Failed to create lvm type filter");
- goto err;
+ goto bad;
}
/* md component filter. Optional, non-critical. */
@@ -790,17 +790,14 @@
if (nr_filt == 1)
return filters[0];
- if (!(composite = composite_filter_create(nr_filt, filters))) {
- stack;
- nr_filt++; /* compensate skip NULL */
- goto err;
- }
+ if (!(composite = composite_filter_create(nr_filt, filters)))
+ goto_bad;
return composite;
-err:
- nr_filt--; /* skip NULL */
- while (nr_filt-- > 0)
+bad:
+ while (--nr_filt >= 0)
filters[nr_filt]->destroy(filters[nr_filt]);
+
return NULL;
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2012-03-01 21:16 zkabelac
0 siblings, 0 replies; 16+ messages in thread
From: zkabelac @ 2012-03-01 21:16 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-03-01 21:16:05
Modified files:
lib/commands : toolcontext.c
Log message:
Check for udev_get_dev_dir result
Don't use NULL return value.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.152&r2=1.153
--- LVM2/lib/commands/toolcontext.c 2012/02/27 10:05:35 1.152
+++ LVM2/lib/commands/toolcontext.c 2012/03/01 21:16:05 1.153
@@ -664,8 +664,9 @@
if ((device_list_from_udev = udev_is_running() ?
find_config_tree_bool(cmd, "devices/obtain_device_list_from_udev",
DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV) : 0)) {
- udev_dir = udev_get_dev_dir();
- udev_dir_len = strlen(udev_dir);
+ if (!(udev_dir = udev_get_dev_dir()))
+ stack;
+ udev_dir_len = (udev_dir) ? strlen(udev_dir) : 0;
}
init_obtain_device_list_from_udev(device_list_from_udev);
@@ -687,7 +688,7 @@
return 0;
}
- if (device_list_from_udev) {
+ if (device_list_from_udev && udev_dir) {
len = strlen(cv->v.str);
len = udev_dir_len > len ? len : udev_dir_len;
if (strncmp(udev_dir, cv->v.str, len) ||
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2012-02-08 13:44 zkabelac
0 siblings, 0 replies; 16+ messages in thread
From: zkabelac @ 2012-02-08 13:44 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-02-08 13:44:50
Modified files:
lib/commands : toolcontext.c
Log message:
Move label_init up in code stack
label_exit() is called destroy_toolcontext() and we are now
using standard dm_list function for destroy, we have to make sure
dm_list gets initialized properly.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.149&r2=1.150
--- LVM2/lib/commands/toolcontext.c 2012/02/08 10:46:24 1.149
+++ LVM2/lib/commands/toolcontext.c 2012/02/08 13:44:49 1.150
@@ -896,8 +896,6 @@
const struct dm_config_node *cn;
#endif
- label_init();
-
#ifdef LVM1_INTERNAL
if (!(fmt = init_lvm1_format(cmd)))
return 0;
@@ -1268,6 +1266,7 @@
dm_list_init(&cmd->segtypes);
dm_list_init(&cmd->tags);
dm_list_init(&cmd->config_files);
+ label_init();
/* FIXME Make this configurable? */
reset_lvm_errno(1);
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2011-09-02 12:38 zkabelac
0 siblings, 0 replies; 16+ messages in thread
From: zkabelac @ 2011-09-02 12:38 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2011-09-02 12:38:44
Modified files:
lib/commands : toolcontext.c
Log message:
Add missing 'static' for local function
Avoid missing prototype warning.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.134&r2=1.135
--- LVM2/lib/commands/toolcontext.c 2011/09/02 01:59:07 1.134
+++ LVM2/lib/commands/toolcontext.c 2011/09/02 12:38:43 1.135
@@ -558,7 +558,7 @@
return 1;
}
-struct dm_config_tree *_merge_config_files(struct cmd_context *cmd, struct dm_config_tree *cft)
+static struct dm_config_tree *_merge_config_files(struct cmd_context *cmd, struct dm_config_tree *cft)
{
struct config_tree_list *cfl;
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2011-07-08 17:31 agk
0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2011-07-08 17:31 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2011-07-08 17:31:06
Modified files:
lib/commands : toolcontext.c
Log message:
missing ifdef when new fn unused
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.125&r2=1.126
--- LVM2/lib/commands/toolcontext.c 2011/07/08 16:49:04 1.125
+++ LVM2/lib/commands/toolcontext.c 2011/07/08 17:31:06 1.126
@@ -200,6 +200,7 @@
reset_lvm_errno(1);
}
+#ifdef UDEV_SYNC_SUPPORT
/*
* Until the DM_UEVENT_GENERATED_FLAG was introduced in kernel patch
* 856a6f1dbd8940e72755af145ebcd806408ecedd
@@ -214,6 +215,7 @@
(sscanf(vsn, "%u.%u.%u", &maj, &min, &patchlevel) == 3) &&
(maj == 4 ? min >= 18 : maj > 4);
}
+#endif
static int _process_config(struct cmd_context *cmd)
{
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2011-04-29 16:23 agk
0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2011-04-29 16:23 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2011-04-29 16:23:40
Modified files:
lib/commands : toolcontext.c
Log message:
commands/toolcontext.c:578: warning: ââ¬Ëudev_dirââ¬â¢ may be used uninitialized in this function
commands/toolcontext.c:576: warning: ââ¬Ëudev_dir_lenââ¬â¢ may be used uninitialized in this function
Bogus - suppress them.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.117&r2=1.118
--- LVM2/lib/commands/toolcontext.c 2011/04/28 17:33:35 1.117
+++ LVM2/lib/commands/toolcontext.c 2011/04/29 16:23:39 1.118
@@ -573,9 +573,9 @@
{
const struct config_node *cn;
const struct config_value *cv;
- size_t udev_dir_len, len;
+ size_t uninitialized_var(udev_dir_len), len;
int device_list_from_udev;
- const char *udev_dir;
+ const char *uninitialized_var(udev_dir);
init_dev_disable_after_error_count(
find_config_tree_int(cmd, "devices/disable_after_error_count",
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2010-12-20 14:34 zkabelac
0 siblings, 0 replies; 16+ messages in thread
From: zkabelac @ 2010-12-20 14:34 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2010-12-20 14:34:49
Modified files:
lib/commands : toolcontext.c
Log message:
Verbose log old_umask value
Use old_umask value and print its content through verbose log.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.112&r2=1.113
--- LVM2/lib/commands/toolcontext.c 2010/12/20 13:12:56 1.112
+++ LVM2/lib/commands/toolcontext.c 2010/12/20 14:34:49 1.113
@@ -213,7 +213,8 @@
if ((old_umask = umask((mode_t) cmd->default_settings.umask)) !=
(mode_t) cmd->default_settings.umask)
- log_verbose("Set umask to %04o", cmd->default_settings.umask);
+ log_verbose("Set umask from %04o to %04o",
+ old_umask, cmd->default_settings.umask);
/* dev dir */
if (dm_snprintf(cmd->dev_dir, sizeof(cmd->dev_dir), "%s/",
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2010-07-02 10:25 agk
0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2010-07-02 10:25 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2010-07-02 10:25:16
Modified files:
lib/commands : toolcontext.c
Log message:
remove unneeded header
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.101&r2=1.102
--- LVM2/lib/commands/toolcontext.c 2010/07/02 02:09:57 1.101
+++ LVM2/lib/commands/toolcontext.c 2010/07/02 10:25:16 1.102
@@ -24,7 +24,6 @@
#include "filter-md.h"
#include "filter-persistent.h"
#include "filter-regex.h"
-#include "filter-suspended.h"
#include "filter-sysfs.h"
#include "label.h"
#include "lvm-file.h"
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2010-06-01 21:46 wysochanski
0 siblings, 0 replies; 16+ messages in thread
From: wysochanski @ 2010-06-01 21:46 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2010-06-01 21:46:29
Modified files:
lib/commands : toolcontext.c
Log message:
Do not fail lvm_init() if init_logging() generates an errno.
Revert to original behavior of lvm commands if init_logging() generated an
errno. Fixes rhbz 592967.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.98&r2=1.99
--- LVM2/lib/commands/toolcontext.c 2010/05/21 12:36:31 1.98
+++ LVM2/lib/commands/toolcontext.c 2010/06/01 21:46:29 1.99
@@ -195,6 +195,7 @@
dm_log_with_errno_init(print_log);
#endif
reset_log_duplicated();
+ reset_lvm_errno(1);
}
static int _process_config(struct cmd_context *cmd)
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2009-07-08 18:12 wysochanski
0 siblings, 0 replies; 16+ messages in thread
From: wysochanski @ 2009-07-08 18:12 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-07-08 18:12:08
Modified files:
lib/commands : toolcontext.c
Log message:
Make destroy_toolcontext() better able to handle NULL pointers.
Part of twoerner's log_error() patches.
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.77&r2=1.78
--- LVM2/lib/commands/toolcontext.c 2009/07/08 12:36:01 1.77
+++ LVM2/lib/commands/toolcontext.c 2009/07/08 18:12:08 1.78
@@ -1302,12 +1302,15 @@
label_exit();
_destroy_segtypes(&cmd->segtypes);
_destroy_formats(&cmd->formats);
- cmd->filter->destroy(cmd->filter);
- dm_pool_destroy(cmd->mem);
+ if (cmd->filter)
+ cmd->filter->destroy(cmd->filter);
+ if (cmd->mem)
+ dm_pool_destroy(cmd->mem);
dev_cache_exit();
_destroy_tags(cmd);
_destroy_tag_configs(cmd);
- dm_pool_destroy(cmd->libmem);
+ if (cmd->libmem)
+ dm_pool_destroy(cmd->libmem);
dm_free(cmd);
release_log_memory();
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2009-06-17 20:54 mbroz
0 siblings, 0 replies; 16+ messages in thread
From: mbroz @ 2009-06-17 20:54 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2009-06-17 20:54:20
Modified files:
lib/commands : toolcontext.c
Log message:
Properly destroy toolcontext.
(fixes previous commit)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.75&r2=1.76
--- LVM2/lib/commands/toolcontext.c 2009/06/15 11:56:36 1.75
+++ LVM2/lib/commands/toolcontext.c 2009/06/17 20:54:20 1.76
@@ -517,10 +517,12 @@
struct config_tree_list *cfl;
dm_list_iterate_items(cfl, &cmd->config_files) {
+ if (cfl->cft == cmd->cft)
+ cmd->cft = NULL;
destroy_config_tree(cfl->cft);
}
- if (cmd->cft && cmd->cft->root) {
+ if (cmd->cft) {
destroy_config_tree(cmd->cft);
cmd->cft = NULL;
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2008-09-19 18:26 agk
0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2008-09-19 18:26 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-09-19 18:26:42
Modified files:
lib/commands : toolcontext.c
Log message:
suppress warning if old value found for now
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.62&r2=1.63
--- LVM2/lib/commands/toolcontext.c 2008/09/19 06:41:58 1.62
+++ LVM2/lib/commands/toolcontext.c 2008/09/19 18:26:41 1.63
@@ -267,6 +267,12 @@
cmd->stripe_filler = find_config_tree_str(cmd,
"activation/missing_stripe_filler",
DEFAULT_STRIPE_FILLER);
+
+ /* FIXME Missing error code checks from the stats, not log_warn?, notify if setting overridden, delay message/check till it is actually used (eg consider if lvm shell - file could appear later after this check)? */
+ if (!strcmp(cmd->stripe_filler, "/dev/ioerror") &&
+ stat(cmd->stripe_filler, &st))
+ cmd->stripe_filler = "error";
+
if (strcmp(cmd->stripe_filler, "error")) {
if (stat(cmd->stripe_filler, &st)) {
log_warn("WARNING: activation/missing_stripe_filler = \"%s\" "
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2008-04-02 21:31 agk
0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2008-04-02 21:31 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-04-02 21:31:14
Modified files:
lib/commands : toolcontext.c
Log message:
enable vg metadata cache by default
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.57&r2=1.58
--- LVM2/lib/commands/toolcontext.c 2008/01/30 13:59:58 1.57
+++ LVM2/lib/commands/toolcontext.c 2008/04/02 21:31:14 1.58
@@ -987,6 +987,7 @@
if (!_init_backup(cmd))
goto error;
+ cmd->default_settings.cache_vgmetadata = 1;
cmd->current_settings = cmd->default_settings;
cmd->config_valid = 1;
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2006-05-16 20:42 agk
0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2006-05-16 20:42 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2006-05-16 20:42:01
Modified files:
lib/commands : toolcontext.c
Log message:
fix error path
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39
^ permalink raw reply [flat|nested] 16+ messages in thread
* LVM2/lib/commands toolcontext.c
@ 2004-04-08 17:21 agk
0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2004-04-08 17:21 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2004-04-08 17:21:01
Modified files:
lib/commands : toolcontext.c
Log message:
fix patch that misapplied
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.17&r2=1.18
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-03-12 14:35 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-29 13:29 LVM2/lib/commands toolcontext.c agk
-- strict thread matches above, loose matches on Subject: below --
2012-03-12 14:35 zkabelac
2012-03-01 21:16 zkabelac
2012-02-08 13:44 zkabelac
2011-09-02 12:38 zkabelac
2011-07-08 17:31 agk
2011-04-29 16:23 agk
2010-12-20 14:34 zkabelac
2010-07-02 10:25 agk
2010-06-01 21:46 wysochanski
2009-07-08 18:12 wysochanski
2009-06-17 20:54 mbroz
2008-09-19 18:26 agk
2008-04-02 21:31 agk
2006-05-16 20:42 agk
2004-04-08 17:21 agk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).