dm: allow targets to return output from messages they are sent
Could be useful for a target to return stats or other information. If a target does DMEMIT() anything to @result from its .message method then it must return 1 to the caller. Signed-off-By: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
@@ -1595,7 +1595,7 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
|
||||
DMWARN("Target message sector outside device.");
|
||||
r = -EINVAL;
|
||||
} else if (ti->type->message)
|
||||
r = ti->type->message(ti, argc, argv);
|
||||
r = ti->type->message(ti, argc, argv, result, maxlen);
|
||||
else {
|
||||
DMWARN("Target type does not support messages");
|
||||
r = -EINVAL;
|
||||
|
Reference in New Issue
Block a user