- Subject: Re: Ubuntu Patches [14/16]
- From: Phillip Susi <psusi@xxxxxxxxxx>
- Date: Fri, 04 Mar 2011 23:10:18 -0500
- In-reply-to: <4D71AB94.7020902@xxxxxxxxxx>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8
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: dmraid/1.0.0.rc16/lib/device/scan.c
===================================================================
--- dmraid.orig/1.0.0.rc16/lib/device/scan.c 2011-03-04 13:35:34.370625165 -0500
+++ dmraid/1.0.0.rc16/lib/device/scan.c 2011-03-04 13:38:28.030622121 -0500
@@ -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]