Bug#367901: mdadm --examine returns non-zero exit code even though
it appears to have been successful
Neil Brown
neilb at suse.de
Fri May 19 00:02:46 UTC 2006
On Thursday May 18, madduck at debian.org wrote:
> Package: mdadm
> Severity: normal
> Version: 2.4.1-1
>
> mdadm:~# mdadm --examine --scan -c partitions ; echo $?
> ARRAY /dev/md0 level=raid5 num-devices=3 UUID=7a2c0483:a2788d6f:be006945:f0cbf15a
> 1
>
>
> I see no reason why mdadm shouldn't exit with code 0...
Neither can I. It'll be fixed in the next release. Thanks.
NeilBrown
Signed-off-by: Neil Brown <neilb at suse.de>
### Diffstat output
./Examine.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff ./Examine.c~current~ ./Examine.c
--- ./Examine.c~current~ 2006-03-27 15:18:48.000000000 +1100
+++ ./Examine.c 2006-05-19 10:00:49.000000000 +1000
@@ -72,10 +72,11 @@ int Examine(mddev_dev_t devlist, int bri
fd = dev_open(devlist->devname, O_RDONLY);
if (fd < 0) {
- if (!scan)
+ if (!scan) {
fprintf(stderr,Name ": cannot open %s: %s\n",
devlist->devname, strerror(errno));
- err = 1;
+ err = 1;
+ }
}
else {
if (!st)
More information about the pkg-mdadm-devel
mailing list