diff options
author | Neil Brown <neilb@suse.de> | 2006-05-29 02:06:32 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-05-29 02:06:32 +0000 |
commit | 9fca7d6236e9775d0269b9802f740c08db46f4d7 (patch) | |
tree | aef0c99d844a3eacf037294e6722079c01c44ae9 /Assemble.c | |
parent | 280a927d3d8da258a70df13df4f780d823fc1da2 (diff) | |
download | mdadm-9fca7d6236e9775d0269b9802f740c08db46f4d7.tar.gz mdadm-9fca7d6236e9775d0269b9802f740c08db46f4d7.tar.xz mdadm-9fca7d6236e9775d0269b9802f740c08db46f4d7.zip |
check return status of all write/fwrite functions as required by glibc 2.4
From: Luca Berra <bluca@vodka.it>
glibc 2.4 is pedantic on ignoring return values from fprintf, fwrite and
write, so now we check the rval and actually do something with it.
in the Grow.c case i only print a warning, since i don't think we can do
anything in case we fail invalidating those superblocks (is should never
happen, but then...)
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r-- | Assemble.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -451,7 +451,9 @@ int Assemble(struct supertype *st, char *mddev, int mdfd, if (strcmp(update, "uuid")==0 && ident->bitmap_fd) - bitmap_update_uuid(ident->bitmap_fd, info.uuid); + if (bitmap_update_uuid(ident->bitmap_fd, info.uuid) != 0) + fprintf(stderr, Name ": Could not update uuid on %s.\n", + devname); } else #endif { |