1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-06 17:18:29 +03:00
Commit Graph

72 Commits

Author SHA1 Message Date
Zdenek Kabelac
7ce534f911 Switch to return void
List delete cannot fail, so there is no reason to test for error.
2012-02-08 12:52:58 +00:00
Petr Rockai
056828e039 Revert the #include changes. Need to fix this at the #include site for now, and
eventually refactor the way we structure #includes in the all of the library.
2011-07-18 14:34:33 +00:00
Petr Rockai
4ac59193ee Add a missing libdevmapper.h #include to lvm-types.h (for dm_list). 2011-07-18 13:24:48 +00:00
Zdenek Kabelac
7e27d8f4db Better const cast logic
(although still gcc gives const violation warning)
2011-04-08 14:14:57 +00:00
Zdenek Kabelac
c05aa13dcf Some const cleanups
Minor const warning fixes and internal API updates.
2010-12-20 13:19:13 +00:00
Zdenek Kabelac
60b5c7dab1 Preserve const for char pointer
Keep char pointers 'const'  (introduced with cling commit).
2010-11-11 12:32:33 +00:00
Alasdair Kergon
3548ba3827 Extend cling allocation policy to recognise PV tags (cling_by_tags).
Add allocation/cling_tag_list to lvm.conf.
2010-11-09 12:34:40 +00:00
Dave Wysochanski
032c2cb462 Remove unnecessary / duplicate dm_list macros and functions.
These are no longer used by anyone.  The dm_list defines are all in
libdevmapper.h and libdm/datastruct/list.c contains any function definitions.
There is some code in "old-tests" that still use this but this code is not
being maintained.

Thanks to Zdenek for spotting this.
2009-11-25 20:44:07 +00:00
Dave Wysochanski
6765f24184 Update error return and comments for lvm_list_vg_names/uuids.
The two liblvm functions that return a list of vgnames and vguuids use
cmd->mem to allocate the list.  Make it clear to the caller that this
memory will be freed when the LVM handle is freed.

Clean up and clarify the return value of the functions.  In the
case of a memory allocation error, add a couple log_errnos to the internal
code, and make it clear that memory allocation returns a NULL pointer.
If there are no VGs in the system, the list returned is an empty list.

