]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - libdisk/md.c
bump version to 2.2, document changes -- sync shared headers, EVMS stripe
[thirdparty/xfsprogs-dev.git] / libdisk / md.c
index 63630bf08b0d47cc97183425eb79ca9e2cc4eff6..5fe10cb5b9a8cfa5189e7706df215c085d818330 100644 (file)
@@ -33,6 +33,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdlib.h>
+#include <unistd.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <volume.h>
@@ -58,7 +59,7 @@ md_get_subvol_stripe(
 {
        if (mnt_is_md_subvol(sb->st_rdev)) {
                struct md_array_info    md;
-               int  fd;
+               int                     fd;
 
                /* Open device */
                fd = open(dfile, O_RDONLY);
@@ -71,6 +72,7 @@ md_get_subvol_stripe(
                                dfile);
                        exit(1);
                }
+               close(fd);
 
                /* Check state */
                if (md.state) {