[PATCH] md - 1 of 10 - fix return code in set_disk_faulty()

DORMANTno replies

From: NeilBrown <hidden>
Date: 2004-01-16 01:19:37

From: Mike Tran <redacted>

If cannot find the device, return error (ENODEV)
Otherwise, return success (0)

 ----------- Diffstat output ------------
 ./drivers/md/md.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2004-01-16 11:58:51.000000000 +1100
+++ ./drivers/md/md.c	2004-01-16 11:59:05.000000000 +1100
@@ -2354,10 +2354,10 @@ static int set_disk_faulty(mddev_t *mdde
 
 	rdev = find_rdev(mddev, dev);
 	if (!rdev)
-		return 0;
+		return -ENODEV;
 
 	md_error(mddev, rdev);
-	return 1;
+	return 0;
 }
 
 static int md_ioctl(struct inode *inode, struct file *file,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help