summaryrefslogtreecommitdiff
path: root/tools/lvscan.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-11-29 12:00:15 -0600
committerDavid Teigland <teigland@redhat.com>2017-02-13 08:20:10 -0600
commit9c6c55c314199a9ba26fe1b864306b2ca8a8dbcd (patch)
treeec7c1cf043023cc2335a61016c47604237b215d2 /tools/lvscan.c
parent1e2420bca85da9a37570871cd70192e9ae831786 (diff)
downloadlvm2-9c6c55c314199a9ba26fe1b864306b2ca8a8dbcd.tar.gz
process_each_lv: add check_single_lv function
The new check_single_lv() function is called prior to the existing process_single_lv(). If the check function returns 0, the LV will not be processed. The check_single_lv function is meant to be a standard method to validate the combination of specific command + specific LV, and decide if the combination is allowed. The check_single function can be used by anything that calls process_each_lv. As commands are migrated to take advantage of command definitions, each command definition gets its own entry point which calls process_each for itself, passing a pair of check_single/process_single functions which can be specific to the narrowly defined command def.
Diffstat (limited to 'tools/lvscan.c')
-rw-r--r--tools/lvscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lvscan.c b/tools/lvscan.c
index 4e188d06d..ab3238b49 100644
--- a/tools/lvscan.c
+++ b/tools/lvscan.c
@@ -119,5 +119,5 @@ int lvscan(struct cmd_context *cmd, int argc, char **argv)
*/
}
- return process_each_lv(cmd, argc, argv, NULL, NULL, 0, NULL, &lvscan_single);
+ return process_each_lv(cmd, argc, argv, NULL, NULL, 0, NULL, NULL, &lvscan_single);
}