Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 930510 Details for
Bug 1108522
Various small fixes for RHEL 7.1 (corosync rebase)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
corosync-cmapctl: Allow -p option to delete keys
tmp.nNMmrE5S5A (text/plain), 2.91 KB, created by
Jan Friesse
on 2014-08-25 14:36:05 UTC
(
hide
)
Description:
corosync-cmapctl: Allow -p option to delete keys
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2014-08-25 14:36:05 UTC
Size:
2.91 KB
patch
obsolete
>From 7a4bb37723777bf6bcd08035696d8d7317c0ce1d Mon Sep 17 00:00:00 2001 >From: Vladislav Bogdanov <bubble@hoster-ok.com> >Date: Tue, 15 Jul 2014 08:08:48 +0000 >Subject: [PATCH] corosync-cmapctl: Allow -p option to delete keys > >Signed-off-by: Vladislav Bogdanov <bubble@hoster-ok.com> >Reviewed-by: Jan Friesse <jfriesse@redhat.com> >--- > man/corosync-cmapctl.8 | 10 +++++++++- > tools/corosync-cmapctl.c | 29 ++++++++++++++++++++++++----- > 2 files changed, 33 insertions(+), 6 deletions(-) > >diff --git a/man/corosync-cmapctl.8 b/man/corosync-cmapctl.8 >index 02fbdc4..661137c 100644 >--- a/man/corosync-cmapctl.8 >+++ b/man/corosync-cmapctl.8 >@@ -49,7 +49,15 @@ for bin, value is file name (or \- for stdin) > corosync\-cmapctl \fB\-p\fR filename > .IP > the format of the file is: >-<key_name> <type> <value> >+[^[^]]<key_name>[ <type> <value>] >+.IP >+Keys prefixed with single caret ('^') are deleted (see \fB\-d\fR). >+.IP >+Keys (actually prefixes) prefixed with double caret ('^^') are deleted by prefix (see \fB\-D\fR). >+.IP >+<type> and <value> are optional (not checked) in above cases. >+.IP >+Other keys are set (see \fB\-s\fR) so both <type> and <value> are required. > .SS "Delete key:" > .IP > corosync\-cmapctl \fB\-d\fR key_name... >diff --git a/tools/corosync-cmapctl.c b/tools/corosync-cmapctl.c >index 7e23ab0..a8da499 100644 >--- a/tools/corosync-cmapctl.c >+++ b/tools/corosync-cmapctl.c >@@ -110,7 +110,11 @@ static int print_help(void) > printf(" corosync-cmapctl -p filename\n"); > printf("\n"); > printf(" the format of the file is:\n"); >- printf(" <key_name> <type> <value>\n"); >+ printf(" [^[^]]<key_name>[ <type> <value>]\n"); >+ printf(" Keys prefixed with single caret ('^') are deleted (see -d).\n"); >+ printf(" Keys (actually prefixes) prefixed with double caret ('^^') are deleted by prefix (see -D).\n"); >+ printf(" <type> and <value> are optional (not checked) in above cases.\n"); >+ printf(" Other keys are set (see -s) so both <type> and <value> are required.\n"); > printf("\n"); > printf("Delete key:\n"); > printf(" corosync-cmapctl -d key_name...\n"); >@@ -705,12 +709,27 @@ static void read_in_config_file(cmap_handle_t handle, char * filename) > > /* > * should be: >- * <key> <type> <value> >+ * [^[^]]<key>[ <type> <value>] > */ > key_name = strtok(line, " \n"); >- key_type_s = strtok(NULL, " \n"); >- key_value_s = strtok(NULL, " \n"); >- set_key(handle, key_name, key_type_s, key_value_s); >+ if (key_name && *key_name == '^') { >+ key_name++; >+ if (*key_name == '^') { >+ key_name++; >+ delete_with_prefix(handle, key_name); >+ } else { >+ cs_error_t err; >+ >+ err = cmap_delete(handle, key_name); >+ if (err != CS_OK) { >+ fprintf(stderr, "Can't delete key %s. Error %s\n", key_name, cs_strerror(err)); >+ } >+ } >+ } else { >+ key_type_s = strtok(NULL, " \n"); >+ key_value_s = strtok(NULL, " \n"); >+ set_key(handle, key_name, key_type_s, key_value_s); >+ } > } > > fclose (fh); >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1108522
:
907995
|
907996
|
907997
|
907998
|
907999
|
908004
|
908111
|
930505
|
930506
|
930507
|
930509
| 930510 |
930511
|
930512
|
930513
|
930514
|
930515
|
930516
|
930517
|
930518
|
930519
|
930527
|
930528
|
930529
|
930530
|
930531
|
930535
|
930536
|
930537
|
930538
|
930539
|
930540
|
931024