1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdevmapper: revoke commit 7c86131233

We have "help" and "?" defined as implicit fields now. As such, we
don't need to export these names in libdevmapper (as it was introduced
by commit 7c86131233 within this release).
If anyone uses these field names by mistake, the libdevmapper code can
error out correctly if it detects that the set of explicit field names
(the ones supplied by "fields" arg in dm_report_init/dm_report_init_with_selection)
contains any of the implicit field names (the ones defined internally
by libdevmapper itself).
This commit is contained in:
Peter Rajnoha 2014-06-19 15:47:24 +02:00
parent cd7325f18d
commit a40bc36b2e
3 changed files with 4 additions and 9 deletions

View File

@ -19,7 +19,6 @@ Version 1.02.88 -
Document env var 'DM_DEFAULT_NAME_MANGLING_MODE' in dmsetup man page. Document env var 'DM_DEFAULT_NAME_MANGLING_MODE' in dmsetup man page.
Warn user about incorrect use of cookie with 'dmsetup remove --force'. Warn user about incorrect use of cookie with 'dmsetup remove --force'.
Also recognize 'help'/'?' as reserved sort key name to show help. Also recognize 'help'/'?' as reserved sort key name to show help.
Export recognized DM_REPORT_FIELD_RESERVED_NAME_{HELP,HELP_ALT} to show help.
Add dm_units_to_factor for size unit parsing. Add dm_units_to_factor for size unit parsing.
Increase bitset size for minors for thin dmeventd plugin. Increase bitset size for minors for thin dmeventd plugin.

View File

@ -1642,10 +1642,6 @@ struct dm_report_field;
#define DM_REPORT_FIELD_TYPE_ID_LEN 32 #define DM_REPORT_FIELD_TYPE_ID_LEN 32
#define DM_REPORT_FIELD_TYPE_HEADING_LEN 32 #define DM_REPORT_FIELD_TYPE_HEADING_LEN 32
/* Reserved field names for special purposes. */
#define DM_REPORT_FIELD_RESERVED_NAME_HELP "help" /* shows help */
#define DM_REPORT_FIELD_RESERVED_NAME_HELP_ALT "?" /* shows help */
struct dm_report; struct dm_report;
struct dm_report_field_type { struct dm_report_field_type {
uint32_t type; /* object type id */ uint32_t type; /* object type id */

View File

@ -194,8 +194,8 @@ struct row {
*/ */
#define COMMON_REPORT_TYPE 0x80000000 #define COMMON_REPORT_TYPE 0x80000000
#define COMMON_FIELD_SELECTED_ID "selected" #define COMMON_FIELD_SELECTED_ID "selected"
#define COMMON_FIELD_HELP_ID DM_REPORT_FIELD_RESERVED_NAME_HELP #define COMMON_FIELD_HELP_ID "help"
#define COMMON_FIELD_HELP_ALT_ID DM_REPORT_FIELD_RESERVED_NAME_HELP_ALT #define COMMON_FIELD_HELP_ALT_ID "?"
static void *_null_returning_fn(void *obj __attribute__((unused))) static void *_null_returning_fn(void *obj __attribute__((unused)))
{ {
@ -2663,8 +2663,8 @@ struct dm_report *dm_report_init_with_selection(uint32_t *report_types,
} }
rh->reserved_values = reserved_values; rh->reserved_values = reserved_values;
if (!strcasecmp(selection, DM_REPORT_FIELD_RESERVED_NAME_HELP) || if (!strcasecmp(selection, COMMON_FIELD_HELP_ID) ||
!strcmp(selection, DM_REPORT_FIELD_RESERVED_NAME_HELP_ALT)) { !strcmp(selection, COMMON_FIELD_HELP_ALT_ID)) {
_display_fields(rh, 0, 1); _display_fields(rh, 0, 1);
log_warn(" "); log_warn(" ");
_display_selection_help(rh); _display_selection_help(rh);