From 579dbe983733df293b620143d3a18f9bbcabcec7 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 14 Jun 2007 23:32:52 +0200 Subject: * Fix device identification for n800. patch from Robert Schuster - Looks like n770 and n800 have different USB identifiers on the bootloader and the operating system. * Print oops message and exit when the use has no permissions to access to the usb. --- src/main.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index 7895c5c..dcbacff 100644 --- a/src/main.h +++ b/src/main.h @@ -5,6 +5,8 @@ #define _FILE_OFFSET_BITS 64 #define _GNU_SOURCE +// Forward declaration for use in function arguments. +struct devices; int reverse_extract_pieces(char *dir); void flash_image(char *filename, char *piece, char *version); @@ -22,7 +24,7 @@ extern struct usb_device *device; extern struct usb_dev_handle *dev; int is_valid_device(struct usb_device_descriptor *udd); void list_valid_devices(); -int usb_device_found(struct usb_device_descriptor *udd); +int usb_device_found(struct usb_device_descriptor *udd, struct devices *it_device); int console(const char *device); int connect_via_usb(); int console_prompt(); @@ -54,7 +56,8 @@ struct devices { unsigned short product_id; unsigned short flags; }; -#define SUPPORTED_DEVICES 5 + +#define SUPPORTED_DEVICES 6 extern struct devices supported_devices[SUPPORTED_DEVICES]; extern int pcs_n; -- cgit v1.2.3