1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

24 Commits

Author SHA1 Message Date
Alasdair Kergon
a93ad77e02 Log value chosen in _find_config_bool like other variable types do. 2012-05-08 14:31:44 +00:00
Petr Rockai
31128d8747 Use 64 bit integers whenever extracting numbers from daemon replies. 2012-03-01 19:54:53 +00:00
Alasdair Kergon
7a3de26248 Fix empty string warning logic in _find_config_str. (1.02.68)
pvcreate gives
WARNING: Ignoring unsupported value for metadata/pvmetadataignore.

It was warning if there is no config file entry instead of only if the node
exists but is empty.
2012-02-28 17:46:47 +00:00
Alasdair Kergon
f41e4fba91 add const 2012-01-23 17:47:36 +00:00
Zdenek Kabelac
dd0fc6d3a8 Update for gcc old-style 2012-01-19 15:16:39 +00:00
Zdenek Kabelac
6298758992 Add dm_config_find_str_allow_empty
Support empty string values.
2011-12-21 12:47:44 +00:00
Petr Rockai
e4de6d2ee0 Make a cleaner split between config tree and config file functionality. Move
the latter out of libdm.
2011-12-18 21:56:03 +00:00
Petr Rockai
bd7ec82f64 Move dm_config_write out of libdm, back to lib/config, as config_write. 2011-12-11 23:18:20 +00:00
Petr Rockai
6d6b259fc0 In the dm_config_*get_* functions, make the actual value retrieval optional
(useful for just checking that a given key is of a given type).
2011-12-11 15:18:32 +00:00
Zdenek Kabelac
bc69125ef0 Fix core on buggy config file
Since fixed within unreleased version so no WHATS_NEW
2011-10-28 20:07:38 +00:00
Zdenek Kabelac
f542af20e2 Add find_config_tree_str_allow_empty
Add function to allow read of empty strings as valid arguments.
Add a warning message if string argument has ignored value.
2011-10-28 20:06:49 +00:00
Zdenek Kabelac
7f7e0704f6 Remove test for NULL
Since it's internal function and we always check for NULL value
before call - this is safe.

Just for case add nonnull attribute so analyzer might better
catch error.
2011-09-25 19:45:40 +00:00
Zdenek Kabelac
ed3d5e9409 Add missing log_error messages 2011-09-25 19:43:43 +00:00
Zdenek Kabelac
f0633627b4 Add backtrace when allocation fails for _type 2011-09-25 19:42:45 +00:00
Zdenek Kabelac
1dd5dfed81 Replace test for NULL of root->child with test for NULL l
It's 100% equivalent test - since it always happen for the first iteration.
But the check for 'l' is understandable with analyzers - since analyzer
is not smart enough to deduce connection between  root->child == NULL.
2011-09-25 19:41:27 +00:00
Zdenek Kabelac
2d2d9ac875 Simplier attribute format
No need to repeat whole declaration for static function.
2011-09-25 19:40:29 +00:00
Zdenek Kabelac
3416af3f5d Chheck for failing filename strdup 2011-09-25 19:39:38 +00:00
Zdenek Kabelac
4da6e11c5a Use NULL for pointers 2011-09-25 19:38:59 +00:00
Alasdair Kergon
5c216d6eb2 Move cascade inside libdm etc.
Makes dumpconfig whole-section output wrong in a different way from before,
but we should be able to merge cft_cmdline properly into cmd->cft now and
remove cascade.
2011-09-02 01:32:08 +00:00
Alasdair Kergon
c147bbddb3 Comments, FIXMEs, name changes. 2011-09-01 21:04:14 +00:00
Zdenek Kabelac
d91c270d1c Use const casting when it's needed
Keep the lookup operation const and use const casting at the dm_ function level.
2011-09-01 14:02:05 +00:00
Petr Rockai
118fa896b7 Replace const usage of dm_config_find_node with more appropriate value-lookup
functionality. A number of bugs (copied and pasted all over the code) should
disappear:

- most string lookup based on dm_config_find_node would segfault when
  encountering a non-zero integer (the intention there was to print an
  error message instead)
- check for required sections in metadata would have been satisfied by
  values as well (i.e. not sections)
- encountering a section in place of expected flag value would have
  segfaulted (due to assumed but unchecked cn->v != NULL)
2011-08-31 15:19:19 +00:00
Petr Rockai
dbe351860e Fix warnings and constness handling in lvmetad-core (adjusting the
dm_config_find_node to give non-const node pointer, since that better reflects
the contract of that function).
2011-08-31 12:39:58 +00:00
Petr Rockai
d60c24dda8 Move the core of the lib/config/config.c functionality into libdevmapper,
leaving behind the LVM-specific parts of the code (convenience wrappers that
handle `struct device` and `struct cmd_context`, basically). A number of
functions have been renamed (in addition to getting a dm_ prefix) -- namely,
all of the config interface now has a dm_config_ prefix.
2011-08-30 14:55:15 +00:00