summaryrefslogtreecommitdiffstats
path: root/liblvm/lvm_pv.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove duplicate testZdenek Kabelac2012-02-081-5/+5
| | | | | | Tested condition has been already evaluated before For strlen() code has already excluded <ID_LEN. For repairing, already tested (!argc && !repairing) before.
* Add getters for copy_percent and snap_percent to the lvm2app API.Petr Rockai2010-12-141-1/+1
|
* This patch adds helpers to allow users to lookup a lv or pv handle byPetr Rockai2010-11-251-0/+22
| | | | | | | uuid (given a vg_t of course). Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* This patch adds helpers to allow users to lookup a lv or pv handle byPetr Rockai2010-11-251-0/+12
| | | | | | | name (given a vg_t of course). Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Add lvm2app function to query pvseg properties.Petr Rockai2010-11-171-1/+7
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Add a new type and function to lvm2app to enumerate pvsegs.Petr Rockai2010-11-171-0/+27
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Add lvm2app function to query lvseg properties.Petr Rockai2010-11-171-1/+1
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Add lvm_pv_get_property() generic function to obtain value of any pv property.Dave Wysochanski2010-10-251-0/+6
| | | | | | | Add a generic PV property function to lvm2app, similar to VG function. Return lvm_property_value and require caller to check 'is_valid' flag before using the value. If 'is_valid' is not set, then lvm_errno() should be used to obtain the specific error.
* Add pv_uuid_dup, vg_uuid_dup, and lv_uuid_dup, and call id_format_and_copy.Dave Wysochanski2010-09-301-8/+2
| | | | | | | Add supporting functions for pv_uuid, vg_uuid, and lv_uuid. Call new function id_format_and_copy. Use 'const' where appropriate. Add "_dup" suffix to indicate memory is being allocated. Call {pv|vg|lv}_uuid_dup from lvm2app uuid functions.
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-1/+1
|
* Use vg->vgmem to allocate vg/lv/pv string properties instead of dm_malloc/frDave Wysochanski2010-04-191-9/+5
| | | | | | | | Everywhere else in the API the caller can rely on lvm2app taking care of memory allocation and free, so make the 'name' and 'uuid' properties of a vg/lv/pv use the vg handle to allocate memory. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Use INTERNAL_ERROR definition consistently in internal error messages.Alasdair Kergon2010-03-251-1/+1
|
* post-releaseAlasdair Kergon2010-02-161-3/+3
|
* Export lvm_pv_get_size(), lvm_pv_get_free(), lvm_pv_get_dev_size in lvm2app.Dave Wysochanski2010-02-141-0/+15
| | | | | | | | We add these exports to show the pv_size and pv_free and dev_size fields. Fixes rhbz561423. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Make lvm2app pv_t handle definition consistent with lvm_t.Dave Wysochanski2009-08-131-4/+4
| | | | | | | This patch update pv_t handle to be consistent with lvm_t - define as a pointer to internal struct physical_volume. Author: Dave Wysochanski <dwysocha@redhat.com>
* Remove pv_t, vg_t & lv_t handles from lib. Only liblvm uses them.Alasdair Kergon2009-07-291-1/+1
| | | | Rename lvm.h to lvm2app.h for now.
* Use dm_malloc and dm_free in liblvm instead of malloc/free.Dave Wysochanski2009-07-281-1/+1
|
* Remove unnecessary \n's from log_error in liblvm.Dave Wysochanski2009-07-271-1/+1
|
* Add skeletons of lvm_lv_resize and lvm_pv_resize - not yet implemented.Dave Wysochanski2009-07-271-0/+7
| | | | | | | | These lower-priority interfaces are not currently implemented in liblvm but are on the TODO list in the near term. Author: Thomas Woerner <twoerner@redhat.com> Acked-by: Dave Wysochanski <dwysocha@redhat.com>
* Add most all liblvm 'get' functions needed for anaconda.Dave Wysochanski2009-07-261-0/+4
| | | | | | | | | | | | Add the most straightforward 'get' functions required for anaconda. These are the ones that return simple uint64_t values. The other more complex ones involve the lv_attr bits. These will come in a separate patch series since each lv_attr bit will be returned in a separate API instred of returning the string and requiring the user to parse it. Author: Dave Wysochanski <dwysocha@redhat.com>
* Add lvm_{pv|vg|lv}_get_{uuid|name}.Dave Wysochanski2009-07-231-0/+40
Caller must free the memory of the uuid / name returned. This may not be the best memory management policy since it may lead to memory leaks if the caller has code like this: if (!lvm_vg_get_name(vg)) Maybe we don't care - if we do we can use pools tied to handles later or some other scheme. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Acked-by: Thomas Woerner <twoerner@redhat.com>