1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Improve debug stack trace

dm_check_version reports log_error() - so use return_NULL.
This commit is contained in:
Zdenek Kabelac 2011-03-18 13:21:02 +00:00
parent 52a5cd31c4
commit 681858db90
3 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.64 - Version 1.02.64 -
=================================== ===================================
Improve stack debug reporting in dm_task_create().
Fallback to control node creation only if node doesn't exist yet. Fallback to control node creation only if node doesn't exist yet.
Change dm_hash API for binary data to accept const void *key. Change dm_hash API for binary data to accept const void *key.
Fix memory access of empty params string in _reload_with_suppression_v4(). Fix memory access of empty params string in _reload_with_suppression_v4().

View File

@ -965,8 +965,10 @@ int dm_check_version(void)
if (_check_version(dmversion, sizeof(dmversion), _dm_compat)) if (_check_version(dmversion, sizeof(dmversion), _dm_compat))
return 1; return 1;
if (!_dm_compat) if (!_dm_compat) {
log_error("Support for older device-mapped version is disabled.");
goto bad; goto bad;
}
log_verbose("device-mapper ioctl protocol version %u failed. " log_verbose("device-mapper ioctl protocol version %u failed. "
"Trying protocol version 1.", _dm_version); "Trying protocol version 1.", _dm_version);

View File

@ -183,7 +183,7 @@ struct dm_task *dm_task_create(int type)
if (!dm_check_version()) { if (!dm_check_version()) {
dm_free(dmt); dm_free(dmt);
return NULL; return_NULL;
} }
dmt->type = type; dmt->type = type;