move some code to a separate source file
[project/usbmode.git] / main.c
diff --git a/main.c b/main.c
index 5d135f2..c00b5b9 100644 (file)
--- a/main.c
+++ b/main.c
@@ -5,7 +5,7 @@
 #include <libubox/blobmsg_json.h>
 #include <libubox/avl.h>
 #include <libubox/avl-cmp.h>
-#include <libusb.h>
+#include "switch.h"
 
 #define DEFAULT_CONFIG "/etc/usb-mode.json"
 
@@ -14,15 +14,6 @@ struct device {
        struct blob_attr *data;
 };
 
-struct usbdev_data {
-       struct libusb_device_descriptor desc;
-       libusb_device_handle *devh;
-       struct blob_attr *info;
-
-       char idstr[10];
-       char mfg[128], prod[128], serial[128];
-};
-
 static int verbose = 0;
 static const char *config_file = DEFAULT_CONFIG;
 static struct blob_buf conf;
@@ -176,10 +167,6 @@ static void handle_list(struct usbdev_data *data)
                data->idstr, data->mfg, data->prod, data->serial);
 }
 
-static void handle_switch(struct usbdev_data *data)
-{
-}
-
 int main(int argc, char **argv)
 {
        cmd_cb_t cb = NULL;