Skip to content

always output array without --human

Ross Zwisler linux-nvdimm nvdimm 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

* Dropped patch 2 that dealt with cleaning up the way flags are handled in ndctl/list.c. (Dan)

* Added Dan's Ack to patch 1.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ndctl: simplify JSON print flag handlingdaxctl/list.c ndctl/bus.c ndctl/dimm.c +4 more+13 -170 replies
2/2ndctl list: always output array without --humandaxctl/list.c ndctl/bus.c ndctl/dimm.c +4 more+19 -140 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDan Williams
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [ndctl PATCH v2 0/2] always output array without --human

If "ndctl list" is only printing a single object it currently does not print it in an array. When printing multiple objects, though, an array is used. This simplifies the output for single objects when a human is looking at it but it creates complications for parsers like jq. jq wants to know whether it is trying to parse an object or an array of objects.

The first patch in this series is cleanup I noticed while fixing the above issue with the second patch.

---

Changes since v1:
* Dropped patch 2 that dealt with cleaning up the way flags are handled in ndctl/list.c. (Dan)

* Added Dan's Ack to patch 1.

Ross Zwisler (2):
ndctl: simplify JSON print flag handling
ndctl list: always output array without --human

 daxctl/list.c        | 12 +++++++-----
 ndctl/bus.c          |  3 +--
 ndctl/dimm.c         |  3 +--
 ndctl/inject-smart.c |  3 +--
 ndctl/list.c         | 11 +++++------
 util/json.c          |  6 ++++--
 util/json.h          |  3 ++-
 7 files changed, 21 insertions(+), 20 deletions(-)
Signature · 6 lines
2.14.4

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm