[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager FlashVolumeManagerP.nc, 1.10, 1.11

Razvan Musaloiu-E. razvanm at users.sourceforge.net
Tue Jan 15 12:33:48 PST 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2596/tos/lib/net/Deluge/FlashVolumeManager

Modified Files:
	FlashVolumeManagerP.nc 
Log Message:
Add a translation between imgNum to volumeId. This should allow non-Deluge images to peacefully coexist with Deluge.


Index: FlashVolumeManagerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager/FlashVolumeManagerP.nc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** FlashVolumeManagerP.nc	14 Jan 2008 04:22:01 -0000	1.10
--- FlashVolumeManagerP.nc	15 Jan 2008 20:33:46 -0000	1.11
***************
*** 88,91 ****
--- 88,98 ----
      nx_uint16_t nodeid;
    };
+ 
+   uint8_t imgNum2volumeId[] = {
+     VOLUME_GOLDENIMAGE,
+     VOLUME_DELUGE1,
+     VOLUME_DELUGE2,
+     VOLUME_DELUGE3
+   };
    
    void sendReply(error_t error, storage_len_t len)
***************
*** 180,197 ****
  
      // Converts the image number that the user wants to the real image number
!     switch (request->imgNum) {
!       case 0:
!         imgNum = VOLUME_GOLDENIMAGE;
!         break;
!       case 1:
!         imgNum = VOLUME_DELUGE1;
!         break;
!       case 2:
!         imgNum = VOLUME_DELUGE2;
!         break;
!       case 3:
!         imgNum = VOLUME_DELUGE3;
!         break;
!     }
      
      if (imgNum != 0xFF) {
--- 187,191 ----
  
      // Converts the image number that the user wants to the real image number
!     imgNum = imgNum2volumeId[request->imgNum];
      
      if (imgNum != 0xFF) {



More information about the Tinyos-2-commits mailing list