From: <sle...@us...> - 2006-12-02 17:02:49
|
Revision: 690 http://svn.sourceforge.net/hackndev/?rev=690&view=rev Author: sleep_walker Date: 2006-12-02 09:02:45 -0800 (Sat, 02 Dec 2006) Log Message: ----------- l4p: BFUGarux - modules update & very verbose output Modified Paths: -------------- linux4palm/BFUGarux/BFULinuxHelper.c linux4palm/BFUGarux/BFUSettings-alone.c Modified: linux4palm/BFUGarux/BFULinuxHelper.c =================================================================== --- linux4palm/BFUGarux/BFULinuxHelper.c 2006-12-02 00:25:32 UTC (rev 689) +++ linux4palm/BFUGarux/BFULinuxHelper.c 2006-12-02 17:02:45 UTC (rev 690) @@ -73,8 +73,8 @@ char buffer[1025],*end,*ptr; char useNet,source; unsigned char IP[4],i; - long optint; - FILE *stream; + long optint,modint,modlist; + FILE *stream,*modfile; if (argc) stream=fopen(*argv,"r"); else @@ -180,6 +180,18 @@ //RAMdisk size printf("BFURAMDiskSize="); ReadString(&ptr); +//modules; + strchr(ptr,BFUDelimiter); + modint = ReadHexa(4,ptr); + modfile = fopen("/tmp/modfile","w"); + while (modint) + { + fprintf(modfile,"%d\n",modint & 1); + modint >>= 1; + } + ptr += 5; + printf("BFUModList="); + ReadString(&ptr); fclose(stream); return 0; } Modified: linux4palm/BFUGarux/BFUSettings-alone.c =================================================================== --- linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-02 00:25:32 UTC (rev 689) +++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-02 17:02:45 UTC (rev 690) @@ -79,7 +79,7 @@ void BFUdoDie(const Char * ErrStr,Err error); static Boolean BFUPush2ModList(const Char *name); static Boolean BFUIsModList(const Char *name); -static Boolean BFUReadModLists(UInt16 volRefNum); +//static Boolean BFUReadModLists(UInt16 volRefNum); static Boolean BFUInitModList(); Int16 BFUCompare(void **v1,void **v2,Int32 other); static Boolean BFUInitTable(); @@ -323,7 +323,12 @@ StrCat(BFUCommandLinePart,del); //Modules selection StrPrintF(netSet,"%x",BFUSettingsValues.modules); - BFUdoDie(netSet,0); + StrCat(BFUCommandLinePart,netSet); + StrCat(BFUCommandLinePart,del); + StrPrintF(netSet,"%d",BFUSettingsValues.modlist); + StrCat(BFUCommandLinePart,netSet); + StrCat(BFUCommandLinePart,del); +// #ifdef BFU_VERBOSE BFUdoDie(BFUCommandLinePart,0); #endif @@ -415,6 +420,7 @@ *BFUCommandLinePart='\0'; return false; } + BFUInitFileLists(); BFUPrefs2String(); return true; } @@ -572,8 +578,8 @@ MemHandle handle; BFUSettingsType *data; // BFUdoDie("going to delete dbase",0); - if (BFUPrefsFound) - { +// if (BFUPrefsFound) +// { err = DmDeleteDatabase(cardNo,BFUPrefs); switch(err) { @@ -589,7 +595,7 @@ return false; break; } - } +// } // BFUdoDie("going to create dbase",0); err = DmCreateDatabase(cardNo,"BFUSavedSettings", 'ARML','BFUS',false); if (err != errNone) @@ -1073,6 +1079,9 @@ } handled = true; break; + case BFUModListTrigger: + BFUSettingsValues.modlist = pEvent->data.popSelect.selection; + break; } // *** ADD EVENT HANDLING HERE *** // default: @@ -1458,7 +1467,7 @@ BFUdoDie("Entering BFUReadFileNames()",0); #endif - err = VFSFileOpen(volRefNum,"/"/* "linux2ram"*/,vfsModeRead,&dirRef); + err = VFSFileOpen(volRefNum,BFUSettingsValues.address /*"/" "linux2ram"*/,vfsModeRead,&dirRef); switch(err) { case errNone: @@ -1759,7 +1768,7 @@ BFUdoDie("Couldn't lock new handle. Can't save.",0); return false; } - for (i = 0; i < size ; ++i) + for (i = size-1; i ; --i) { if (TblGetItemInt(tab,i,1)) { @@ -1821,6 +1830,7 @@ BFUdoDie("Unlock ptrHandle",0); #endif MemHandleUnlock(ptrHandle); + BFUSettingsValues.modules = bitmap; #ifdef MODULES_DEBUG BFUdoDie("leaving BFUSaveNames()",0); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |