Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/libefi/efipart.c
Show First 20 Lines • Show All 943 Lines • ▼ Show 20 Lines | efipart_close(struct open_file *f) | ||||
pd = efiblk_get_pdinfo((struct devdesc *)dev); | pd = efiblk_get_pdinfo((struct devdesc *)dev); | ||||
if (pd == NULL) | if (pd == NULL) | ||||
return (EINVAL); | return (EINVAL); | ||||
pd->pd_open--; | pd->pd_open--; | ||||
if (pd->pd_open == 0) { | if (pd->pd_open == 0) { | ||||
pd->pd_blkio = NULL; | pd->pd_blkio = NULL; | ||||
if (dev->dd.d_dev->dv_type != DEVT_DISK) { | |||||
bcache_free(pd->pd_bcache); | bcache_free(pd->pd_bcache); | ||||
pd->pd_bcache = NULL; | pd->pd_bcache = NULL; | ||||
} | |||||
} | } | ||||
if (dev->dd.d_dev->dv_type == DEVT_DISK) | if (dev->dd.d_dev->dv_type == DEVT_DISK) | ||||
return (disk_close(dev)); | return (disk_close(dev)); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
efipart_ioctl(struct open_file *f, u_long cmd, void *data) | efipart_ioctl(struct open_file *f, u_long cmd, void *data) | ||||
▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines |