diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2015-05-19 15:02:15 +0200 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2015-05-19 15:03:24 +0200 |
commit | b6afe061dff7bba9c59a8f43c85a1ac6855dcba1 (patch) | |
tree | fbf8b22f5afd459263713f59e9e28bb8a844c6c7 | |
parent | 0553c45c78c6865a1b1e3386bbe686e0fffd9c87 (diff) | |
download | libusbg-b6afe061dff7bba9c59a8f43c85a1ac6855dcba1.tar.gz libusbg-b6afe061dff7bba9c59a8f43c85a1ac6855dcba1.tar.bz2 libusbg-b6afe061dff7bba9c59a8f43c85a1ac6855dcba1.zip |
libusbg: Allow to pass NULL as name to usbg_add_config_function()
Somtimes we would like to add function to configuration
without any extraordinary name. In that case we can simply
use type.instance as symlink name.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
-rw-r--r-- | src/usbg.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2761,6 +2761,9 @@ int usbg_add_config_function(usbg_config *c, const char *name, usbg_function *f) goto out; } + if (!name) + name = f->name; + b = usbg_get_binding(c, name); if (b) { ERROR("duplicate binding name\n"); |