Alasdair Kergon
a65df0e598
Add dm_zalloc and use it and dm_pool_zalloc throughout.
2010-09-30 21:06:50 +00:00
Alasdair Kergon
3df29c1667
Speed up CRC32 calculations by using a larger lookup table.
...
Use -DDEBUG_CRC32 to revert to old function and check new one gives same result.
2010-09-27 19:09:34 +00:00
Alasdair Kergon
2d3164a59f
Use __attribute__ consistently throughout.
2010-07-09 15:34:40 +00:00
Alasdair Kergon
7b994976e3
Don't ignore error if resuming any LV fails in resume_lvs.
...
Skip closing persistent filter cache file if open failed.
2010-04-12 11:52:53 +00:00
Alasdair Kergon
5685ba7918
Change most remaining log_error WARNING messages to log_warn.
2010-04-01 10:34:09 +00:00
Petr Rockai
03e03fb7a1
Fix the "const discarded" warnings introduced in the unknown segment patch.
2009-10-22 10:38:07 +00:00
Petr Rockai
02a2afb64f
Handle metadata with unknown segment types more gracefully.
2009-10-16 17:41:49 +00:00
Dave Wysochanski
40ec4f631c
Rename _override_settings into override_config_tree_from_string and move.
...
Move _override_settings from tools/lvmcmdline.c into lib/config/config.c
and export so we can re-use in liblvm.
2009-07-27 21:01:56 +00:00
Milan Broz
563b6561a5
Fix confusing metadata syntax error messages.
...
If there is syntax error in metadata, it now prints messages
like:
Couldn't read 'start_extent' for segment 'extent_count'.
Couldn't read all logical volumes for volume group vg_test.
The segment specification is wrong and confusing.
Patch fixes it by introducing "parent" member in config_node which
points to parent section and config_parent_name function, which
provides pointer to node section name.
Also it adds several LV references where possible.
2009-07-09 11:29:00 +00:00
Milan Broz
77dd12a028
fix some issues when compiling with -D DEBUG_POOL
...
- fix compilation issues
- fix wrong pool object maipulation (lvm dumpconfig triggers assert)
- second iteration in loop _log_parallel_areas operates on non-existing object
2009-03-26 09:25:18 +00:00
Alasdair Kergon
a2bfad1c29
Right, a simple build (without options) is working again.
2008-11-03 22:14:30 +00:00
Zdeněk Kabeláč
53959459bb
* more strict const
2008-08-07 14:02:32 +00:00
Alasdair Kergon
2c08336490
Avoid looping forever in _pv_analyze_mda_raw used by pvck.
2008-07-31 13:07:01 +00:00
Alasdair Kergon
58a20d0fb6
Correct config file line numbers in messages when parsing comments. (kabi)
2008-06-03 17:51:04 +00:00
Alasdair Kergon
a109ce1eca
Escape double quotes and backslashes in external metadata and config data.
...
Add functions for escaping double quotes in strings.
Rename count_chars_len to count_chars.
2008-03-12 16:03:22 +00:00
Alasdair Kergon
e581a78d65
Use return_0 in a couple more places.
...
Correct a function name typo in _line_append error message.
2008-03-10 18:51:27 +00:00
Alasdair Kergon
6af3f4f4cf
Use stack return macros throughout.
2008-01-30 13:19:47 +00:00
Alasdair Kergon
d080291150
Clean up numerous compiler warnings that crept in recently.
...
Remove several unused parameters from _allocate().
2007-08-22 14:38:18 +00:00
Alasdair Kergon
3f507a26fb
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Jim Meyering
5e84cb560d
Detect stream write failure reliably; new fn: lvm_fclose; use dm_fclose
...
* lib/misc/lvm-file.c (lvm_fclose): New function.
* lib/misc/lvm-file.h (lvm_fclose): Declare it.
* lib/config/config.c (write_config_file): Use the new function to detect
and diagnose unlikely write failure.
* lib/filters/filter-persistent.c (persistent_filter_dump): Likewise.
* lib/format_text/archive.c (archive_vg): Likewise.
* lib/format_text/format-text.c (_vg_write_file): Likewise.
* lib/log/log.c (fin_log): Similar, but use dm_fclose directly.
Include "\n" at end of each fprintf format string.
2007-07-24 17:48:08 +00:00
Jim Meyering
1ec0d47f10
Use gcc's printf attribute wherever possible.
...
* daemons/clvmd/clvmd.h (debuglog): Add __attribute__((printf)).
* lib/config/config.c (_line_append): Likewise.
* lib/misc/lvm-string.h (emit_to_buffer): Likewise.
2007-07-20 15:38:19 +00:00
Jim Meyering
f232606ec7
In _line_append, use "sizeof buf - 1" rather than equivalent "4095"
...
* lib/config/config.c:
2007-07-20 15:26:39 +00:00
Alasdair Kergon
f1f92eb2e2
Fix dumpconfig to use log_print instead of stdout directly.
2007-07-08 22:51:20 +00:00
Dave Wysochanski
696b8811c2
Fix a couple benign warnings by adding variable initializations.
2007-06-13 15:11:19 +00:00
Alasdair Kergon
fb94fb980a
Fix get_config_uint64() to read a 64-bit value not a 32-bit one.
2007-04-27 20:41:50 +00:00
Dave Wysochanski
7ef99ee4e6
Fix warnings on x86_64 involving ptrdiff_t:
...
config/config.c:493: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
Modified original patch from Jim Meyering <jim@meyering.net>
2007-04-26 16:40:46 +00:00
Dave Wysochanski
8fc854f38e
Add support functions for analysis of config sections,
...
and hence, on-disk LVM2 metadata.
--
2007-04-25 20:38:39 +00:00
Dave Wysochanski
ecc001ed08
Add dev_read_circular, read 2 regions on same device.
2007-04-19 02:10:42 +00:00
Alasdair Kergon
1b76eb1f59
Fix two more segfaults if an empty config file section encountered.
2007-03-08 19:22:52 +00:00
Alasdair Kergon
f813d41a76
Add some missing close() and fclose() return code checks.
...
Fix exit statuses of reporting tools (2.02.19).
2007-01-25 14:37:48 +00:00
Alasdair Kergon
1106b7775a
Fix a segfault if an empty config file section encountered.
2007-01-17 16:22:59 +00:00
Alasdair Kergon
0b9cfc278b
dumpconfig accepts a list of configuration variables to display.
...
Change dumpconfig to use --file to redirect output to a file.
2007-01-09 23:22:31 +00:00
Alasdair Kergon
4e1342b641
fix _find_config_node: null parameter is permitted
2006-11-21 15:13:36 +00:00
Alasdair Kergon
0933036366
Warn if certain duplicate config file entries are seen.
...
(not thoroughly tested)
2006-11-16 17:36:00 +00:00
Alasdair Kergon
6531e88761
Protect .cache manipulations with fcntl locking.
...
Change .cache timestamp comparisons to use ctime.
2006-11-04 03:34:10 +00:00
Alasdair Kergon
984651d99d
Add lvm_getpagesize wrapper.
2006-08-17 18:23:44 +00:00
Alasdair Kergon
608eedf88d
Fix lvcreate corelog validation.
...
Add --config for overriding most config file settings from cmdline.
Quote arguments when printing command line.
Remove linefeed from 'initialising logging' message.
Add 'Completed' debug message.
Don't attempt library exit after reloading config files.
Always compile with libdevmapper, even if device-mapper is disabled.
2006-05-16 16:48:31 +00:00
Alasdair Kergon
4dd1086805
more coverity fixes
2006-05-10 17:49:25 +00:00
Alasdair Kergon
8baf2ef155
missing {
2006-04-28 21:07:19 +00:00
Alasdair Kergon
21ea3f05f4
Ignore empty strings in config files.
2006-04-28 13:30:59 +00:00
Alasdair Kergon
67eb7723d6
Use hash, bitset, malloc, pool from libdevmapper.
2005-10-16 23:03:59 +00:00
Alasdair Kergon
87dbf462cb
Reinstate full PV size when removing from VG.
...
Support loopfiles for testing.
Complete the pv_segment support.
2005-05-03 17:28:23 +00:00
Alasdair Kergon
16521a6feb
pool debugging
2004-11-23 18:23:23 +00:00
Alasdair Kergon
c3941941ce
Support tagged config files.
2004-05-04 18:28:15 +00:00
Alasdair Kergon
66ed5f82c4
Update copyright notices.
2004-03-30 19:35:44 +00:00
Alasdair Kergon
8703ca623f
rename config file vars & always use / as separator
2004-03-08 18:28:45 +00:00
Alasdair Kergon
26e1a08e82
dumpconfig to dump active configuration
2003-10-15 20:17:19 +00:00
Alasdair Kergon
742fc54864
Accept signed numbers in config file.
2003-07-15 16:32:20 +00:00
Alasdair Kergon
8449314da2
Another sync point - numerous fixes & clean ups.
2003-07-04 22:34:56 +00:00
Alasdair Kergon
e8c4bf56fe
Tidy various pre-processing incl. making libdl optional.
2003-03-24 18:08:53 +00:00