- Subject: [PATCH 12/14] Make dm_test_device() accept /dev/dm-x being a dev node
- From: Phillip Susi <psusi@xxxxxxxxxx>
- Date: Tue, 06 Dec 2011 13:39:35 -0500
- User-agent: quilt/0.48-1
Description: Testing with dm devices was failing on Ubuntu because
/dev/dm-X is the actual device node, but the code wanted it to be
a symlink. Fixed dm_test_device() to test that the file ( or node
it points to ) is a block device, which seems a much more
appropriate test.
Index: b/1.0.0.rc16/lib/device/scan.c
===================================================================
--- a/1.0.0.rc16/lib/device/scan.c
+++ b/1.0.0.rc16/lib/device/scan.c
@@ -86,8 +86,8 @@
{
struct stat s;
- return !lstat(path, &s) &&
- S_ISLNK(s.st_mode) &&
+ return !stat(path, &s) &&
+ S_ISBLK(s.st_mode) &&
!strncmp(get_basename(lc, path), "dm-", 3);
}
_______________________________________________
Ataraid-list mailing list
Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list
[Linux RAID]
[Linux IDE]
[Linux SCSI]
[Kernel]
[Linux Books]
[Linux Admin]
[GFS]
[RPM]
[Photos]
[Yosemite Photos]
[Yosemite News]
[AMD 64]