summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorpancake <pancake@dazo>2008-03-05 18:38:42 +0100
committerpancake <pancake@dazo>2008-03-05 18:38:42 +0100
commit2ddb2923c68d023f9733fb82bb8d28140ea5b695 (patch)
tree706162ce4107ec1444870ad4945a9e6d5a0cde91 /src/main.c
parent32a59f4279e1d72abc2b60f08d6e32e2a0b32478 (diff)
download0xFFFF-2ddb2923c68d023f9733fb82bb8d28140ea5b695.tar.bz2
* Initial import of the GtkAML gui frontend - Mostly implemented in just one night :)
* Import the squeue c and vapi sources * Make 0xFFFF run as squeue daemon with -Q flag * Up to 0.4
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index adec9f8..a4e8cf9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,6 +1,6 @@
/*
* 0xFFFF - Open Free Fiasco Firmware Flasher
- * Copyright (C) 2007 pancake <pancake@youterm.com>
+ * Copyright (C) 2007, 2008 pancake <pancake@youterm.com>
*
* 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
@@ -23,6 +23,10 @@
#include <stdlib.h>
#include <getopt.h>
+#if HAVE_SQUEUE
+#include "squeue/squeue.h"
+#endif
+
/* global pr0n */
#if HAVE_USB
#include <usb.h>
@@ -40,6 +44,7 @@ int verbose = 0;
int identify = 0;
int moboreboot = 0;
int unpack = 0;
+int qmode = 0;
int info = 0;
/* global structs */
@@ -91,6 +96,9 @@ void show_usage()
printf(" -R reboot the omap board\n");
printf(" -U [0|1] disable/enable the usb host mode\n");
#endif
+#if HAVE_SQUEUE
+ printf(" -Q enter shared queues server mode (for gui or remote)\n");
+#endif
printf("Local stuff:\n");
printf(" -s [serial] serial port console (minicom like terminal)\n");
printf(" -h show this help message\n");
@@ -222,7 +230,7 @@ int main(int argc, char **argv)
{
int c;
- while((c = getopt(argc, argv, "C:cp:PvVhRu:ib:U:r:e:ld:I:D:f:F:s:xH:")) != -1) {
+ while((c = getopt(argc, argv, "QC:cp:PvVhRu:ib:U:r:e:ld:I:D:f:F:s:xH:")) != -1) {
switch(c) {
case 'H':
printf("xorpair: %04x\n", do_hash_file(optarg));
@@ -286,6 +294,9 @@ int main(int argc, char **argv)
fiasco_image = optarg;
unpack = 1;
break;
+ case 'Q':
+ qmode = 1;
+ break;
case 'P':
return fiasco_pack(optind, argv);
case 'I':
@@ -306,6 +317,9 @@ int main(int argc, char **argv)
}
}
+ if (qmode)
+ return queue_mode();
+
if (identify)
return 0;
@@ -321,9 +335,11 @@ int main(int argc, char **argv)
&& (usb_mode == -1)
&& (root_device == -1))
{
- printf("0xFFFF [-chilRvVx] [-C mtd-dev] [-d vid:pid] [-D 0|1|2] [-e path] [-f flags]\n");
- printf(" [-F fiasco] [-H hash-file] [-I piece] [-p [piece%%]file]] [-r 0|1]\n");
- printf(" [-s serial-dev] [-u fiasco-image] [-U 0|1] | [-P new-fiasco] [piece1] [2] ..\n");
+
+ printf("# The Free Fiasco Firmware Flasher v"VERSION"\n"
+ "0xFFFF [-chilQRvVx] [-C mtd-dev] [-d vid:pid] [-D 0|1|2] [-e path] [-f flags]\n"
+ " [-F fiasco] [-H hash-file] [-I piece] [-p [piece%%]file]] [-r 0|1]\n"
+ " [-s serial-dev] [-u fiasco-image] [-U 0|1] | [-P new-fiasco] [piece1] [2] ..\n");
return 1;
}