From: agk@sourceware.org <agk@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/config/config.c
Date: 16 Nov 2006 17:36:01 -0000 [thread overview]
Message-ID: <20061116173601.4417.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2006-11-16 17:36:01
Modified files:
. : WHATS_NEW
lib/config : config.c
Log message:
Warn if certain duplicate config file entries are seen.
(not thoroughly tested)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.498&r2=1.499
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/config.c.diff?cvsroot=lvm2&r1=1.48&r2=1.49
--- LVM2/WHATS_NEW 2006/11/16 16:44:48 1.498
+++ LVM2/WHATS_NEW 2006/11/16 17:36:00 1.499
@@ -1,5 +1,6 @@
Version 2.02.15 -
====================================
+ Warn if certain duplicate config file entries are seen.
Enhance lvm_dump.sh for sysreport integration and add man page.
Fix --autobackup argument which could never disable backups.
Fix a label_verify error path.
--- LVM2/lib/config/config.c 2006/11/04 03:34:09 1.48
+++ LVM2/lib/config/config.c 2006/11/16 17:36:00 1.49
@@ -772,6 +772,7 @@
const char *path)
{
const char *e;
+ const struct config_node *cn_found;
while (cn) {
/* trim any leading slashes */
@@ -782,22 +783,30 @@
for (e = path; *e && (*e != sep); e++) ;
/* hunt for the node */
+ cn_found = NULL;
while (cn) {
- if (_tok_match(cn->key, path, e))
- break;
+ if (_tok_match(cn->key, path, e)) {
+ /* Inefficient */
+ if (!cn_found)
+ cn_found = cn;
+ else
+ log_error("WARNING: Ignoring duplicate"
+ " config node: %s ("
+ "seeking %s)", cn->key, path);
+ }
cn = cn->sib;
}
- if (cn && *e)
- cn = cn->child;
+ if (cn_found && *e)
+ cn = cn_found->child;
else
break; /* don't move into the last node */
path = e;
}
- return (struct config_node *) cn;
+ return (struct config_node *) cn_found;
}
static struct config_node *_find_first_config_node(const struct config_node *cn1,
next reply other threads:[~2006-11-16 17:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-16 17:36 agk [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-01-17 16:22 LVM2 ./WHATS_NEW lib/config/config.c agk
2007-03-08 19:22 agk
2007-07-08 22:51 agk
2007-07-20 15:30 meyering
2008-06-03 17:51 agk
2010-11-30 22:23 zkabelac
2010-12-20 13:53 zkabelac
2011-07-21 13:23 zkabelac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061116173601.4417.qmail@sourceware.org \
--to=agk@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.