Bug#274859: [help needed] RAID and /dev advice needed

2005-05-24 Thread martin f krafft
also sprach Neil Brown [EMAIL PROTECTED] [2005.05.24.0258 +0200]:
  Neil?  Is there a good reason for lstat here?  It apparently breaks on
  devfs.  (Ref. http://bugs.debian.org/274859)
 
 No, it is a bug.  It should be 'stat', not 'lstat'.

This seems trivial enough. I am running a test now.

Thanks.

-- 
Please do not send copies of list mail to me; I read the list!
 
 .''`. martin f. krafft [EMAIL PROTECTED]
: :'  :proud Debian developer, admin, user, and author
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
 
gilmour's guitar sounds good
 whether you've got a bottle of cider in your hand
 or a keyboard and a mouse.
-- prof. bruce maxwell


signature.asc
Description: Digital signature


Bug#274859: [help needed] RAID and /dev advice needed

2005-05-24 Thread martin f krafft
also sprach martin f krafft [EMAIL PROTECTED] [2005.05.24.1028 +0200]:
 This seems trivial enough. I am running a test now.

Seems to work; thanks Peter!

Rockin'!

-- 
Please do not send copies of list mail to me; I read the list!
 
 .''`. martin f. krafft [EMAIL PROTECTED]
: :'  :proud Debian developer, admin, user, and author
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
 
the perfect gun is an idealist without any ideal.
  -- mc 900 ft jesus


signature.asc
Description: Digital signature


Bug#274859: [help needed] RAID and /dev advice needed

2005-05-23 Thread Peter Samuelson

tags 274859 +patch
thanks

[martin f krafft]
 I checked out the source and opening is not hard... but mdadm also
 creates device nodes and uses S_ISBLK all over the place, so I don't
 really know whether adding a || S_ISLNK will fix it.

I didn't actually test this, but I honestly don't see why lstat() is
used here, instead of stat() which is used everywhere else.

Neil?  Is there a good reason for lstat here?  It apparently breaks on
devfs.  (Ref. http://bugs.debian.org/274859)

Peter

--- mdadm-1.9.0/mdopen.c~   2005-02-03 18:45:23.0 -0600
+++ mdadm-1.9.0/mdopen.c2005-05-23 19:34:12.0 -0500
@@ -97,7 +97,7 @@
return -1;
}
stb.st_mode = 0;
-   if (lstat(dev, stb)==0  ! S_ISBLK(stb.st_mode)) {
+   if (stat(dev, stb)==0  ! S_ISBLK(stb.st_mode)) {
fprintf(stderr, Name : %s is not a block device.\n,
dev);
return -1;


signature.asc
Description: Digital signature


Bug#274859: [help needed] RAID and /dev advice needed

2005-05-23 Thread Neil Brown
On Monday May 23, [EMAIL PROTECTED] wrote:
 
 tags 274859 +patch
 thanks
 
 [martin f krafft]
  I checked out the source and opening is not hard... but mdadm also
  creates device nodes and uses S_ISBLK all over the place, so I don't
  really know whether adding a || S_ISLNK will fix it.
 
 I didn't actually test this, but I honestly don't see why lstat() is
 used here, instead of stat() which is used everywhere else.
 
 Neil?  Is there a good reason for lstat here?  It apparently breaks on
 devfs.  (Ref. http://bugs.debian.org/274859)

Maybe it what there deliberately to break devfs ??? ;-)

No, it is a bug.  It should be 'stat', not 'lstat'.

Thanks,
NeilBrown

 
 Peter
 
 --- mdadm-1.9.0/mdopen.c~ 2005-02-03 18:45:23.0 -0600
 +++ mdadm-1.9.0/mdopen.c  2005-05-23 19:34:12.0 -0500
 @@ -97,7 +97,7 @@
   return -1;
   }
   stb.st_mode = 0;
 - if (lstat(dev, stb)==0  ! S_ISBLK(stb.st_mode)) {
 + if (stat(dev, stb)==0  ! S_ISBLK(stb.st_mode)) {
   fprintf(stderr, Name : %s is not a block device.\n,
   dev);
   return -1;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]