Details
- Reviewers
markj jhb - Group Reviewers
bhyve - Commits
- rG0c10a2255084: bhyve: use linker set for ipc commands
rGc79331a42c30: bhyve: use linker set for ipc commands
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 44978 Build 41866: arc lint + arc unit
Event Timeline
usr.sbin/bhyve/snapshot.c | ||
---|---|---|
1465 | This suggestion will be saved for a different review...but I'm thinking this is where the response nvlist will be constructed to return the results back to the sender. Unless someone has a different idea? |
usr.sbin/bhyve/snapshot.c | ||
---|---|---|
1439 | You might add a IPC_COMMAND_FOREACH macro to ipc.h so that all the code that directly uses linker_set.h is in one place. |
usr.sbin/bhyve/ipc.h | ||
---|---|---|
38 | Perhaps const nvlist_t *nvl? I don't think the handlers should be modifying the nvlist. | |
usr.sbin/bhyve/snapshot.c | ||
1465 | Perhaps, though you would maybe want the error value so you might have handle_message() generate the nvlist that it writes back out on the socket (or return a the reply nvlist here). |
usr.sbin/bhyve/ipc.h | ||
---|---|---|
38 | I suppose it depends on how fine-grained the reply nvlist should be? If handler functions want to return custom error messages and/or translate return values from their callback....then I could see the handler function reusing the nvlist pointer as the reply nvlist. If the callback in the handler function fails, the handler function would still construct the reply nvlist and return success. If the handler function returns failure (i.e., the callback wasn't called), the caller of the handler function would then be responsible for creating the reply nvlist. or..? |
usr.sbin/bhyve/ipc.h | ||
---|---|---|
38 | I would add a new parameter to support a reply nvlist that starts out as empty. I would then make the common code that invokes handler append the handler's return value to this nvlist as the error code (using a "standard" name shared across all replies) and then send the reply nvlist in reply. |