From 3d427bfd7740731bfc203b047d557af564975cf6 Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 8 Dec 2008 00:21:05 +0100 Subject: * Added -n flag to do not write to disk or flash (simulation) * Added -S flag to specify subversion id manually while flashing or dumping * Fixed support for the last fiasco image - Skip paddings - More verbose output while parsing FIASCO headers * Initial implementation of the full direct FIASCO flasher - No need to dump manually before flashing * Some warnings and code cleanup * Fix building issue * Add HAVE_GUI directive in config.mk * Up to version 0.4 --- src/qmode.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/qmode.c') diff --git a/src/qmode.c b/src/qmode.c index 3aa73fa..5bfa765 100644 --- a/src/qmode.c +++ b/src/qmode.c @@ -19,7 +19,13 @@ #include "main.h" #include "os.h" #include +#include +#include #include +#include +#include +#include + #if HAVE_SQUEUE struct squeue_t *q; @@ -43,23 +49,19 @@ void process_message(char *msg) printf("[x] (%s)\n", msg); str = strdup(msg); arg = strchr(str, ':'); - if (c!=NULL) { + if (c!=0) { arg[0]='\0'; arg = arg +1; if (!strcmp(str, "flash")) { - char buf[1024]; - char *type = fpid_file(arg); + const char *type = fpid_file(arg); if (type == NULL) { squeue_push2(p, "error", "Unknown piece format", 1); - } else { - flash_image(arg, type, NULL); - } + } else flash_image(arg, type, NULL); } else if (!strcmp(str, "reset")) { if (reboot_board() == 0) { squeue_push2(p,"info", "Device reboots", 1); - } else - squeue_push2(p,"error", "Cannot reboot device", 1); + } else squeue_push2(p,"error", "Cannot reboot device", 1); } else if (!strcmp(str, "info")) { get_rd_flags(); @@ -95,7 +97,7 @@ int queue_mode() pid = dofork(); if (pid) { - wait(pid); + wait(&pid); return 0; } else { p = squeue_open("/tmp/0xFFFF.1", Q_CREAT); -- cgit v1.2.3