diff options
| author | haad <haad@NetBSD.org> | 2009-06-05 21:52:31 +0000 |
|---|---|---|
| committer | haad <haad@NetBSD.org> | 2009-06-05 21:52:31 +0000 |
| commit | f5b48500f1089d675892504e2553046e3354ae10 (patch) | |
| tree | 40c971804fa6a544411b12b97c077ffe264c741c /sys/dev/dm/dm_ioctl.c | |
| parent | b05bf051db05da72f9059fa574669157e0e89c0a (diff) | |
Add support for DIOCGDISKINFO to disk like device drivers. Change
partutil.c::getdiskinfo to use it to get disk geometry info.
Use DIOCGWEDGEINFO ioctl to get information about partition size, if disk
driver doesn't support it use old DIOCGDINFO. This patch adds support for
wedge like devices(lvm logical volumes, ZFS zvol partitions) to newfs and
other tools.
No objections on tech-userlevel@.
Diffstat (limited to 'sys/dev/dm/dm_ioctl.c')
| -rw-r--r-- | sys/dev/dm/dm_ioctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/dm/dm_ioctl.c b/sys/dev/dm/dm_ioctl.c index 03f1a91f6bd..b762671f4b2 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.12 2009/06/05 19:56:40 haad Exp $ */ +/* $NetBSD: dm_ioctl.c,v 1.13 2009/06/05 21:52:31 haad Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -247,6 +247,8 @@ dm_dev_create_ioctl(prop_dictionary_t dm_dict) disk_init(dmv->diskp, dmv->name, &dmdkdriver); disk_attach(dmv->diskp); + + dmv->diskp->dk_info = NULL; if ((r = dm_dev_insert(dmv)) != 0) dm_dev_free(dmv); @@ -539,7 +541,7 @@ dm_dev_resume_ioctl(prop_dictionary_t dm_dict) DM_ADD_FLAG(flags, DM_EXISTS_FLAG); - dmgetdisklabel(dmv->diskp->dk_label, &dmv->table_head); + dmgetproperties(dmv->diskp, &dmv->table_head); prop_dictionary_set_uint32(dm_dict, DM_IOCTL_OPEN, dmv->table_head.io_cnt); prop_dictionary_set_uint32(dm_dict, DM_IOCTL_FLAGS, dmv->flags); |
