projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d3a6b3f
)
Change string concats to work with all OSs
author
charles
<charles>
Tue, 27 Jan 2009 02:52:45 +0000
(
02:52
+0000)
committer
charles
<charles>
Tue, 27 Jan 2009 02:52:45 +0000
(
02:52
+0000)
yaffs_guts.c
patch
|
blob
|
history
yportenv.h
patch
|
blob
|
history
diff --git
a/yaffs_guts.c
b/yaffs_guts.c
index e4eb42c3cdf46a3b6540b60d7887a7d5ad97c918..44eaed692cedb05ac60af308d4d4a3e999fee577 100644
(file)
--- a/
yaffs_guts.c
+++ b/
yaffs_guts.c
@@
-12,7
+12,7
@@
*/
const char *yaffs_guts_c_version =
*/
const char *yaffs_guts_c_version =
- "$Id: yaffs_guts.c,v 1.7
7 2009-01-27 02:00:42
charles Exp $";
+ "$Id: yaffs_guts.c,v 1.7
8 2009-01-27 02:52:45
charles Exp $";
#include "yportenv.h"
#include "yportenv.h"
@@
-1051,7
+1051,7
@@
static void yaffs_RetireBlock(yaffs_Device * dev, int blockInNAND)
if (dev->writeChunkWithTagsToNAND(dev, chunkId -
dev->chunkOffset, buffer, &tags) != YAFFS_OK)
T(YAFFS_TRACE_ALWAYS, (TSTR("yaffs: Failed to "
if (dev->writeChunkWithTagsToNAND(dev, chunkId -
dev->chunkOffset, buffer, &tags) != YAFFS_OK)
T(YAFFS_TRACE_ALWAYS, (TSTR("yaffs: Failed to "
- "write bad block marker to block %d"
+ TCONT("write bad block marker to block %d")
TENDSTR), blockInNAND));
yaffs_ReleaseTempBuffer(dev, buffer, __LINE__);
TENDSTR), blockInNAND));
yaffs_ReleaseTempBuffer(dev, buffer, __LINE__);
@@
-3717,8
+3717,8
@@
static int yaffs_WriteChunkDataToObject(yaffs_Object * in, int chunkInInode,
if(nBytes < 1 || nBytes > dev->totalBytesPerChunk){
T(YAFFS_TRACE_ERROR,
(TSTR("Writing %d bytes to chunk!!!!!!!!!" TENDSTR), nBytes));
if(nBytes < 1 || nBytes > dev->totalBytesPerChunk){
T(YAFFS_TRACE_ERROR,
(TSTR("Writing %d bytes to chunk!!!!!!!!!" TENDSTR), nBytes));
- while(1){}
-
}
+ YBUG();
+ }
@@
-4325,7
+4325,7
@@
static int yaffs_CheckpointObjectToObject( yaffs_Object *obj,yaffs_CheckpointObj
if (obj->variantType != cp->variantType) {
T(YAFFS_TRACE_ERROR,(TSTR("Checkpoint read object %d type %d "
if (obj->variantType != cp->variantType) {
T(YAFFS_TRACE_ERROR,(TSTR("Checkpoint read object %d type %d "
- "chunk %d does not match existing object type %d"
+ TCONT("chunk %d does not match existing object type %d")
TENDSTR), cp->objectId, cp->variantType, cp->hdrChunk,
obj->variantType));
return 0;
TENDSTR), cp->objectId, cp->variantType, cp->hdrChunk,
obj->variantType));
return 0;
@@
-4343,7
+4343,9
@@
static int yaffs_CheckpointObjectToObject( yaffs_Object *obj,yaffs_CheckpointObj
if(parent) {
if (parent->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) {
if(parent) {
if (parent->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) {
- T(YAFFS_TRACE_ALWAYS,(TSTR("Checkpoint read object %d parent %d type %d chunk %d Parent type, %d, not directory"TENDSTR),
+ T(YAFFS_TRACE_ALWAYS,(TSTR("Checkpoint read object %d parent %d type %d"
+ TCONT(" chunk %d Parent type, %d, not directory")
+ TENDSTR),
cp->objectId,cp->parentId,cp->variantType,cp->hdrChunk,parent->variantType));
return 0;
}
cp->objectId,cp->parentId,cp->variantType,cp->hdrChunk,parent->variantType));
return 0;
}
@@
-4871,8
+4873,10
@@
int yaffs_WriteDataToFile(yaffs_Object * in, const __u8 * buffer, loff_t offset,
if(chunk * dev->nDataBytesPerChunk + start != offset ||
start >= dev->nDataBytesPerChunk){
if(chunk * dev->nDataBytesPerChunk + start != offset ||
start >= dev->nDataBytesPerChunk){
- T(YAFFS_TRACE_ERROR,(TSTR("AddrToChunk of offset %d gives chunk %d start %d"TENDSTR),
- (int)offset, chunk,start));
+ T(YAFFS_TRACE_ERROR,(
+ TSTR("AddrToChunk of offset %d gives chunk %d start %d"
+ TENDSTR),
+ (int)offset, chunk,start));
}
chunk++;
}
chunk++;
@@
-6461,10
+6465,11
@@
static int yaffs_ScanBackwards(yaffs_Device * dev)
if (!in->valid && in->variantType !=
(oh ? oh->type : tags.extraObjectType))
if (!in->valid && in->variantType !=
(oh ? oh->type : tags.extraObjectType))
- T(YAFFS_TRACE_ERROR, (TSTR
- ("yaffs tragedy: Bad object type, "
- "%d != %d, for object %d at chunk "
- "%d during scan" TENDSTR), oh ?
+ T(YAFFS_TRACE_ERROR, (
+ TSTR("yaffs tragedy: Bad object type, "
+ TCONT("%d != %d, for object %d at chunk ")
+ TCONT("%d during scan")
+ TENDSTR), oh ?
oh->type : tags.extraObjectType,
in->variantType, tags.objectId,
chunk));
oh->type : tags.extraObjectType,
in->variantType, tags.objectId,
chunk));
diff --git
a/yportenv.h
b/yportenv.h
index c3fa36c3f192c1236b38240252592dd9c5a72e13..ae2c5b6ecfe133b92554fecd0c204f0bf40dafad 100644
(file)
--- a/
yportenv.h
+++ b/
yportenv.h
@@
-90,6
+90,7
@@
#define TENDSTR "\n"
#define TSTR(x) KERN_WARNING x
#define TENDSTR "\n"
#define TSTR(x) KERN_WARNING x
+#define TCONT(x) x
#define TOUT(p) printk p
#define yaffs_trace(mask, fmt, args...) \
#define TOUT(p) printk p
#define yaffs_trace(mask, fmt, args...) \