1
0
Fork 0

Merging upstream version 4.2+20230223.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:01:59 +01:00
parent 866376462c
commit 30ed170f74
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
76 changed files with 2282 additions and 1386 deletions

View file

@ -475,6 +475,23 @@ int open_mddev(char *dev, int report_errors)
return mdfd;
}
/**
* is_mddev() - check that file name passed is an md device.
* @dev: file name that has to be checked.
* Return: 1 if file passed is an md device, 0 if not.
*/
int is_mddev(char *dev)
{
int fd = open_mddev(dev, 1);
if (fd >= 0) {
close(fd);
return 1;
}
return 0;
}
char *find_free_devnm(int use_partitions)
{
static char devnm[32];