diff options
author | Corey Bryant <coreyb@linux.vnet.ibm.com> | 2012-06-22 14:36:09 -0400 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-07-13 13:46:55 -0300 |
commit | 208c9d1b7c23e112d2fb83660fa23f2918c4c15b (patch) | |
tree | a4b3064fae5835f3ef763d1ad98f3be9158dc323 /qmp-commands.hx | |
parent | 94c3db85b4cc1d4e078859834a761bcc9d988780 (diff) |
qapi: Convert getfd and closefd
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index 2e1a38e695..e3cf3c5a1a 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -873,8 +873,7 @@ EQMP .args_type = "fdname:s", .params = "getfd name", .help = "receive a file descriptor via SCM rights and assign it a name", - .user_print = monitor_user_noop, - .mhandler.cmd_new = do_getfd, + .mhandler.cmd_new = qmp_marshal_input_getfd, }, SQMP @@ -892,6 +891,14 @@ Example: -> { "execute": "getfd", "arguments": { "fdname": "fd1" } } <- { "return": {} } +Notes: + +(1) If the name specified by the "fdname" argument already exists, + the file descriptor assigned to it will be closed and replaced + by the received file descriptor. +(2) The 'closefd' command can be used to explicitly close the file + descriptor when it is no longer needed. + EQMP { @@ -899,8 +906,7 @@ EQMP .args_type = "fdname:s", .params = "closefd name", .help = "close a file descriptor previously passed via SCM rights", - .user_print = monitor_user_noop, - .mhandler.cmd_new = do_closefd, + .mhandler.cmd_new = qmp_marshal_input_closefd, }, SQMP |