]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdadm/util: unify stat checking blkdev into function
authorZhilong Liu <zlliu@suse.com>
Fri, 5 May 2017 03:09:41 +0000 (11:09 +0800)
committerJes Sorensen <jsorensen@fb.com>
Fri, 5 May 2017 15:05:32 +0000 (11:05 -0400)
commit9e04ac1c43e63eccb68eb196174069e5c23d0270
tree956239ee16ae6d6ad3e8a44703a4bb6b7cd57226
parent0a6bff09d41650f27136d56a0604c9af46b6f583
mdadm/util: unify stat checking blkdev into function

declare function stat_is_blkdev() to integrate repeated stat
checking blkdev operations, it returns 'true/1' when it is a
block device, and returns 'false/0' when it isn't.
The devname is necessary parameter, *rdev is optional, parse
the pointer of dev_t *rdev, if valid, assigned 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>
Assemble.c
Build.c
Incremental.c
Manage.c
Monitor.c
mdadm.h
super-ddf.c
super-intel.c
util.c