diff --git a/mdadm-3.1.5-unused-param.patch b/mdadm-3.1.5-unused-param.patch index 33b3c62..e182274 100644 --- a/mdadm-3.1.5-unused-param.patch +++ b/mdadm-3.1.5-unused-param.patch @@ -95,21 +95,25 @@ } } --- mdadm-3.1.5/sysfs.c.param 2011-03-26 14:03:54.206714522 -0400 -+++ mdadm-3.1.5/sysfs.c 2011-03-26 14:04:37.277821858 -0400 -@@ -422,7 +422,6 @@ int sysfs_set_num(struct mdinfo *sra, st ++++ mdadm-3.1.5/sysfs.c 2011-03-26 14:16:12.101936859 -0400 +@@ -422,7 +422,7 @@ int sysfs_set_num(struct mdinfo *sra, st int sysfs_uevent(struct mdinfo *sra, char *event) { char fname[50]; - int n; ++ unsigned int n; int fd; sprintf(fname, "/sys/block/%s/uevent", -@@ -430,7 +429,7 @@ int sysfs_uevent(struct mdinfo *sra, cha - fd = open(fname, O_WRONLY); - if (fd < 0) +@@ -432,6 +432,11 @@ int sysfs_uevent(struct mdinfo *sra, cha return -1; -- n = write(fd, event, strlen(event)); -+ write(fd, event, strlen(event)); + n = write(fd, event, strlen(event)); close(fd); ++ if (n != strlen(event)) { ++ dprintf(Name ": failed to write '%s' to '%s' (%s)\n", ++ event, fname, strerror(errno)); ++ return -1; ++ } return 0; } +