Changeset View
Changeset View
Standalone View
Standalone View
head/tests/sys/aio/aio_test.c
Show First 20 Lines • Show All 661 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
int error, fd, mdctl_fd, unit; | int error, fd, mdctl_fd, unit; | ||||
char pathname[PATH_MAX]; | char pathname[PATH_MAX]; | ||||
struct aio_context ac; | struct aio_context ac; | ||||
struct md_ioctl mdio; | struct md_ioctl mdio; | ||||
char buf[80]; | char buf[80]; | ||||
ATF_REQUIRE_KERNEL_MODULE("aio"); | ATF_REQUIRE_KERNEL_MODULE("aio"); | ||||
ATF_REQUIRE_UNSAFE_AIO(); | |||||
mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); | mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); | ||||
ATF_REQUIRE_MSG(mdctl_fd != -1, | ATF_REQUIRE_MSG(mdctl_fd != -1, | ||||
"opening /dev/%s failed: %s", MDCTL_NAME, strerror(errno)); | "opening /dev/%s failed: %s", MDCTL_NAME, strerror(errno)); | ||||
bzero(&mdio, sizeof(mdio)); | bzero(&mdio, sizeof(mdio)); | ||||
mdio.md_version = MDIOVERSION; | mdio.md_version = MDIOVERSION; | ||||
mdio.md_type = MD_MALLOC; | mdio.md_type = MD_MALLOC; | ||||
▲ Show 20 Lines • Show All 522 Lines • Show Last 20 Lines |