Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dm dm: Remove unneeded dm_get_version_ioctl()
details: https://anonhg.NetBSD.org/src/rev/7c91c0ce0da3
branches: trunk
changeset: 967327:7c91c0ce0da3
user: tkusumi <tkusumi%NetBSD.org@localhost>
date: Thu Dec 05 15:52:39 2019 +0000
description:
dm: Remove unneeded dm_get_version_ioctl()
"version" is implemented and handled in userspace,
hence dm ioctl doesn't need to support it.
taken-from: DragonFlyBSD
diffstat:
sys/dev/dm/device-mapper.c | 8 +++++---
sys/dev/dm/dm.h | 3 +--
sys/dev/dm/dm_ioctl.c | 15 ++-------------
3 files changed, 8 insertions(+), 18 deletions(-)
diffs (82 lines):
diff -r 59c264741486 -r 7c91c0ce0da3 sys/dev/dm/device-mapper.c
--- a/sys/dev/dm/device-mapper.c Thu Dec 05 10:25:41 2019 +0000
+++ b/sys/dev/dm/device-mapper.c Thu Dec 05 15:52:39 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: device-mapper.c,v 1.44 2019/12/04 16:55:30 tkusumi Exp $ */
+/* $NetBSD: device-mapper.c,v 1.45 2019/12/05 15:52:39 tkusumi Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -134,7 +134,7 @@
int (*fn)(prop_dictionary_t);
int allowed;
} cmd_fn[] = {
- { .cmd = "version", .fn = dm_get_version_ioctl, .allowed = 1 },
+ { .cmd = "version", .fn = NULL, .allowed = 1 },
{ .cmd = "targets", .fn = dm_list_versions_ioctl, .allowed = 1 },
{ .cmd = "create", .fn = dm_dev_create_ioctl, .allowed = 0 },
{ .cmd = "info", .fn = dm_dev_status_ioctl, .allowed = 1 },
@@ -413,7 +413,9 @@
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;
r = cmd_fn[i].fn(dm_dict);
return r;
diff -r 59c264741486 -r 7c91c0ce0da3 sys/dev/dm/dm.h
--- a/sys/dev/dm/dm.h Thu Dec 05 10:25:41 2019 +0000
+++ b/sys/dev/dm/dm.h Thu Dec 05 15:52:39 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm.h,v 1.32 2019/12/04 16:54:03 tkusumi Exp $ */
+/* $NetBSD: dm.h,v 1.33 2019/12/05 15:52:39 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -251,7 +251,6 @@
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 -r 59c264741486 -r 7c91c0ce0da3 sys/dev/dm/dm_ioctl.c
--- a/sys/dev/dm/dm_ioctl.c Thu Dec 05 10:25:41 2019 +0000
+++ b/sys/dev/dm/dm_ioctl.c Thu Dec 05 15:52:39 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_ioctl.c,v 1.37 2019/12/04 15:31:12 tkusumi Exp $ */
+/* $NetBSD: dm_ioctl.c,v 1.38 2019/12/05 15:52:39 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.37 2019/12/04 15:31:12 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.38 2019/12/05 15:52:39 tkusumi Exp $");
/*
* Locking is used to synchronise between ioctl calls and between dm_table's
@@ -161,17 +161,6 @@
}
/*
- * 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.
*/
Home |
Main Index |
Thread Index |
Old Index