Make a note of the fact that currently we return hidden VG names, how
these can be detected (always start with "#"), and that they should
not be used.


Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-27 11:00:17 +00:00
Alasdair Kergon
03ed7d73fc more missing bits 2008-11-04 14:57:06 +00:00
Alasdair Kergon
a2bfad1c29 Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
Alasdair Kergon
2d364d4d80 Improve file descriptor leak detection to display likely culprit and filename. 2008-08-01 19:51:27 +00:00
Alasdair Kergon
456e42257c make list_move consistent with other list fns 2008-04-10 19:14:27 +00:00
Dave Wysochanski
74adbb77b7 Add list_move() support function for list manipulation. 2008-03-26 16:20:54 +00:00
Alasdair Kergon
1ddd4509dc Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
Alasdair Kergon
6af3f4f4cf Use stack return macros throughout. 2008-01-30 13:19:47 +00:00
Alasdair Kergon
d1e46207a5 Fix strdup memory leak in str_list_dup(). 2007-09-17 16:02:46 +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
7454664997 Add "const" attributes where possible: first cut. 2007-08-07 09:06:05 +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
Alasdair Kergon
8b4b6945f8 remove inlines 2006-04-19 18:12:33 +00:00
Alasdair Kergon
70e45ad37b Check for libsepol.
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
Alasdair Kergon
67eb7723d6 Use hash, bitset, malloc, pool from libdevmapper. 2005-10-16 23:03:59 +00:00
Alasdair Kergon
f0c4d9de40 Option for bitset memory allocation using malloc as well as pool. 2005-09-16 18:40:53 +00:00
Alasdair Kergon
99df4f892d Basic support for mirrors. 2005-06-01 16:51:55 +00:00
Alasdair Kergon
6b4f3d63b8 Fix contiguous allocations with linear. 2005-05-11 16:46:59 +00:00
Alasdair Kergon
68254a052a %Zu->zu 2005-05-09 17:45:06 +00:00
Alasdair Kergon
9cdf6c203d more refinements 2005-04-06 15:21:28 +00:00
Alasdair Kergon
839335cae6 Annotate, tidy and extend list.h. 2005-04-06 14:50:37 +00:00
Alasdair Kergon
afd4284403 Extend hash functions to handle non-null-terminated data. 2004-06-18 15:08:22 +00:00
Alasdair Kergon
66ed5f82c4 Update copyright notices. 2004-03-30 19:35:44 +00:00
Alasdair Kergon
6dbf31c0c3 More str_list fns. 2004-03-08 15:23:01 +00:00
Alasdair Kergon
a0a1f1e536 Don't inline hash _find 2004-02-13 15:36:58 +00:00
Alasdair Kergon
9cbe906f60 more str_list fns 2003-10-15 20:04:29 +00:00
Alasdair Kergon
5f8a139347 str_list_del 2003-10-15 20:01:12 +00:00
Alasdair Kergon
9bb009a3fe Extract some common functions. 2003-09-17 20:35:57 +00:00
Alasdair Kergon
8582ec724e Improve segment merge/split code. 2003-09-15 18:22:50 +00:00
Alasdair Kergon
8449314da2 Another sync point - numerous fixes & clean ups. 2003-07-04 22:34:56 +00:00
Alasdair Kergon
475138bceb list_next 2003-05-06 12:01:13 +00:00
Alasdair Kergon
373058a32a Improve build robustness. 2003-04-15 13:24:42 +00:00
Alasdair Kergon
66f6a0e687 size_t tidying 2003-04-02 19:11:23 +00:00
Alasdair Kergon
e8c4bf56fe Tidy various pre-processing incl. making libdl optional. 2003-03-24 18:08:53 +00:00
Alasdair Kergon
6bb20ee09e Fix (rare) cache bug on machines with large /dev directories. 2003-01-10 19:14:01 +00:00
Alasdair Kergon
f58c5e6b30 o Additional device/filter-level debugging messages + duplicate alias fix
o 32/64-bit size_t fix (pjc)
2003-01-08 16:41:22 +00:00
Alasdair Kergon
dd2157534b Default stripesize 64k & config file setting for it;
Clear many compiler warnings (i386) & associated bugs - hopefully without
introducing too many new bugs:-)  (Same exercise required for other archs.)
Default compilation has optimisation - or else use ./configure --enable-debug
2002-12-19 23:25:55 +00:00
Alasdair Kergon
38a90e7669 New column-based reporting tools: lvs, pvs & vgs. 2002-12-12 20:55:49 +00:00
Alasdair Kergon
81c44790d5 Refactoring. 2002-11-18 14:01:16 +00:00
Alasdair Kergon
63875e7591 Merge with text format branch.
Lots of changes/very little testing so far => there'll be bugs!

Use 'vgcreate -M text' to create a volume group with its metadata stored
in text files.  Text format metadata changes should be reasonably atomic,
with a (basic) automatic recovery mechanism if the system crashes while a
change is in progress.

Add a metadata section to lvm.conf to specify multiple directories if
you want (recommended) to keep multiple copies of the metadata (eg on
different filesystems).

e.g. metadata {
        dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"]
}

Plenty of refinements still in the pipeline.
2002-04-24 18:20:51 +00:00
Joe Thornber
83a8021515 o Added a macro called hash_iterate, that is similar to list_iterate
o Renamed hash_iterate function, hash_iter.
2002-02-25 11:52:58 +00:00
Alasdair Kergon
5a933d4bee Add list_iterate that's safe with deletions. 2002-01-29 16:28:52 +00:00