diff options
Diffstat (limited to 'lib/libgeom/geom_util.c')
-rw-r--r-- | lib/libgeom/geom_util.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/libgeom/geom_util.c b/lib/libgeom/geom_util.c index 539b6c6..54844c6 100644 --- a/lib/libgeom/geom_util.c +++ b/lib/libgeom/geom_util.c @@ -114,6 +114,32 @@ g_sectorsize(int fd) } /* + * Return stripe size of the given provider. + */ +off_t +g_stripesize(int fd) +{ + off_t stripesize; + + if (g_ioctl_arg(fd, DIOCGSTRIPESIZE, &stripesize) == -1) + return (-1); + return (stripesize); +} + +/* + * Return stripe size of the given provider. + */ +off_t +g_stripeoffset(int fd) +{ + off_t stripeoffset; + + if (g_ioctl_arg(fd, DIOCGSTRIPEOFFSET, &stripeoffset) == -1) + return (-1); + return (stripeoffset); +} + +/* * Return the correct provider name. */ char * |