diff options
author | NeilBrown <neilb@suse.de> | 2011-07-27 09:26:12 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-27 09:26:12 +0200 |
commit | 6560987b25a88f78ed53d37525d363c126a07b79 (patch) | |
tree | c75a1faafac1760242e49852211f9596f0fc4d5c /sysfs.c | |
parent | IMSM: set ->raid_disk correctly in getinfo_super_imsm_volume (diff) | |
download | mdadm-6560987b25a88f78ed53d37525d363c126a07b79.tar.xz mdadm-6560987b25a88f78ed53d37525d363c126a07b79.zip |
Grow: ensure clean abort if we cannot read the 'completed' file.
If a read of 'completed' returns an error, select will never fail, so
this loop would never exit.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -470,7 +470,7 @@ int sysfs_fd_get_ll(int fd, unsigned long long *val) lseek(fd, 0, 0); n = read(fd, buf, sizeof(buf)); if (n <= 0) - return -1; + return -2; buf[n] = 0; *val = strtoull(buf, &ep, 0); if (ep == buf || (*ep != 0 && *ep != '\n' && *ep != ' ')) |