summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorZhilong Liu <zlliu@suse.com>2017-05-04 14:16:21 +0200
committerJes Sorensen <jsorensen@fb.com>2017-05-05 17:04:02 +0200
commit0a6bff09d41650f27136d56a0604c9af46b6f583 (patch)
tree77af2c5e53c1190e97e821eb5e2243a6276ec733 /mdadm.h
parentmdassemble: Kill off the last remains (diff)
downloadmdadm-0a6bff09d41650f27136d56a0604c9af46b6f583.tar.xz
mdadm-0a6bff09d41650f27136d56a0604c9af46b6f583.zip
mdadm/util: unify fstat checking blkdev into function
declare function fstat_is_blkdev() to integrate repeated fstat checking block device operations, it returns true/1 when it is a block device, and returns false/0 when it isn't. The fd and devname are necessary parameters, *rdev is optional, parse the pointer of dev_t *rdev, if valid, assigned the device number to dev_t *rdev, if NULL, ignores. Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index 07ee9635..4adb8409 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1434,6 +1434,7 @@ extern int check_raid(int fd, char *name);
extern int check_partitions(int fd, char *dname,
unsigned long long freesize,
unsigned long long size);
+extern int fstat_is_blkdev(int fd, char *devname, dev_t *rdev);
extern int get_mdp_major(void);
extern int get_maj_min(char *dev, int *major, int *minor);