control_allow_writable_config2

March 26, 2020 Contributors

Name

control_allow_writable_config2

Synopsis

#include "hooks/core/control_allow_writable_config2.h"

| int **control_allow_writable_config2** ( | closure, |   |
|   | cc, |   |
|   | argc, |   |
|   | argv[], |   |
|   | input, |   |
|   | output); |   |

void * <var class="pdparam">closure</var>;
command_construct * <var class="pdparam">cc</var>;
int <var class="pdparam">argc</var>;
const char * <var class="pdparam">argv[]</var>;
ec_control_context * <var class="pdparam">input</var>;
ec_control_context * <var class="pdparam">output</var>;

| int **has_core_control_allow_writable_config2_hook** ( | ); |   |

| void **register_core_control_allow_writable_config2_hook_first** ( | hook, |   |
|   | closure); |   |

ec_hook_core_control_allow_writable_config2_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| void **register_core_control_allow_writable_config2_hook_last** ( | hook, |   |
|   | closure); |   |

ec_hook_core_control_allow_writable_config2_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| int **call_core_control_allow_writable_config2_hook** ( | cc, |   |
|   | argc, |   |
|   | argv[], |   |
|   | input, |   |
|   | output); |   |

command_construct * <var class="pdparam">cc</var>;
int <var class="pdparam">argc</var>;
const char * <var class="pdparam">argv[]</var>;
ec_control_context * <var class="pdparam">input</var>;
ec_control_context * <var class="pdparam">output</var>;

Description

This hook allows a module to disable "writability" or "run-time reconfiguration" of the command in question. The hook parameters are identical to the parameters to an ec_control_function callback.

Return 1 from this hook to allow the operation to continue, return 0 to prevent it.