Merging upstream version 4.2+20230223.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
866376462c
commit
30ed170f74
76 changed files with 2282 additions and 1386 deletions
12
lib.c
12
lib.c
|
@ -164,6 +164,18 @@ char *stat2devnm(struct stat *st)
|
|||
return devid2devnm(st->st_rdev);
|
||||
}
|
||||
|
||||
bool stat_is_md_dev(struct stat *st)
|
||||
{
|
||||
if ((S_IFMT & st->st_mode) != S_IFBLK)
|
||||
return false;
|
||||
if (major(st->st_rdev) == MD_MAJOR)
|
||||
return true;
|
||||
if (major(st->st_rdev) == (unsigned)get_mdp_major())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
char *fd2devnm(int fd)
|
||||
{
|
||||
struct stat stb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue