Add flag for object shadowing
authorcharles <charles>
Sun, 31 Jul 2005 06:56:57 +0000 (06:56 +0000)
committercharles <charles>
Sun, 31 Jul 2005 06:56:57 +0000 (06:56 +0000)
yaffs_packedtags2.c

index 342e550..f4de18d 100644 (file)
@@ -29,7 +29,8 @@
 
 #define EXTRA_HEADER_INFO_FLAG 0x80000000
 #define EXTRA_SHRINK_FLAG      0x40000000
-#define EXTRA_SPARE_FLAGS      0x30000000
+#define EXTRA_SHADOWS_FLAG     0x20000000
+#define EXTRA_SPARE_FLAGS      0x10000000
 
 #define ALL_EXTRA_FLAGS                0xF0000000
 
@@ -68,6 +69,10 @@ void yaffs_PackTags2(yaffs_PackedTags2 *pt, const yaffs_ExtendedTags *t)
                {
                    pt->t.chunkId |= EXTRA_SHRINK_FLAG;
                }
+               if(t->extraShadows) 
+               {
+                   pt->t.chunkId |= EXTRA_SHADOWS_FLAG;
+               }
                
                pt->t.objectId &= ~EXTRA_OBJECT_TYPE_MASK;
                pt->t.objectId |= (t->extraObjectType << EXTRA_OBJECT_TYPE_SHIFT);
@@ -137,6 +142,7 @@ void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt)
                        t->extraHeaderInfoAvailable = 1;
                        t->extraParentObjectId = pt->t.chunkId & (~(ALL_EXTRA_FLAGS));
                        t->extraIsShrinkHeader =  (pt->t.chunkId & EXTRA_SHRINK_FLAG) ? 1 : 0;
+                       t->extraShadows =  (pt->t.chunkId & EXTRA_SHADOWS_FLAG) ? 1 : 0;
                        t->extraObjectType = pt->t.objectId >> EXTRA_OBJECT_TYPE_SHIFT;
                        t->objectId &= ~EXTRA_OBJECT_TYPE_MASK;