+/* pffs index format */
+#define PFFS_INDEX_MAGIC_MASK 0xf000
+#define PFFS_STATE_MASK 0x0f00
+#define PFFS_FNLEN_MASK 0x00f0
+#define PFFS_LEN_MSB_MASK 0x000f
+
+#define PFFS_INDEX_MAGIC 0x7000
+#define PFFS_INDEX_REMOVED 0x0700
+
+/* file modes */
+#define PFFS_READ 0x01
+#define PFFS_WRITE 0x02
+#define PFFS_RDWR 0x03
+
+/* lseek offsets */
+#define PFFS_SEEK_SET 0x01
+#define PFFS_SEEK_CUR 0x02
+#define PFFS_SEEK_END 0x03
+
+/* pffs open / write / read return codes */
+#define PFFS_FILE_FOUND 0x01
+#define PFFS_FILE_NOT_FOUND 0x02
+#define PFFS_NO_SPACE_LEFT 0x04
+#define PFFS_FILENAME_TOO_LONG 0x08
+#define PFFS_MODE_UNSUPPORTED 0x10
+
+#define PFFS_INVALID_LEN 0x01
+#define PFFS_EINVAL 0x02
+