summaryrefslogtreecommitdiff
path: root/usbredirhost
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-02-22 16:07:31 +0100
committerHans de Goede <hdegoede@redhat.com>2012-02-22 16:35:23 +0100
commite848f9b28a0192305db3bce3a8fd3fb8cd225bec (patch)
treec30302d4fe26a34df44459a210b6f97b386b1074 /usbredirhost
parentdf24fe116ea913dd1fa4b4725ad5764117943eba (diff)
usbredirfilter: constify various rules pointers
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'usbredirhost')
-rw-r--r--usbredirhost/usbredirhost.c4
-rw-r--r--usbredirhost/usbredirhost.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/usbredirhost/usbredirhost.c b/usbredirhost/usbredirhost.c
index 4f3e8f1..85a3d06 100644
--- a/usbredirhost/usbredirhost.c
+++ b/usbredirhost/usbredirhost.c
@@ -2195,13 +2195,13 @@ static void usbredirhost_interrupt_packet(void *priv, uint32_t id,
/**************************************************************************/
void usbredirhost_get_guest_filter(struct usbredirhost *host,
- struct usbredirfilter_rule **rules_ret, int *rules_count_ret)
+ const struct usbredirfilter_rule **rules_ret, int *rules_count_ret)
{
*rules_ret = host->filter_rules;
*rules_count_ret = host->filter_rules_count;
}
-int usbredirhost_check_device_filter(struct usbredirfilter_rule *rules,
+int usbredirhost_check_device_filter(const struct usbredirfilter_rule *rules,
int rules_count, libusb_device *dev, int flags)
{
int i, r, num_interfaces;
diff --git a/usbredirhost/usbredirhost.h b/usbredirhost/usbredirhost.h
index 032dc9f..3895a6c 100644
--- a/usbredirhost/usbredirhost.h
+++ b/usbredirhost/usbredirhost.h
@@ -145,7 +145,7 @@ void usbredirhost_free_write_buffer(struct usbredirhost *host, uint8_t *data);
/* Get the *usbredir-guest's* filter, if any. If there is no filter,
rules is set to NULL and rules_count to 0. */
void usbredirhost_get_guest_filter(struct usbredirhost *host,
- struct usbredirfilter_rule **rules_ret, int *rules_count_ret);
+ const struct usbredirfilter_rule **rules_ret, int *rules_count_ret);
/* Get device and config descriptors from the USB device dev, and call
usbredirfilter_check with the passed in filter rules and the needed info
@@ -154,7 +154,7 @@ void usbredirhost_get_guest_filter(struct usbredirhost *host,
Return value: -EIO or -ENOMEM when getting the descriptors fails, otherwise
it returns the return value of the usbredirfilter_check call. */
-int usbredirhost_check_device_filter(struct usbredirfilter_rule *rules,
+int usbredirhost_check_device_filter(const struct usbredirfilter_rule *rules,
int rules_count, libusb_device *dev, int flags);
#endif