summaryrefslogtreecommitdiffstats
path: root/tools/dmsetup.c
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: drop unneeded included header filesZdenek Kabelac2012-08-231-1/+0
| | | | | This headers were not resolving anything used for compiled .c files. Remove unused util.c file.
* dmsetup: check if new_name is non NULLZdenek Kabelac2012-08-231-1/+1
|
* dmsetup: fix udev warning messageZdenek Kabelac2012-08-231-1/+1
| | | | Configure option is --enable-udev_sync.
* dmsetup: fix memleak in _get_split_nameZdenek Kabelac2012-08-231-1/+3
| | | | Free allocated buffer in _get_split_name error path.
* dmsetup: allow --noflush with status/wait for thinAlasdair G Kergon2012-07-271-2/+5
| | | | | Allow --noflush with dmsetup status and wait (for thin target 1.3.0 / ioctl 4.23.0).
* Remove unsupported udev_get_dev_path libudev call used for checking udev dir.Peter Rajnoha2012-05-291-18/+12
| | | | | | | | | | | | With latest changes in the udev, some deprecated functions were removed from libudev amongst which there was the "udev_get_dev_path" function we used to compare a device directory used in udev and directore set in libdevmapper. The "/dev" is hardcoded in udev now (udev version >= 183). Amongst other changes and from packager's point of view, it's also important to note that the libudev development library ("libudev-devel") could now be a part of the systemd development library ("systemd-devel") because of the udev + systemd merge.
* Also rename DevNos header to DevNosUsed in dmsetup info -c output.Peter Rajnoha2012-04-241-1/+1
|
* Rename (Blk)DevNames header to (Blk)DevNamesUsed in dmsetup info -c output.Peter Rajnoha2012-04-241-2/+2
| | | | | | | | | | | | | | | Just to make it clearer since there is the "dmsetup info -c -o blkdevname" as well that shows the "block device name for this mapping", having a "BlkDevName" header on output. It's a bit confusing then if the "dmsetup info -c -o devs_used,blkdevs_used" is named with a plural "DevNames"/"BlkDevNames" but at the same time having a totally different meaning than the singular form "BlkDevName". DevNames --> DevNamesUsed BlkDevNames --> BlkDevNamesUsed ...makes it much more comprehensible.
* Adjust wordingAlasdair Kergon2012-03-061-1/+1
|
* Check for multiple mangled names in auto mangling mode.Peter Rajnoha2012-03-051-0/+6
| | | | | Auto mode can't deal with multiple mangled names. We can do that while working in hex mode, but in auto mode, this would lead to device name ambiguity.
* Add some more pointer validationZdenek Kabelac2012-03-011-3/+8
| | | | | Ensure _display_name() and _add_dep() would not deref NULL names. Switch to use internal dm_basename().
* Test alloc failZdenek Kabelac2012-03-011-1/+3
|
* Using enum types for enumsZdenek Kabelac2012-02-281-1/+1
| | | | alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
* Add some log_sys_errors to close() callZdenek Kabelac2012-02-271-3/+5
|
* Simplify with dm_strdupZdenek Kabelac2012-02-151-2/+1
|
* Fix segfault in dmsetup when using table specification with --table.Peter Rajnoha2012-02-151-1/+5
| | | | | Segfault introduced with the patch that added dm_free(_table) at the end of dmsetup (in this release).
* Add mangle command to dmsetup to provide renaming to correct mangled form.Peter Rajnoha2012-02-151-6/+78
|
* Add 'mangled_name' and 'unmangled_name' fields to dmsetup info -c -o.Peter Rajnoha2012-02-151-0/+34
|
* Add --manglename option to dmsetup to select the name mangling mode.Peter Rajnoha2012-02-151-1/+18
|
* Ensure allocated device does not leak on error pathZdenek Kabelac2012-02-131-1/+5
| | | | For unimplementd canonicalize_file_name set to NULL
* Add few missing allocation failures testsZdenek Kabelac2012-02-131-9/+23
|
* Ensure strncpy() function always ends with '\0'Zdenek Kabelac2012-02-081-1/+2
| | | | | Since last character needs to be \0 for string, pass buffer size smaller by 1 byte.
* Tiny cleanupZdenek Kabelac2012-01-201-19/+19
| | | | | Just remove double braces from conditions when they are not really needed. (So it doesn't look like an assignment and comparison).
* Add dmsetup 'wipe_table' to replace table with one that uses error target.Alasdair Kergon2012-01-181-1/+2
|
* Support different device name types on output of dmsetup deps, ls and info ↵Peter Rajnoha2012-01-111-24/+158
| | | | | | | | -c command. Add 'blkdevname' and 'blkdevs_used' field to dmsetup info -c -o. Add 'blkdevname' option to dmsetup ls --tree to see block device names. Add '-o options' to dmsetup deps and ls to select device name type on output.
* update old commentAlasdair Kergon2011-12-011-1/+6
|
* Add --retry option for dmsetup remove to retry removal if not successful.Peter Rajnoha2011-09-221-1/+8
|
* pre-release fixes incl make distclean and configure --with-raid=none/sharedAlasdair Kergon2011-08-111-1/+1
|
* Remove dev name prefix from dmsetup line output if major and minor is used.Milan Broz2011-08-111-1/+2
|
* Minor memory leak fixZdenek Kabelac2011-08-041-2/+4
| | | | | | Defer the test of the function return value after the string memory is released. Otherwise in this error path the string would present memory leak. (Thought in this case we are already out of memory...)
* Remove dev name prefix from dmsetup line output if exactly one dev requested.Alasdair Kergon2011-07-081-11/+5
|
* Add framework for validation of ioctls. Doesn't do any checks yet.Alasdair Kergon2011-07-011-3/+48
| | | | | | dmsetup --checks libdevmapper: dm_task_enable_checks() lvm.conf: activation/checks=1
* Add age filter to dmsetup udevcomplete_all to minimise concurrency problems.Alasdair Kergon2011-06-291-10/+31
|
* Move udev_only logic inside stacked node op code.Alasdair Kergon2011-06-271-6/+6
| | | | | | (We still need to treat add+readhead+del as a no-op.) Rename udev_fallback to verify_udev_operations. Rename --udevfallback to --verifyudev
* Disable udev fallback and add --udevfallback option to dmsetup.Peter Rajnoha2011-06-171-15/+19
|
* Require libudev >= 143 when compiling with udev support.Peter Rajnoha2011-04-221-1/+0
| | | | | Old versions of libudev < 143 were experimental and unstable. Require recent and stable versions only (version 143 is old enough anyway).
* Fix some unmatching sign comparation gcc warningsZdenek Kabelac2011-04-081-1/+1
| | | | Simple replacement for unsigned type - usually in for() loops.
* Add attribute printfZdenek Kabelac2011-03-291-0/+1
|
* Const warning fixesZdenek Kabelac2011-03-291-4/+4
| | | | | | With recent update of dm_report_field_string() API call to accept completely const objects - we no longer need loose constness here and keep it forwarding.
* Accept multiple mapped device names on many dmsetup command lines.Alasdair Kergon2011-03-021-134/+125
|
* Fix dm_udev_wait calls in dmsetup to occur before readahead display not after.Alasdair Kergon2011-03-021-11/+7
| | | | Include an implicit dm_task_update_nodes() within dm_udev_wait().
* Fix gcc warnings for unused variablesZdenek Kabelac2011-02-181-3/+2
| | | | Put dead assigment code into comment.
* Add configure option --with-device-nodes-onZdenek Kabelac2011-02-041-8/+24
| | | | | | | | | | Make configurable default behaviour how to deal with device node creates. With udev system natural options should be 'resume'. For older systems where user expect there is node in /dev/mapper immediately after dmsetup create --notable - use 'create' FIXME: Code needs fixing passing this flag through udev cookie.
* Add --addnodeonresume, --addnodeoncreateZdenek Kabelac2011-02-041-1/+22
| | | | | | | | | | | | | | | | Add new function dm_task_set_add_node() to select between 2 types of node creation in device directory. DM_ADD_NODE_ON_RESUME is now default and ensures node is created on resume. Old original behavior is accessible with DM_ADD_NODE_ON_CREATE. In this case node would be created during dmsetup create --notable. For the user 2 new options for dmsetup create are added: [{--addnodeonresume | --addnodeoncreate }] Properly working node creation on resume is needed for proper operation stacking and ability to correctly check in which state the device should after whole udev transation.
* Remove dead assignmentZdenek Kabelac2010-12-201-3/+1
| | | | | Variable 'r' is never read so remove it and just cast result from _error_device function to (void).
* Switch void* to char* arithmeticZdenek Kabelac2010-12-201-3/+3
|
* Test uuid for NULLZdenek Kabelac2010-11-301-1/+3
| | | | | | | Add test for NULL before passing uuid as src argument to memcpy. As memcpy function is declared as function not accepting NULL. Though we pass NULL only with zero length so this patch presents no functional change to the code.
* Fix memory leak in error pathZdenek Kabelac2010-11-241-0/+1
| | | | Release allocated path buffer in error path.
* Fix constness warningZdenek Kabelac2010-10-251-1/+1
| | | | | Fix usage of const 'data' pointer and also assign void* directly without uneeded cast for C.
* Add --setuuid to dmsetup rename.Alasdair Kergon2010-10-151-2/+9
| | | | Add dm_task_set_newuuid to set uuid of mapped device post-creation. (pjones)