yaffs_packedtags1.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  3. *
  4. * Copyright (C) 2002-2007 Aleph One Ltd.
  5. * for Toby Churchill Ltd and Brightstar Engineering
  6. *
  7. * Created by Charles Manning <charles@aleph1.co.uk>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU Lesser General Public License version 2.1 as
  11. * published by the Free Software Foundation.
  12. *
  13. * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
  14. */
  15. /* This is used to pack YAFFS1 tags, not YAFFS2 tags. */
  16. #ifndef __YAFFS_PACKEDTAGS1_H__
  17. #define __YAFFS_PACKEDTAGS1_H__
  18. #include "yaffs_guts.h"
  19. typedef struct {
  20. unsigned chunkId:20;
  21. unsigned serialNumber:2;
  22. unsigned byteCount:10;
  23. unsigned objectId:18;
  24. unsigned ecc:12;
  25. unsigned deleted:1;
  26. unsigned unusedStuff:1;
  27. unsigned shouldBeFF;
  28. } yaffs_PackedTags1;
  29. void yaffs_PackTags1(yaffs_PackedTags1 * pt, const yaffs_ExtendedTags * t);
  30. void yaffs_UnpackTags1(yaffs_ExtendedTags * t, const yaffs_PackedTags1 * pt);
  31. #endif