1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm: update DM_ABORT_ON_INTERNAL_ERRORS

Update behavior to disable  aborting when macro is unset
or its set to 0.  In other cases it will abort.
i.e. set to anything....
This commit is contained in:
Zdenek Kabelac 2013-08-06 15:22:26 +02:00
parent 139a62fc0b
commit 16c1dacb6e

View File

@ -127,9 +127,9 @@ static void _default_log_line(int level,
}
if (_abort_on_internal_errors < 0)
/* Set when env DM_ABORT_ON_INTERNAL_ERRORS is 1 */
/* Set when env DM_ABORT_ON_INTERNAL_ERRORS is not "0" */
_abort_on_internal_errors =
!strcmp(getenv("DM_ABORT_ON_INTERNAL_ERRORS") ? : "0", "1");
strcmp(getenv("DM_ABORT_ON_INTERNAL_ERRORS") ? : "0", "0");
if (_abort_on_internal_errors &&
!strncmp(f, INTERNAL_ERROR, sizeof(INTERNAL_ERROR) - 1))