Skip to content

Conversation

@ikegami-t
Copy link
Contributor

No description provided.

util/json.h Outdated
void json_object_add_nprix64(struct json_object *o, const char *k, uint64_t v);
void json_object_add_uint_0nx(struct json_object *o, const char *k, __u32 v, int width);
void json_object_add_0nprix64(struct json_object *o, const char *k, uint64_t v, int width);
void json_object_add_format(struct json_object *o, const char *k, const char *format, ...);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to stick to the above pattern and use the name as final postfix, so in this case just string. There is also already one helper which is called .._value_string. So this would make more sense to me.

json_object_add_string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed as suggested. Thank you.

@igaw
Copy link
Collaborator

igaw commented May 19, 2025

I was wonder about the second patch how we deal with the verbose flag and json. it seems in most cases we are actually replace the output with something else. So the verbose flag is not extending the existing output.

I think it would make more sense to handle it as we do it in the stdout case, where we leave the orignal output and just extend it.

Though this is something we should do in a different patch and verify that we don't break anyone.

I am fine with the second patch for the time being.

@ikegami-t
Copy link
Contributor Author

About the second patch understood your comment so for now just remaind the changes but just rebased with the first patch. Thank you.

ikegami-t added 2 commits May 20, 2025 09:31
This is to add a format string into the json object.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Also add lbaf and in_use outputs for both normal and verbose modes.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
@igaw igaw force-pushed the json-id-ns-lbaf branch from a2427e3 to 66d6787 Compare May 20, 2025 07:34
@igaw igaw merged commit 3b4a4a1 into linux-nvme:master May 20, 2025
16 checks passed
@igaw
Copy link
Collaborator

igaw commented May 20, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants