summaryrefslogtreecommitdiffstats
path: root/libdm/libdm-string.c
Commit message (Collapse)AuthorAgeFilesLines
* libdm-string: Add dm_vasprintf.Petr Rockai2012-07-311-2/+12
|
* Introduce dm_strncpyZdenek Kabelac2012-02-231-0/+10
| | | | | | | 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.
* Missed dm_free in last commitZdenek Kabelac2012-02-231-0/+1
|
* Limit number of mem allocs and copiesZdenek Kabelac2012-02-231-14/+18
| | | | | | | | 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.
* Return error for failing allocationZdenek Kabelac2012-02-101-1/+3
| | | | | Fix case, where final strdup would have failed and it would miss to return failure for this case and return success and NULL pointer.
* Fix memory overwriteZdenek Kabelac2011-09-141-1/+1
| | | | | | | 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.
* Add comments & remove always-included header.Alasdair Kergon2011-09-011-4/+24
|
* Move the core of the lib/config/config.c functionality into libdevmapper,Petr Rockai2011-08-301-0/+222
| | | | | | | 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.
* Move va_end(ap) so we do not leave with return -1 without calling it.Zdenek Kabelac2010-11-231-2/+3
| | | | Remove unneeded ';'
* Use const pointer for return value of dm_basenameZdenek Kabelac2010-10-251-3/+3
| | | | Fix return pointer to const as it is created from passed input const pointer.
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-1/+1
|
* Make mempool optional in dm_split_lvm_name()Alasdair Kergon2009-06-031-1/+1
|
* more tweaking to get things to compile - dmlib.h for log fns, list.hAlasdair Kergon2008-11-031-1/+1
|
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-211-3/+3
|
* Deal with some more compiler warnings. Hope this doesn't break anything...Alasdair Kergon2007-04-271-1/+1
|
* Add dm_event_handler_[gs]et_timeout functions.Alasdair Kergon2007-01-221-1/+2
| | | | Streamline dm_report_field_* interface.
* More libdevmapper-event interface changes and fixes.Alasdair Kergon2007-01-151-1/+1
| | | | Rename dm_saprintf() to dm_asprintf().
* Lots of dmeventd-related changes.Alasdair Kergon2007-01-111-0/+30
|
* fix last checkinAlasdair Kergon2007-01-081-1/+1
|
* Lots of dmevent changes.Alasdair Kergon2007-01-081-0/+8
| | | | | Export dm_basename(). Cope with a trailing space when comparing tables prior to possible reload.
* Add dm_snprintfAlasdair Kergon2006-08-211-0/+22
|
* Add dm_split_words() and dm_split_lvm_name() to libdevmapper.Alasdair Kergon2006-08-211-0/+101