diff options
| author | 2011-03-24 03:14:27 -0400 | |
|---|---|---|
| committer | 2012-06-17 22:00:40 +0200 | |
| commit | f3c9af36c29428caa872fa67f20c958d52a5fb21 (patch) | |
| tree | df06f471e52ced337d8a6727806a26cff389bb1c /src/dispatch.c | |
| parent | configure.ac, Changelog, NEWS etc.: update to version 2.0.9 (diff) | |
Add raw1394_add_config_rom_descriptor() and raw1394_remove_config_rom_descriptor() API
This adds support of the firewire-core (juju) ABI to add and remove config ROM directories
or descriptors. The raw1394 ABI supports similar requests, but for now we leave the two
functions unimplemented when running on top of raw1394.
Signed-off-by: Benjamin Buchalter <bj@mhlabs.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace changes)
Diffstat (limited to 'src/dispatch.c')
| -rw-r--r-- | src/dispatch.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/dispatch.c b/src/dispatch.c index 72a45a4..1cc8e6a 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -519,6 +519,40 @@ int raw1394_update_config_rom(raw1394handle_t handle, const quadlet_t new_rom, size, rom_version); } +int raw1394_add_config_rom_descriptor(raw1394handle_t handle, + const quadlet_t immediate_key, + const quadlet_t key, + const quadlet_t *new_rom_directory, + size_t size, + __u32 *out_token) +{ + if (!handle) { + errno = EINVAL; + return -1; + } + if (handle->is_fw) + return fw_add_config_rom_descriptor(handle->mode.fw, + immediate_key, key, new_rom_directory, size, out_token); + else { + errno = EINVAL; + return -1; + } +} + +int raw1394_remove_config_rom_descriptor(raw1394handle_t handle, __u32 token) +{ + if (!handle) { + errno = EINVAL; + return -1; + } + if (handle->is_fw) + return fw_remove_config_rom_descriptor(handle->mode.fw, token); + else { + errno = EINVAL; + return -1; + } +} + int raw1394_get_config_rom(raw1394handle_t handle, quadlet_t *buffer, size_t buffersize, size_t *rom_size, unsigned char *rom_version) { |
