1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/libdm
Peter Rajnoha 2d48ef7f04 select: add FLD_UNCOMPARABLE flag for fields which can't be compared
A field where it has no meaning to do any type of comparison is the
implicit "help" or "?" field. The error given was a bit cryptic
before this patch, the FLD_UNCOMPARABLE flag makes it easier to identify
this situation anywhere in the code and provide much better error message.
This flag can be applied to other fields that may appear in the future -
mostly usable for implicit fields as they always have special purpose
(so we're not exporting it in libdevmapper for now - usual reporting
fields don't need this).

Before this patch:

$ vgs -S help=1
  dm_report_object: no data assigned to field help
  dm_report_object: no data assigned to field help

(...which is true actually, but let's provide something better...)

With this patch applied:

$vgs -S help=1
  Selection field is uncomparable: help.
  Selection syntax error at 'help=1'.

$vgs -S '(name=vg && help=1) || vg_size > 1g'
  Selection field is uncomparable: help.
  Selection syntax error at 'help=1) || vg_size > 1g'.
2014-06-23 10:09:58 +02:00
..
datastruct Use void pointer instead of char for binary key 2011-03-10 12:48:40 +00:00
ioctl libdm: cleanup complation without DM_IOCTLS 2014-04-30 10:26:29 +02:00
misc cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
mm debug: avoid warning when compiled with valgrind 2014-03-27 13:13:08 +01:00
regex cleanup: stack usage 2013-07-01 23:11:14 +02:00
.exported_symbols Generate liblvm2app and libdevmapper exported symbols from header files. 2010-06-25 18:17:38 +00:00
libdevmapper.h libdevmapper: revoke commit 7c86131233 2014-06-19 16:09:32 +02:00
libdevmapper.pc.in Switch to use Requires.private for devmapper.pc and lvm2app.pc 2010-05-11 08:54:11 +00:00
libdm-common.c udev: also print subsystem udev flags in debug message about udev flags + fix typo DM_SUBSSYTEM_UDEV_FLAG7 -> DM_SUBSYSTEM_UDEV_FLAG7 2014-05-27 14:44:11 +02:00
libdm-common.h libdm: introduce and use DEV_UUID macro 2012-10-10 17:16:15 +02:00
libdm-config.c cleanup: include stdarg.h where needed. 2014-04-18 16:38:50 +02:00
libdm-deptree.c activation: Remove empty DM device when table fails to load. 2014-05-28 10:17:15 -05:00
libdm-file.c Drop unreachable code 2012-02-08 12:59:45 +00:00
libdm-report.c select: add FLD_UNCOMPARABLE flag for fields which can't be compared 2014-06-23 10:09:58 +02:00
libdm-string.c cleanup: use const for endptr in dm_units_to_factor 2014-05-26 12:09:01 +02:00
Makefile.in libdm: Add missing UDEV_CFLAGS. 2014-04-01 15:26:26 +02:00