Skip to content

Commit

Permalink
yaffs: Import yaffs from Thu Oct 7 10:05:05 2010 +1300
Browse files Browse the repository at this point in the history
commit b07263adb5c642fcb911125a77b9e7f4bb8af64c
Author: Timothy Manning <tfhmanning@gmail.com>
Date:   Thu Oct 7 10:05:05 2010 +1300

    yaffs Further mods to python browser.

    Fixed the Makefile by adding an extra symlink.
    Gave the python browser the ablity to create files and folders.
    Signed-off-by: Timothy Manning <tfhmanning@gmail.com>

Change-Id: Icc9caf07c88569f551f41dcbb2f9e61ff09c0593
Signed-off-by: Dima Zavin <dima@android.com>
  • Loading branch information
Dima Zavin committed Oct 14, 2010
1 parent 83aa743 commit a77b163
Show file tree
Hide file tree
Showing 29 changed files with 8,013 additions and 6,404 deletions.
10 changes: 10 additions & 0 deletions fs/yaffs2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,13 @@ config YAFFS_DISABLE_BACKGROUND
Background processing makes many foreground activities faster.

If unsure, say N.

config YAFFS_XATTR
bool "Enable yaffs2 xattr support"
depends on YAFFS_FS
default y
help
If this is set then yaffs2 will provide xattr support.
If unsure, say Y.


11 changes: 9 additions & 2 deletions fs/yaffs2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@

obj-$(CONFIG_YAFFS_FS) += yaffs.o

yaffs-y := yaffs_ecc.o yaffs_fs.o yaffs_guts.o yaffs_checkptrw.o
yaffs-y += yaffs_packedtags1.o yaffs_packedtags2.o yaffs_nand.o yaffs_qsort.o
yaffs-y := yaffs_ecc.o yaffs_vfs_glue.o yaffs_guts.o yaffs_checkptrw.o
yaffs-y += yaffs_packedtags1.o yaffs_packedtags2.o yaffs_nand.o
yaffs-y += yaffs_tagscompat.o yaffs_tagsvalidity.o
yaffs-y += yaffs_mtdif.o yaffs_mtdif1.o yaffs_mtdif2.o
yaffs-y += yaffs_nameval.o
yaffs-y += yaffs_allocator.o
yaffs-y += yaffs_yaffs1.o
yaffs-y += yaffs_yaffs2.o
yaffs-y += yaffs_bitmap.o
yaffs-y += yaffs_verify.o

99 changes: 2 additions & 97 deletions fs/yaffs2/devextras.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#define __EXTRAS_H__


#include "yportenv.h"

#if !(defined __KERNEL__)

/* Definition of types */
Expand All @@ -33,103 +35,6 @@ typedef unsigned __u32;

#endif

/*
* This is a simple doubly linked list implementation that matches the
* way the Linux kernel doubly linked list implementation works.
*/

struct ylist_head {
struct ylist_head *next; /* next in chain */
struct ylist_head *prev; /* previous in chain */
};


/* Initialise a static list */
#define YLIST_HEAD(name) \
struct ylist_head name = { &(name), &(name)}



/* Initialise a list head to an empty list */
#define YINIT_LIST_HEAD(p) \
do { \
(p)->next = (p);\
(p)->prev = (p); \
} while (0)


/* Add an element to a list */
static __inline__ void ylist_add(struct ylist_head *newEntry,
struct ylist_head *list)
{
struct ylist_head *listNext = list->next;

list->next = newEntry;
newEntry->prev = list;
newEntry->next = listNext;
listNext->prev = newEntry;

}

static __inline__ void ylist_add_tail(struct ylist_head *newEntry,
struct ylist_head *list)
{
struct ylist_head *listPrev = list->prev;

list->prev = newEntry;
newEntry->next = list;
newEntry->prev = listPrev;
listPrev->next = newEntry;

}


/* Take an element out of its current list, with or without
* reinitialising the links.of the entry*/
static __inline__ void ylist_del(struct ylist_head *entry)
{
struct ylist_head *listNext = entry->next;
struct ylist_head *listPrev = entry->prev;

listNext->prev = listPrev;
listPrev->next = listNext;

}

static __inline__ void ylist_del_init(struct ylist_head *entry)
{
ylist_del(entry);
entry->next = entry->prev = entry;
}


/* Test if the list is empty */
static __inline__ int ylist_empty(struct ylist_head *entry)
{
return (entry->next == entry);
}


/* ylist_entry takes a pointer to a list entry and offsets it to that
* we can find a pointer to the object it is embedded in.
*/


#define ylist_entry(entry, type, member) \
((type *)((char *)(entry)-(unsigned long)(&((type *)NULL)->member)))


/* ylist_for_each and list_for_each_safe iterate over lists.
* ylist_for_each_safe uses temporary storage to make the list delete safe
*/

#define ylist_for_each(itervar, list) \
for (itervar = (list)->next; itervar != (list); itervar = itervar->next)

#define ylist_for_each_safe(itervar, saveVar, list) \
for (itervar = (list)->next, saveVar = (list)->next->next; \
itervar != (list); itervar = saveVar, saveVar = saveVar->next)


#if !(defined __KERNEL__)

Expand Down
4 changes: 4 additions & 0 deletions fs/yaffs2/moduleconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
/* #define CONFIG_DISABLE_BACKGROUND */


/* Default: Selected */
/* Meaning: Enable XATTR support */
#define CONFIG_YAFFS_XATTR

/*
Older-style on-NAND data format has a "pageStatus" byte to record
chunk/page state. This byte is zeroed when the page is discarded.
Expand Down
Loading

0 comments on commit a77b163

Please sign in to comment.