From: Tomohiro Kusumi Date: Sun, 18 Oct 2015 15:23:11 +0000 (+0900) Subject: sys/dev/disk/dm: Remove dm_get_version_ioctl() X-Git-Tag: v4.5.0~352 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/dddde3e17bc4375bf5a7c778c776b11ca28a1908 sys/dev/disk/dm: Remove dm_get_version_ioctl() "version" command is done by userspace (Linux lvm2), so we really don't need to have any handler for this. --- diff --git a/sys/dev/disk/dm/device-mapper.c b/sys/dev/disk/dm/device-mapper.c index de6bea5730..5a5979f551 100644 --- a/sys/dev/disk/dm/device-mapper.c +++ b/sys/dev/disk/dm/device-mapper.c @@ -110,7 +110,7 @@ MODULE_VERSION(dm, 1); * */ static struct cmd_function cmd_fn[] = { - { .cmd = "version", .fn = dm_get_version_ioctl}, + { .cmd = "version", .fn = NULL}, { .cmd = "targets", .fn = dm_list_versions_ioctl}, { .cmd = "create", .fn = dm_dev_create_ioctl}, { .cmd = "info", .fn = dm_dev_status_ioctl}, @@ -291,7 +291,9 @@ dm_cmd_to_fun(prop_dictionary_t dm_dict) if (cmd_fn[i].cmd == NULL) return EINVAL; - aprint_debug("ioctl %s called\n", cmd_fn[i].cmd); + aprint_debug("ioctl %s called %p\n", cmd_fn[i].cmd, cmd_fn[i].fn); + if (cmd_fn[i].fn == NULL) + return 0; /* No handler required */ r = cmd_fn[i].fn(dm_dict); return r; diff --git a/sys/dev/disk/dm/dm.h b/sys/dev/disk/dm/dm.h index 379e207fa5..9fdaa7a936 100644 --- a/sys/dev/disk/dm/dm.h +++ b/sys/dev/disk/dm/dm.h @@ -222,7 +222,6 @@ int dm_dev_status_ioctl(prop_dictionary_t); int dm_dev_suspend_ioctl(prop_dictionary_t); int dm_check_version(prop_dictionary_t); -int dm_get_version_ioctl(prop_dictionary_t); int dm_list_versions_ioctl(prop_dictionary_t); int dm_table_clear_ioctl(prop_dictionary_t); diff --git a/sys/dev/disk/dm/dm_ioctl.c b/sys/dev/disk/dm/dm_ioctl.c index 9e2720251f..52c3cea6d3 100644 --- a/sys/dev/disk/dm/dm_ioctl.c +++ b/sys/dev/disk/dm/dm_ioctl.c @@ -139,15 +139,6 @@ dm_dbg_print_flags(int flags) return 0; } -/* - * Get version ioctl call I do it as default therefore this - * function is unused now. - */ -int -dm_get_version_ioctl(prop_dictionary_t dm_dict) -{ - return 0; -} /* * Get list of all available targets from global * target list and sent them back to libdevmapper.