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

Update error message

Drop INTERNAL_ERROR from public API functions.
Improve some messages.
This commit is contained in:
Zdenek Kabelac 2011-10-19 16:42:14 +00:00
parent 11f64f0aeb
commit 759b9592ba
2 changed files with 5 additions and 5 deletions

View File

@ -126,7 +126,7 @@ int attach_pool_message(struct lv_segment *seg, dm_thin_message_t type,
tmsg->u.delete_id = delete_id;
break;
default:
log_error(INTERNAL_ERROR "Unsupported message type %d", type);
log_error(INTERNAL_ERROR "Unsupported message type %u.", type);
return 0;
}

View File

@ -2880,13 +2880,13 @@ int dm_tree_node_add_thin_pool_message(struct dm_tree_node *node,
struct thin_message *tm;
if (node->props.segment_count != 1) {
log_error(INTERNAL_ERROR "Attempt to use non thin pool segment.");
log_error("Thin pool node must have only one segment.");
return 0;
}
seg = dm_list_item(dm_list_last(&node->props.segs), struct load_segment);
if (seg->type != SEG_THIN_POOL) {
log_error(INTERNAL_ERROR "Attempt to use non thin pool segment %s.",
log_error("Thin pool node has segment type %s.",
dm_segtypes[seg->type].target);
return 0;
}
@ -2898,9 +2898,9 @@ int dm_tree_node_add_thin_pool_message(struct dm_tree_node *node,
switch (message->type) {
case DM_THIN_MESSAGE_CREATE_SNAP:
/* Origin MUST be suspend! */
/* If the thin origin is active, it must be suspend first! */
if (message->u.m_create_snap.device_id == message->u.m_create_snap.origin_id) {
log_error("Same origin used for thin snapshot.");
log_error("Cannot use same device id for origin and its snapshot.");
return 0;
}
if (!_thin_validate_device_id(message->u.m_create_snap.device_id) ||