New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual device #41

Merged
merged 122 commits into from Oct 2, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+9 −1
Diff settings

Always

Just for now

Viewing a subset of changes. View all

cltra: conditional compile of AVTKA virtual dev

This commit detects at build time if the AVTKA library is available
for providing virtualized device support. If not the
ctlra_dev_virtualize function returns -ENOTSUP.

Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
  • Loading branch information...
harryhaaren committed Aug 27, 2017
commit 63f7165e89147f2339042355afe15a541bba8812
View
@@ -113,6 +113,7 @@ struct ctlra_dev_t *ctlra_dev_connect(struct ctlra_t *ctlra,
int32_t
ctlra_dev_virtualize(struct ctlra_t *c, struct ctlra_dev_info_t *info)
{
#ifdef HAVE_AVTKA
/* call into AVTKA and virtualize the device, passing info through
* the future (void *) to the AVTKA backend. */
CTLRA_INFO(c, "virtualizing dev with info %p\n", info);
@@ -134,9 +135,12 @@ ctlra_dev_virtualize(struct ctlra_t *c, struct ctlra_dev_info_t *info)
if(!accepted) {
ctlra_dev_disconnect(dev);
return -ENOTSUP;
return -ECONNREFUSED;
}
return 0;
#else
return -ENOTSUP;
#endif
}
uint32_t ctlra_dev_poll(struct ctlra_dev_t *dev)
View
@@ -7,6 +7,10 @@ conf_data.set('version', '0.1')
cc = meson.get_compiler('c')
avtka = dependency('openav_avtka', required: false)
if(avtka.found())
add_global_arguments('-DHAVE_AVTKA', language : 'c')
endif
subdir('ctlra')
ProTip! Use n and p to navigate between commits in a pull request.