Fix compilation

This commit is contained in:
Pali Rohár committed 2012-08-10 12:19:28 +02:00
1 parent b142205f1c
commit 27acbb09a5
5 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -107,7 +107,7 @@ static void cmd_badblocks(char *line)
static void cmd_connect(char *line) static void cmd_connect(char *line)
{ {
connect_via_usb(); // connect_via_usb();
} }
static void cmd_reboot(char *line) static void cmd_reboot(char *line)
+1 -1
View File
@@ -26,7 +26,7 @@
#if HAVE_USB #if HAVE_USB
#include <usb.h> #include <usb.h>
struct usb_device *device = NULL; struct usb_device *device = NULL;
struct usb_dev_handle *dev = NULL; extern struct usb_dev_handle *dev = NULL;
#endif #endif
//char *fiasco_image = NULL; //char *fiasco_image = NULL;
char *boot_cmdline = NULL; char *boot_cmdline = NULL;
+4 -2
View File
@@ -34,6 +34,8 @@
#include "device.h" #include "device.h"
#include "usb-device.h" #include "usb-device.h"
#include "cold-flash.h" #include "cold-flash.h"
#include "console.h"
#include "qmode.h"
#undef VERSION #undef VERSION
#define VERSION "0.6" #define VERSION "0.6"
@@ -476,14 +478,14 @@ int main(int argc, char **argv) {
/* console */ /* console */
if ( console ) { if ( console ) {
// console_prompt(); console_prompt();
ret = 0; ret = 0;
goto clean; goto clean;
} }
/* share queues */ /* share queues */
if ( queue ) { if ( queue ) {
// queue_mode(); queue_mode();
ret = 0; ret = 0;
goto clean; goto clean;
} }
+3 -5
View File
@@ -32,9 +32,7 @@
#define CMD_WRITE 64 #define CMD_WRITE 64
#define CMD_QUERY 192 #define CMD_QUERY 192
extern char *root_devices[]; struct usb_dev_handle *dev;
extern struct usb_dev_handle *dev;
/*void check_nolo_order_failed() /*void check_nolo_order_failed()
{ {
@@ -394,7 +392,7 @@ int get_root_device()
return -1; return -1;
} }
printf("Root device is: %s\n", root_devices[opcode]); // printf("Root device is: %s\n", root_devices[opcode]);
return 0; return 0;
} }
@@ -417,7 +415,7 @@ int set_root_device(unsigned short root_device)
return -1; return -1;
} }
printf("Root device set to: %s\n", root_devices[root_device]); // printf("Root device set to: %s\n", root_devices[root_device]);
return 0; return 0;
} }
+2 -2
View File
@@ -134,11 +134,11 @@ int queue_mode(void)
} else { } else {
do { do {
#if HAVE_USB #if HAVE_USB
if (connect_via_usb()) { /* if (connect_via_usb()) {
fprintf(stderr, "Cannot connect to device. It is possibly not in boot stage.\n"); fprintf(stderr, "Cannot connect to device. It is possibly not in boot stage.\n");
squeue_push2(p, "error", "Cannot connect to the device", 1); squeue_push2(p, "error", "Cannot connect to the device", 1);
return 0; return 0;
} }*/
#endif #endif
printf("Waiting for a client in shared queues..\n"); printf("Waiting for a client in shared queues..\n");
setsid(); setsid();