| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
As we start refactoring the code to break dependencies (see doc/refactoring.txt),
I want us to use full paths in the includes (eg, #include "base/data-struct/list.h").
This makes it more obvious when we're breaking abstraction boundaries, eg, including a file in
metadata/ from base/
|
|
|
|
|
|
| |
man gives:
snprintf() and vsnprintf() write at most size bytes
(including the terminating null byte ('\0')) to str.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When showing sizes with 'H|human' units we do use standard rounding.
This however is confusing users from time to time,
when the printed number uses some biger units i.e. GiB and there is just
tiny fraction of space missing.
So here is some real-life example with new 'r' unit.
$lvs
LV VG Attr LSize Pool Origin
lvol0 vg -wi-a----- 1.99g
lvol1 vg -wi-a----- <2.00g
lvol2 vg -wi-a----- <2.01g
Meaning is - lvol1 has 'slightly' less then 2.00g - from sign '<' user
can be aware the LV doesn't have full 2.00GiB in size so he
will be less surpriced allocation of 2G volume will not succeed.
$ vgs
VG #PV #LV #SN Attr VSize VFree
vg 2 2 0 wz--n- <6,00g <2,01g
For uses needing 'old' undecorated human unit simply will continue
to use 'H|h' units.
The new R|r may further change when we would recongnize some
other way how to improve readability.
|
|
|
|
|
| |
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
|
|
|
|
| |
Correcting error message.
|
|
|
|
|
| |
Report errors from all error paths correctly.
Validate passed args before dereferencing them.
|
|
|
|
|
| |
Unlikely to happen, but Coverity shown we may have possible
derefer NULL pointer.
|
|
|
|
|
|
| |
Moved out from lib/display and a little documentation added.
It's tuned to LVM's requirements historically and its behaviour
might not always be what you would expect.
|
|
|
|
|
| |
When testing return value from snprintf
use simplier form '>=' instead of '+1 >'.
|
| |
|
|
|
|
| |
Actually moving the existing code from LVM to libdm for reuse.
|
|
|
|
|
| |
Avoid dependency on implicit inclusion of stdarg.h with
libdevmapper.h.
|
|
|
|
|
| |
We support both type of call - with or without mem pool.
So ensure we will not use NULL vgname also when mem is given.
|
| |
|
|
|
|
|
|
|
| |
Should be faster then strncpy - since we could avoid clearing 4KB pages
with each strncpy(...,PATH_MAX).
Also it's easy to check whether string fit - and eventually avoid
to continue working we incomplete string.
|
| |
|
|
|
|
|
|
|
|
| |
If we have good enough glibc to return number of needed chars, do not
loop try to reach good size, but use this size directly for allocation,
saving also last strdup.
Since now we start with 16 bytes - skip buffer realloc for shorter string.
|
|
|
|
|
| |
Fix case, where final strdup would have failed and it would miss to return
failure for this case and return success and NULL pointer.
|
|
|
|
|
|
|
| |
Transfer of build_dm_uuid() function into libdm made uuid_prefix as parameter,
thus sizeof() was replaced with strlen() and room for '\0' missed.
As it's only fix in current version - no whatsnew.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Remove unneeded ';'
|
|
|
|
| |
Fix return pointer to const as it is created from passed input const pointer.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Streamline dm_report_field_* interface.
|
|
|
|
| |
Rename dm_saprintf() to dm_asprintf().
|
| |
|
| |
|
|
|
|
|
| |
Export dm_basename().
Cope with a trailing space when comparing tables prior to possible reload.
|
| |
|
|
|