[PATCH nvme-cli] fabrics: keep the backward compatibility
Chaitanya Kulkarni
kch at nvidia.com
Thu Mar 17 18:24:08 PDT 2022
Don't print the message while disconnecting it is breaking blktests,
see below without this patch :-
nvme/005 (reset local loopback target) [failed]
runtime 6.799s ... 6.814s
--- tests/nvme/005.out 2021-08-29 01:09:20.287901783 -0700
+++ /mnt/data/blktests/results/nodev/nvme/005.out.bad 2022-03-17 18:11:16.198191553 -0700
@@ -1,2 +1,3 @@
Running nvme/005
+Disconnected nvme1
Test complete
With this patch :-
blktests (master) # ./check nvme/005
nvme/005 (reset local loopback target) [passed]
runtime 6.807s ... 6.801s
Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
---
fabrics.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fabrics.c b/fabrics.c
index e08ffd6..f51c8b7 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -791,9 +791,7 @@ int nvmf_disconnect(const char *desc, int argc, char **argv)
return errno;
}
ret = nvme_disconnect_ctrl(c);
- if (!ret)
- printf("Disconnected %s\n", p);
- else
+ if (ret)
fprintf(stderr,
"Failed to disconnect %s: %s\n",
p, nvme_strerror(errno));
--
2.29.0
More information about the Linux-nvme
mailing list