master - cleanup: use log_warn
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6cb2c35d1654558efc1b37ca44d77f83682446c7 Commit: 6cb2c35d1654558efc1b37ca44d77f83682446c7 Parent: ee37838b1149f3f8d5c34dc2d459421f8e085bbb Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Mar 8 10:29:49 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Mar 8 10:40:27 2018 +0100
cleanup: use log_warn
There message are not causing command failure thus turn them into warnings.
--- lib/activate/dev_manager.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
lib/activate/dev_manager.c +5 -3
@@ -447,13 +447,15 @@ static int _ignore_suspended_snapshot_component(struct device *dev) next =dm_get_next_target (dmt, next, &start, &length, &target_type, ¶ms);if (!target_type || !strcmp (target_type,TARGET_NAME_SNAPSHOT )) {if (!params ||sscanf (params,"%d:%d %d:%d" , &major1, &minor1, &major2, &minor2) !=4 ) { -log_error ("Incorrect snapshot table found." ); +log_warn ("WARNING: Incorrect snapshot table found for %d:%d." , + (int )MAJOR (dev->dev), (int )MINOR (dev->dev)); goto out; } r = r ||_device_is_suspended (major1, minor1) ||_device_is_suspended (major2, minor2); }else if (!strcmp (target_type,TARGET_NAME_SNAPSHOT_ORIGIN )) {if (!params ||sscanf (params,"%d:%d" , &major1, &minor1) !=2 ) { -log_error ("Incorrect snapshot-origin table found." ); +log_warn ("WARNING: Incorrect snapshot-origin table found for %d:%d." , + (int )MAJOR (dev->dev), (int )MINOR (dev->dev)); goto out; } r = r ||_device_is_suspended (major1, minor1);
@@ -488,7 +490,7 @@ static int _ignore_unusable_thins(struct device *dev)dm_get_next_target (dmt, next, &start, &length, &target_type, ¶ms);if (!params ||sscanf (params,"%d:%d" , &major, &minor) !=2 ) { -log_error ("Failed to get thin-pool major:minor for thin device %d:%d." , +log_warn ("WARNING: Cannot get thin-pool major:minor for thin device %d:%d." , (int )MAJOR (dev->dev), (int )MINOR (dev->dev)); goto out; }