From: <sle...@us...> - 2006-11-23 12:57:36
|
Revision: 681 http://svn.sourceforge.net/hackndev/?rev=681&view=rev Author: sleep_walker Date: 2006-11-23 04:57:32 -0800 (Thu, 23 Nov 2006) Log Message: ----------- l4p: bit array fix Modified Paths: -------------- linux4palm/BFUGarux/BFULinuxHelper.c linux4palm/BFUGarux/BFUSettings-alone.c linux4palm/BFUGarux/garux-generic.rcp Modified: linux4palm/BFUGarux/BFULinuxHelper.c =================================================================== --- linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-22 20:38:15 UTC (rev 680) +++ linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-23 12:57:32 UTC (rev 681) @@ -16,12 +16,6 @@ #define DEBUG -#ifdef DEBUG -#define CMDLINE_FILE "cmdline" -#else -#define CMDLINE_FILE "/proc/cmdline" -#endif - #include <stdio.h> #include <string.h> @@ -81,7 +75,10 @@ unsigned char IP[4],i; long optint; FILE *stream; - stream=fopen(CMDLINE_FILE,"r"); + if (argc) + stream=fopen(*argv,"r"); + else + stream=fopen("/proc/cmdline","r"); if (!stream) { perror("Cannot open /proc/cmdline"); @@ -102,10 +99,7 @@ //check length here first; //now it is used just 16 bits number - that is 4 chars in hex optint = ReadHexa(4,ptr); - if (argc) printf("\nis %ld\n",optint); //options - do all the magic here - printf("BFUReflash=%ld\n",optint &1); - optint >>=2; printf("BFUSource=%d\n",source = (optint & 3)); optint >>= 2; printf("BFUFS=%ld\n",optint & 3); @@ -121,6 +115,9 @@ printf("BFUCardRO=%ld\n",optint & 1); optint >>=1; printf("BFUKeyboard=%ld\n",optint & 1); + optint >>=1; + printf("BFUReflash=%ld\n",optint &1); + //if length of options is bigger than 4 chars in hexa, read another chars here... // optint = ReadHexa(4,options+4); Modified: linux4palm/BFUGarux/BFUSettings-alone.c =================================================================== --- linux4palm/BFUGarux/BFUSettings-alone.c 2006-11-22 20:38:15 UTC (rev 680) +++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-11-23 12:57:32 UTC (rev 681) @@ -142,6 +142,8 @@ del[0] = BFUDelimiter; del[1] = '\0'; + options |= BFUSettingsValues.reflash; + options = options << 1; options |= BFUSettingsValues.keyboard; options = options << 1; options |= BFUSettingsValues.cardRO; @@ -158,8 +160,7 @@ options |= BFUSettingsValues.fs; options = options << 2; options |= BFUSettingsValues.source; - options = options << 1; - options |= BFUSettingsValues.reflash; + // BFUPrintHex(options,optstr); // StrPrintF(optstr,"%x",options); // BFUdoDie(optstr,options); @@ -167,7 +168,7 @@ /*now it should look like this bit content -------------- -0 reflash + 1 source 2 source 3 fs @@ -178,7 +179,8 @@ 8 CPUspeed 9 CPUspeed 10 cardRO -11 keyboard +11 keyboard +12 reflash */ // StrCopy(BFUCommandLinePart,) // BFUdoDie("Creating address and/or device string",0); @@ -448,7 +450,7 @@ BFUdoDie("BFUSavedPrefs already in RAM",0); case errNone: // that means errNone - nothing else is returned by this function - BFUdoDie("BFUSavedPrefs found on card",volRefNum); +// BFUdoDie("BFUSavedPrefs found on card",volRefNum); volIterator = vfsIteratorStop; BFUPrefsVolRefNum = volRefNum; break; Modified: linux4palm/BFUGarux/garux-generic.rcp =================================================================== --- linux4palm/BFUGarux/garux-generic.rcp 2006-11-22 20:38:15 UTC (rev 680) +++ linux4palm/BFUGarux/garux-generic.rcp 2006-11-23 12:57:32 UTC (rev 681) @@ -25,16 +25,16 @@ ICON BEGIN - BITMAP "icons/icon_bw.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 - BITMAP "icons/icon_256.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 1 - BITMAP "icons/icon_hr.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 2 + BITMAP "icons/icon_bw.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 + BITMAP "icons/icon_256.bmp" BPP 8 TRANSPARENT 0 255 0 DENSITY 1 + BITMAP "icons/icon_hr.bmp" BPP 8 TRANSPARENT 0 255 0 DENSITY 2 END SMALLICON BEGIN - BITMAP "icons/icon_bw_s.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 - BITMAP "icons/icon_256_s.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 1 - BITMAP "icons/icon_hr_s.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 2 + BITMAP "icons/icon_bw_s.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 + BITMAP "icons/icon_256_s.bmp" BPP 8 TRANSPARENT 0 255 0 DENSITY 1 + BITMAP "icons/icon_hr_s.bmp" BPP 8 TRANSPARENT 0 255 0 DENSITY 2 END FORM ID MainForm AT (0 0 160 160) //2 2 156 156) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |