proto->config_params = &handler->config;
proto->attach = proto_shell_attach;
+ tmp = get_field(obj, "no-device", json_type_boolean);
+ if (tmp && json_object_get_boolean(tmp))
+ handler->proto.flags |= PROTO_FLAG_NODEV;
+
config = get_field(obj, "config", json_type_array);
if (config)
handler->config_buf = proto_shell_parse_config(&handler->config, config);
case "$cmd" in
dump)
add_protocol() {
- immediate=0
+ no_device=0
+ available=0
add_default_handler "$1_init_config"
json_init
json_add_string "name" "$1"
eval "$1_init"
- json_add_boolean immediate "$immediate"
+ json_add_boolean no-device "$no_device"
+ json_add_boolean available "$available"
json_add_array "config"
eval "$1_init_config"
json_close_array