size = wd->sc_dk.dk_label->d_partitions[part].p_size; if (wdclose(dev, 0, S_IFBLK, NULL) != 0)
size = wd->sc_dk.dk_label->d_partitions[part].p_size * (wd->sc_dk.dk_label->d_secsize / DEV_BSIZE);  if (omask == 0 && wdclose(dev, 0, S_IFBLK, NULL) != 0)
wdsize(dev)	dev_t dev;{	struct wd_softc *wd;	int part;	int size;	WDDEBUG_PRINT(("wdsize\n"));	if (wdopen(dev, 0, S_IFBLK, NULL) != 0)		return -1;	wd = wd_cd.cd_devs[WDUNIT(dev)];	part = WDPART(dev);	if (wd->sc_dk.dk_label->d_partitions[part].p_fstype != FS_SWAP)		size = -1;	else		size = wd->sc_dk.dk_label->d_partitions[part].p_size;	if (wdclose(dev, 0, S_IFBLK, NULL) != 0)		return -1;	return size;}