-
Notifications
You must be signed in to change notification settings - Fork 26
libubox: add convenience functions, cleanup #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
f10a21a to
104f923
Compare
|
@nbd168 Can I get a review please? I need some of these changes to help with a migration from ISC-DHCP to Kea. |
|
@jow- Can you please look this over? |
|
Most (all?) existing functions use reference style returns (caller passes a destination variable name, function populates it and uses it's numeric return value to signify success/error) while your new functions introduce echo style returns requiring calling code to use ugly subshell invocations. Personally I would also change the naming like that:
|
Thanks, making those changes now. By And Where do the functions
For instance, you could implement if |
104f923 to
02b2c90
Compare
|
Casting a wider net cc: @blogic |
|
Creating 2nd PR (#12) without the positioning getter/setting commit which seems to be stalled. |
@jow- I believe I've made these changes as requested. Can you please re-review? |
3ba2872 to
d1f6263
Compare
|
@jow- I believe I've addressed the comments you made. Can I get a merge please or a re-review? |
Still blocked on improvements to |
|
This migration is really important from ISC DHCP to Kea. |
|
I figure you have commit rights to fix this @pprindeville |
No, my rights are only for |
d1f6263 to
7ef9c6f
Compare
|
Get the test formalities fixed and then we can ping a maintainer. |
Do you know how to write test scripts? I've not dug into it. |
|
?
|
Is that a new requirement? |
7ef9c6f to
937a88e
Compare
937a88e to
bc91ae7
Compare
JSON might not be generated serial if it's synthesized from another source such as UCI with a different organizational structure. In that case, being able to randomly access arrays and objects in the synthetic JSON simplifies passes over the source material. Signed-off-by: Philip Prindeville <[email protected]>
bc91ae7 to
f97afd4
Compare
Sorry, misread. Thought you were suggesting we add test coverage as well. Which doesn’t seem like a bad idea. |
You might not always want to populate JSON serially, so a way to save/restore the cursor through a convenience function is handy.
Also, adding anonymous (unnamed) strings to an array isn't obvious, so added a convenience function for that.
Lastly, some minor cleanup to show what the parameters are to functions, etc.
Requires PR #16.