Lines Matching refs:statsfd
51 static int pagesize, statsfd = -1; variable
57 if (statsfd == -1) in geom_stats_close()
61 close (statsfd); in geom_stats_close()
62 statsfd = -1; in geom_stats_close()
72 if (statsfd == -1) in geom_stats_resync()
74 error = ioctl(statsfd, DIOCGMEDIASIZE, &mediasize); in geom_stats_resync()
79 p = mmap(statp, mediasize, PROT_READ, MAP_SHARED, statsfd, 0); in geom_stats_resync()
94 if (statsfd != -1) in geom_stats_open()
96 statsfd = open(_PATH_DEV DEVSTAT_DEVICE_NAME, O_RDONLY); in geom_stats_open()
97 if (statsfd < 0) in geom_stats_open()
101 p = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, statsfd, 0); in geom_stats_open()
104 close(statsfd); in geom_stats_open()
105 statsfd = -1; in geom_stats_open()