diff --git a/src/dev_usb_freebsd.c b/src/dev_usb_freebsd.c deleted file mode 100644 index af4c362..0000000 --- a/src/dev_usb_freebsd.c +++ /dev/null @@ -1,30 +0,0 @@ -/* -spacenavd - a free software replacement driver for 6dof space-mice. -Copyright (C) 2007-2012 John Tsiombikas - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#ifdef __FreeBSD__ - -int open_dev_usb(struct device *dev, const char *path) -{ - return -1; /* TODO */ -} - -const char *find_usb_device(void) -{ - return 0; /* TODO */ -} - -#endif /* __FreeBSD__ */ diff --git a/src/hotplug_freebsd.c b/src/dummy_usb.c similarity index 65% rename from src/hotplug_freebsd.c rename to src/dummy_usb.c index 12b053a..5c6becd 100644 --- a/src/hotplug_freebsd.c +++ b/src/dummy_usb.c @@ -15,10 +15,26 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifdef __FreeBSD__ +#if !defined(__linux__) -/* TODO: implement */ +#include +static const char *message = + "Unfortunately this version of spacenavd does not support USB devices on your " + "platform yet. Make sure you are using the latest version of spacenavd.\n"; + +const char *find_usb_device(void) +{ + fprintf(stderr, message); + return 0; +} + +int open_dev_usb(struct device *dev, const char *path) +{ + return -1; +} + +/* the hotplug functions will also be missing on unsupported platforms */ int init_hotplug(void) { return -1; @@ -38,4 +54,4 @@ int handle_hotplug(void) return -1; } -#endif /* __FreeBSD__ */ +#endif /* unsupported platform */