Re: Ubuntu Patches [14/16]

Phillip Susi <[email protected]> Sat, 19 Mar 2011 13:51:57 -0400
Newsgroups gmane.linux.ataraid
Message-ID <[email protected]>
Repost: formalized the description and cleaned up stylistic errors

_______________________________________________
Ataraid-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ataraid-list
21_fix_testing.patch (text/x-patch, 733 B)
From: Phillip Susi <[email protected]>
Last-Update: 2011-03-08
Forwarded: yes
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);
 }
signature.asc (application/pgp-signature, 262 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2E7T0ACgkQJ4UciIs+XuLwGwCfdNEkpgDPlkxydLWvyEY6rwpA
KjwAniXMLXS0X6IuvA+DU+ynOgp+hzW8
=nxhA
-----END PGP SIGNATURE-----