udevadm: automatically anable JSON-SEQ in case JSON is used for "udevadm info -a"
We are going to output a series of JSON objects, hence let's
automatically enable JSON-SEQ output mode, as we usually do.
"jq --seq" supports this natively, hence this should not really restrict
us.
Follow-up for: 67ea8a4c0e
This commit is contained in:
committed by
Yu Watanabe
parent
7aea1c9e80
commit
ebc64de22f
@@ -274,6 +274,8 @@ static int print_device_chain_in_json(sd_device *device) {
|
||||
|
||||
assert(device);
|
||||
|
||||
arg_json_format_flags |=SD_JSON_FORMAT_SEQ;
|
||||
|
||||
r = print_all_attributes_in_json(device, /* is_parent = */ false);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user