summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/dm/dm_ioctl.c')
-rw-r--r--sys/dev/dm/dm_ioctl.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/dev/dm/dm_ioctl.c b/sys/dev/dm/dm_ioctl.c
index dcef331602e..33da8420570 100644
--- a/sys/dev/dm/dm_ioctl.c
+++ b/sys/dev/dm/dm_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_ioctl.c,v 1.36 2019/12/03 15:47:38 tkusumi Exp $ */
+/* $NetBSD: dm_ioctl.c,v 1.37 2019/12/04 15:31:12 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.36 2019/12/03 15:47:38 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.37 2019/12/04 15:31:12 tkusumi Exp $");
/*
* Locking is used to synchronise between ioctl calls and between dm_table's
@@ -297,7 +297,6 @@ int
dm_dev_list_ioctl(prop_dictionary_t dm_dict)
{
prop_array_t dev_list;
-
uint32_t flags;
flags = 0;
@@ -452,9 +451,9 @@ dm_dev_status_ioctl(prop_dictionary_t dm_dict)
* Add status flags for tables I have to check both active and
* inactive tables.
*/
- if ((j = dm_table_get_target_count(&dmv->table_head, DM_TABLE_ACTIVE))) {
+ if ((j = dm_table_get_target_count(&dmv->table_head, DM_TABLE_ACTIVE)))
DM_ADD_FLAG(flags, DM_ACTIVE_PRESENT_FLAG);
- } else
+ else
DM_REMOVE_FLAG(flags, DM_ACTIVE_PRESENT_FLAG);
prop_dictionary_set_uint32(dm_dict, DM_IOCTL_TARGET_COUNT, j);
@@ -665,7 +664,7 @@ dm_table_deps_ioctl(prop_dictionary_t dm_dict)
tbl = dm_table_get_entry(&dmv->table_head, table_type);
SLIST_FOREACH(table_en, tbl, next)
- table_en->target->deps(table_en, cmd_array);
+ table_en->target->deps(table_en, cmd_array);
dm_table_release(&dmv->table_head, table_type);
dm_dev_unbusy(dmv);
@@ -699,9 +698,7 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
prop_dictionary_t target_dict;
const char *name, *uuid, *type;
-
uint32_t flags, ret, minor;
-
char *str;
ret = 0;
@@ -749,7 +746,6 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
prop_dictionary_set_uint32(dm_dict, DM_IOCTL_MINOR, dmv->minor);
while ((target_dict = prop_object_iterator_next(iter)) != NULL) {
-
prop_dictionary_get_cstring_nocopy(target_dict,
DM_TABLE_TYPE, &type);
/*
@@ -797,7 +793,6 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
if ((ret = target->init(dmv, &table_en->target_config,
str)) != 0) {
-
dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
dm_table_destroy(&dmv->table_head, DM_TABLE_INACTIVE);
free(str, M_TEMP);
@@ -885,16 +880,15 @@ dm_table_status_ioctl(prop_dictionary_t dm_dict)
else
table_type = DM_TABLE_ACTIVE;
- if (dm_table_get_target_count(&dmv->table_head, DM_TABLE_ACTIVE))
+ if (dm_table_get_target_count(&dmv->table_head, DM_TABLE_ACTIVE)) {
DM_ADD_FLAG(flags, DM_ACTIVE_PRESENT_FLAG);
- else {
+ } else {
DM_REMOVE_FLAG(flags, DM_ACTIVE_PRESENT_FLAG);
if (dm_table_get_target_count(&dmv->table_head, DM_TABLE_INACTIVE))
DM_ADD_FLAG(flags, DM_INACTIVE_PRESENT_FLAG);
- else {
+ else
DM_REMOVE_FLAG(flags, DM_INACTIVE_PRESENT_FLAG);
- }
}
if (dmv->flags & DM_SUSPEND_FLAG)