summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/ubifs.c6
-rw-r--r--fs/yaffs2/Makefile2
-rw-r--r--fs/yaffs2/yaffs_guts.c25
-rw-r--r--fs/yaffs2/yaffs_nand.c2
-rw-r--r--fs/yaffs2/yaffs_nand.h2
-rw-r--r--fs/yaffs2/yaffscfg.c4
6 files changed, 23 insertions, 18 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 61f70b2960..2e6313a89f 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -686,6 +686,7 @@ int ubifs_load(char *filename, u32 addr, u32 size)
int i;
int count;
int last_block_size = 0;
+ char buf [10];
c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READONLY);
/* ubifs_findfile will resolve symlinks, so we know that we get
@@ -737,8 +738,11 @@ int ubifs_load(char *filename, u32 addr, u32 size)
if (err)
printf("Error reading file '%s'\n", filename);
- else
+ else {
+ sprintf(buf, "%lX", size);
+ setenv("filesize", buf);
printf("Done\n");
+ }
ubifs_iput(inode);
diff --git a/fs/yaffs2/Makefile b/fs/yaffs2/Makefile
index 7753cfcf37..6c50c81ba1 100644
--- a/fs/yaffs2/Makefile
+++ b/fs/yaffs2/Makefile
@@ -31,7 +31,7 @@ SRCS := $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS-y))
# -DCONFIG_YAFFS_NO_YAFFS1
-CFLAGS += -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE -DLINUX_VERSION_CODE=0x20622
+CFLAGS += -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2 -DLINUX_VERSION_CODE=0x20622
all: $(LIB)
diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
index b368844296..c67a08517b 100644
--- a/fs/yaffs2/yaffs_guts.c
+++ b/fs/yaffs2/yaffs_guts.c
@@ -391,17 +391,17 @@ static int yaffs_CountChunkBits(yaffs_Device * dev, int blk)
* Verification code
*/
-static int yaffs_SkipVerification(yaffs_Device *dev)
+static Y_INLINE int yaffs_SkipVerification(yaffs_Device *dev)
{
return !(yaffs_traceMask & (YAFFS_TRACE_VERIFY | YAFFS_TRACE_VERIFY_FULL));
}
-static int yaffs_SkipFullVerification(yaffs_Device *dev)
+static Y_INLINE int yaffs_SkipFullVerification(yaffs_Device *dev)
{
return !(yaffs_traceMask & (YAFFS_TRACE_VERIFY_FULL));
}
-static int yaffs_SkipNANDVerification(yaffs_Device *dev)
+static Y_INLINE int yaffs_SkipNANDVerification(yaffs_Device *dev)
{
return !(yaffs_traceMask & (YAFFS_TRACE_VERIFY_NAND));
}
@@ -2140,7 +2140,7 @@ yaffs_Object *yaffs_CreateNewObject(yaffs_Device * dev, int number,
{
yaffs_Object *theObject;
- yaffs_Tnode *tn;
+ yaffs_Tnode *tn = NULL;
if (number < 0) {
number = yaffs_CreateNewObjectNumber(dev);
@@ -2255,7 +2255,7 @@ static yaffs_Object *yaffs_MknodObject(yaffs_ObjectType type,
const YCHAR * aliasString, __u32 rdev)
{
yaffs_Object *in;
- YCHAR *str;
+ YCHAR *str = NULL;
yaffs_Device *dev = parent->myDev;
@@ -4605,8 +4605,8 @@ int yaffs_ReadDataFromFile(yaffs_Object * in, __u8 * buffer, loff_t offset,
int nBytes)
{
- int chunk;
- int start;
+ __u32 chunk;
+ __u32 start;
int nToCopy;
int n = nBytes;
int nDone = 0;
@@ -4725,8 +4725,8 @@ int yaffs_WriteDataToFile(yaffs_Object * in, const __u8 * buffer, loff_t offset,
int nBytes, int writeThrough)
{
- int chunk;
- int start;
+ __u32 chunk;
+ __u32 start;
int nToCopy;
int n = nBytes;
int nDone = 0;
@@ -4960,8 +4960,8 @@ int yaffs_ResizeFile(yaffs_Object * in, loff_t newSize)
{
int oldFileSize = in->variant.fileVariant.fileSize;
- int newSizeOfPartialChunk;
- int newFullChunks;
+ __u32 newSizeOfPartialChunk;
+ __u32 newFullChunks;
yaffs_Device *dev = in->myDev;
@@ -7232,7 +7232,8 @@ int yaffs_GutsInitialise(yaffs_Device * dev)
dev->nShortOpCaches = YAFFS_MAX_SHORT_OP_CACHES;
}
- buf = dev->srCache = YMALLOC(srCacheBytes);
+ dev->srCache = YMALLOC(srCacheBytes);
+ buf = (__u8 *)dev->srCache;
if(dev->srCache)
memset(dev->srCache,0,srCacheBytes);
diff --git a/fs/yaffs2/yaffs_nand.c b/fs/yaffs2/yaffs_nand.c
index e790be61a5..ce048cc185 100644
--- a/fs/yaffs2/yaffs_nand.c
+++ b/fs/yaffs2/yaffs_nand.c
@@ -101,7 +101,7 @@ int yaffs_MarkBlockBad(yaffs_Device * dev, int blockNo)
int yaffs_QueryInitialBlockState(yaffs_Device * dev,
int blockNo,
yaffs_BlockState * state,
- unsigned *sequenceNumber)
+ int *sequenceNumber)
{
blockNo -= dev->blockOffset;
diff --git a/fs/yaffs2/yaffs_nand.h b/fs/yaffs2/yaffs_nand.h
index 48e3f7ec6d..f3bedcf35c 100644
--- a/fs/yaffs2/yaffs_nand.h
+++ b/fs/yaffs2/yaffs_nand.h
@@ -33,7 +33,7 @@ int yaffs_MarkBlockBad(yaffs_Device * dev, int blockNo);
int yaffs_QueryInitialBlockState(yaffs_Device * dev,
int blockNo,
yaffs_BlockState * state,
- unsigned *sequenceNumber);
+ int *sequenceNumber);
int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev,
int blockInNAND);
diff --git a/fs/yaffs2/yaffscfg.c b/fs/yaffs2/yaffscfg.c
index 16e84a4210..01399ea8a2 100644
--- a/fs/yaffs2/yaffscfg.c
+++ b/fs/yaffs2/yaffscfg.c
@@ -313,7 +313,7 @@ void cmd_yaffs_mread_file(char *fn, char *addr)
yaffs_stat(fn,&s);
- printf ("Copy %s to 0x%08x... ", fn, addr);
+ printf ("Copy %s to 0x%p... ", fn, addr);
h = yaffs_open(fn, O_RDWR,0);
if(h<0)
{
@@ -368,7 +368,7 @@ void cmd_yaffs_ls(const char *mountpt, int longlist)
{
sprintf(tempstr, "%s/%s", mountpt, de->d_name);
yaffs_stat(tempstr, &stat);
- printf("%-25s\t%7d\n",de->d_name, stat.st_size);
+ printf("%-25s\t%7ld\n",de->d_name, stat.st_size);
}
else
{
OpenPOWER on IntegriCloud