projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs: Merge branch 'python_play'
[yaffs2.git]
/
yaffs_yaffs1.c
diff --git
a/yaffs_yaffs1.c
b/yaffs_yaffs1.c
index 1b8fcf1f21ffbf010a8e8879b48813bd127eeba8..cc717461c66c3887590c9efb66189faa14e87a1b 100644
(file)
--- a/
yaffs_yaffs1.c
+++ b/
yaffs_yaffs1.c
@@
-18,9
+18,9
@@
#include "yaffs_nand.h"
#include "yaffs_nand.h"
-int yaffs1_
Scan(yaffs_Device
*dev)
+int yaffs1_
scan(yaffs_dev_t
*dev)
{
{
- yaffs_
ExtendedT
ags tags;
+ yaffs_
ext_t
ags tags;
int blk;
int blockIterator;
int startIterator;
int blk;
int blockIterator;
int startIterator;
@@
-30,17
+30,17
@@
int yaffs1_Scan(yaffs_Device *dev)
int chunk;
int c;
int deleted;
int chunk;
int c;
int deleted;
- yaffs_
BlockState
state;
- yaffs_
Object *hardL
ist = NULL;
- yaffs_
BlockInfo
*bi;
- __u32 seq
uenceN
umber;
- yaffs_
ObjectH
eader *oh;
- yaffs_
Objec
t *in;
- yaffs_
Objec
t *parent;
+ yaffs_
block_state_t
state;
+ yaffs_
obj_t *hard_l
ist = NULL;
+ yaffs_
block_info_t
*bi;
+ __u32 seq
_n
umber;
+ yaffs_
obj_h
eader *oh;
+ yaffs_
obj_
t *in;
+ yaffs_
obj_
t *parent;
int alloc_failed = 0;
int alloc_failed = 0;
- struct yaffs_
ShadowFixerStruct
*shadowFixerList = NULL;
+ struct yaffs_
shadow_fixer_s
*shadowFixerList = NULL;
__u8 *chunkData;
__u8 *chunkData;
@@
-48,31
+48,31
@@
int yaffs1_Scan(yaffs_Device *dev)
T(YAFFS_TRACE_SCAN,
T(YAFFS_TRACE_SCAN,
- (TSTR("yaffs1_
S
can starts intstartblk %d intendblk %d..." TENDSTR),
- dev->internal
StartBlock, dev->internalEndB
lock));
+ (TSTR("yaffs1_
s
can starts intstartblk %d intendblk %d..." TENDSTR),
+ dev->internal
_start_block, dev->internal_end_b
lock));
- chunkData = yaffs_
GetTempB
uffer(dev, __LINE__);
+ chunkData = yaffs_
get_temp_b
uffer(dev, __LINE__);
- dev->seq
uenceN
umber = YAFFS_LOWEST_SEQUENCE_NUMBER;
+ dev->seq
_n
umber = YAFFS_LOWEST_SEQUENCE_NUMBER;
/* Scan all the blocks to determine their state */
/* Scan all the blocks to determine their state */
- bi = dev->block
I
nfo;
- for (blk = dev->internal
StartBlock; blk <= dev->internalEndB
lock; blk++) {
- yaffs_
ClearChunkB
its(dev, blk);
- bi->pages
InU
se = 0;
- bi->soft
Deletion
s = 0;
+ bi = dev->block
_i
nfo;
+ for (blk = dev->internal
_start_block; blk <= dev->internal_end_b
lock; blk++) {
+ yaffs_
clear_chunk_b
its(dev, blk);
+ bi->pages
_in_u
se = 0;
+ bi->soft
_del_page
s = 0;
- yaffs_
QueryInitialBlockState(dev, blk, &state, &sequenceN
umber);
+ yaffs_
query_init_block_state(dev, blk, &state, &seq_n
umber);
- bi->block
S
tate = state;
- bi->seq
uenceNumber = sequenceN
umber;
+ bi->block
_s
tate = state;
+ bi->seq
_number = seq_n
umber;
- if (bi->seq
uenceN
umber == YAFFS_SEQUENCE_BAD_BLOCK)
- bi->block
S
tate = state = YAFFS_BLOCK_STATE_DEAD;
+ if (bi->seq
_n
umber == YAFFS_SEQUENCE_BAD_BLOCK)
+ bi->block
_s
tate = state = YAFFS_BLOCK_STATE_DEAD;
T(YAFFS_TRACE_SCAN_DEBUG,
(TSTR("Block scanning block %d state %d seq %d" TENDSTR), blk,
T(YAFFS_TRACE_SCAN_DEBUG,
(TSTR("Block scanning block %d state %d seq %d" TENDSTR), blk,
- state, seq
uenceN
umber));
+ state, seq
_n
umber));
if (state == YAFFS_BLOCK_STATE_DEAD) {
T(YAFFS_TRACE_BAD_BLOCKS,
if (state == YAFFS_BLOCK_STATE_DEAD) {
T(YAFFS_TRACE_BAD_BLOCKS,
@@
-80,14
+80,14
@@
int yaffs1_Scan(yaffs_Device *dev)
} else if (state == YAFFS_BLOCK_STATE_EMPTY) {
T(YAFFS_TRACE_SCAN_DEBUG,
(TSTR("Block empty " TENDSTR)));
} else if (state == YAFFS_BLOCK_STATE_EMPTY) {
T(YAFFS_TRACE_SCAN_DEBUG,
(TSTR("Block empty " TENDSTR)));
- dev->n
ErasedB
locks++;
- dev->n
FreeChunks += dev->param.nChunksPerB
lock;
+ dev->n
_erased_b
locks++;
+ dev->n
_free_chunks += dev->param.chunks_per_b
lock;
}
bi++;
}
}
bi++;
}
- startIterator = dev->internal
StartB
lock;
- endIterator = dev->internal
EndB
lock;
+ startIterator = dev->internal
_start_b
lock;
+ endIterator = dev->internal
_end_b
lock;
/* For each block.... */
for (blockIterator = startIterator; !alloc_failed && blockIterator <= endIterator;
/* For each block.... */
for (blockIterator = startIterator; !alloc_failed && blockIterator <= endIterator;
@@
-99,30
+99,30
@@
int yaffs1_Scan(yaffs_Device *dev)
blk = blockIterator;
blk = blockIterator;
- bi = yaffs_
GetBlockI
nfo(dev, blk);
- state = bi->block
S
tate;
+ bi = yaffs_
get_block_i
nfo(dev, blk);
+ state = bi->block
_s
tate;
deleted = 0;
/* For each chunk in each block that needs scanning....*/
deleted = 0;
/* For each chunk in each block that needs scanning....*/
- for (c = 0; !alloc_failed && c < dev->param.
nChunksPerB
lock &&
+ for (c = 0; !alloc_failed && c < dev->param.
chunks_per_b
lock &&
state == YAFFS_BLOCK_STATE_NEEDS_SCANNING; c++) {
/* Read the tags and decide what to do */
state == YAFFS_BLOCK_STATE_NEEDS_SCANNING; c++) {
/* Read the tags and decide what to do */
- chunk = blk * dev->param.
nChunksPerB
lock + c;
+ chunk = blk * dev->param.
chunks_per_b
lock + c;
- result = yaffs_
ReadChunkWithTagsFromNAND
(dev, chunk, NULL,
+ result = yaffs_
rd_chunk_tags_nand
(dev, chunk, NULL,
&tags);
/* Let's have a good look at this chunk... */
&tags);
/* Let's have a good look at this chunk... */
- if (tags.ecc
Result == YAFFS_ECC_RESULT_UNFIXED || tags.chunkD
eleted) {
+ if (tags.ecc
_result == YAFFS_ECC_RESULT_UNFIXED || tags.is_d
eleted) {
/* YAFFS1 only...
* A deleted chunk
*/
deleted++;
/* YAFFS1 only...
* A deleted chunk
*/
deleted++;
- dev->n
FreeC
hunks++;
+ dev->n
_free_c
hunks++;
/*T((" %d %d deleted\n",blk,c)); */
/*T((" %d %d deleted\n",blk,c)); */
- } else if (!tags.chunk
U
sed) {
+ } else if (!tags.chunk
_u
sed) {
/* An unassigned chunk in the block
* This means that either the block is empty or
* this is the one being allocated from
/* An unassigned chunk in the block
* This means that either the block is empty or
* this is the one being allocated from
@@
-131,7
+131,7
@@
int yaffs1_Scan(yaffs_Device *dev)
if (c == 0) {
/* We're looking at the first chunk in the block so the block is unused */
state = YAFFS_BLOCK_STATE_EMPTY;
if (c == 0) {
/* We're looking at the first chunk in the block so the block is unused */
state = YAFFS_BLOCK_STATE_EMPTY;
- dev->n
ErasedB
locks++;
+ dev->n
_erased_b
locks++;
} else {
/* this is the block being allocated from */
T(YAFFS_TRACE_SCAN,
} else {
/* this is the block being allocated from */
T(YAFFS_TRACE_SCAN,
@@
-139,98
+139,103
@@
int yaffs1_Scan(yaffs_Device *dev)
(" Allocating from %d %d" TENDSTR),
blk, c));
state = YAFFS_BLOCK_STATE_ALLOCATING;
(" Allocating from %d %d" TENDSTR),
blk, c));
state = YAFFS_BLOCK_STATE_ALLOCATING;
- dev->alloc
ationB
lock = blk;
- dev->alloc
ationP
age = c;
- dev->alloc
ationBlockF
inder = blk;
+ dev->alloc
_b
lock = blk;
+ dev->alloc
_p
age = c;
+ dev->alloc
_block_f
inder = blk;
/* Set block finder here to encourage the allocator to go forth from here. */
}
/* Set block finder here to encourage the allocator to go forth from here. */
}
- dev->n
FreeChunks += (dev->param.nChunksPerB
lock - c);
- } else if (tags.chunk
I
d > 0) {
- /* chunk
I
d > 0 so it is a data chunk... */
+ dev->n
_free_chunks += (dev->param.chunks_per_b
lock - c);
+ } else if (tags.chunk
_i
d > 0) {
+ /* chunk
_i
d > 0 so it is a data chunk... */
unsigned int endpos;
unsigned int endpos;
- yaffs_
SetChunkB
it(dev, blk, c);
- bi->pages
InU
se++;
+ yaffs_
set_chunk_b
it(dev, blk, c);
+ bi->pages
_in_u
se++;
- in = yaffs_
FindOrCreateObjectByN
umber(dev,
+ in = yaffs_
find_or_create_by_n
umber(dev,
tags.
tags.
- obj
ectI
d,
+ obj
_i
d,
YAFFS_OBJECT_TYPE_FILE);
/* PutChunkIntoFile checks for a clash (two data chunks with
YAFFS_OBJECT_TYPE_FILE);
/* PutChunkIntoFile checks for a clash (two data chunks with
- * the same chunk
I
d).
+ * the same chunk
_i
d).
*/
if (!in)
alloc_failed = 1;
if (in) {
*/
if (!in)
alloc_failed = 1;
if (in) {
- if (!yaffs_
PutChunkIntoFile(in, tags.chunkI
d, chunk, 1))
+ if (!yaffs_
put_chunk_in_file(in, tags.chunk_i
d, chunk, 1))
alloc_failed = 1;
}
endpos =
alloc_failed = 1;
}
endpos =
- (tags.chunk
Id - 1) * dev->nDataBytesPerC
hunk +
- tags.
byteCount
;
+ (tags.chunk
_id - 1) * dev->data_bytes_per_c
hunk +
+ tags.
n_bytes
;
if (in &&
if (in &&
- in->variant
T
ype == YAFFS_OBJECT_TYPE_FILE
- && in->variant.file
Variant.scannedFileS
ize <
+ in->variant
_t
ype == YAFFS_OBJECT_TYPE_FILE
+ && in->variant.file
_variant.scanned_s
ize <
endpos) {
endpos) {
- in->variant.file
V
ariant.
- scanned
FileS
ize = endpos;
- if (!dev->param.use
HeaderFileS
ize) {
- in->variant.file
V
ariant.
- file
S
ize =
- in->variant.file
V
ariant.
- scanned
FileS
ize;
+ in->variant.file
_v
ariant.
+ scanned
_s
ize = endpos;
+ if (!dev->param.use
_header_file_s
ize) {
+ in->variant.file
_v
ariant.
+ file
_s
ize =
+ in->variant.file
_v
ariant.
+ scanned
_s
ize;
}
}
}
}
- /* T((" %d %d data %d %d\n",blk,c,tags.obj
ectId,tags.chunkI
d)); */
+ /* T((" %d %d data %d %d\n",blk,c,tags.obj
_id,tags.chunk_i
d)); */
} else {
} else {
- /* chunk
I
d == 0, so it is an ObjectHeader.
+ /* chunk
_i
d == 0, so it is an ObjectHeader.
* Thus, we read in the object header and make the object
*/
* Thus, we read in the object header and make the object
*/
- yaffs_
SetChunkB
it(dev, blk, c);
- bi->pages
InU
se++;
+ yaffs_
set_chunk_b
it(dev, blk, c);
+ bi->pages
_in_u
se++;
- result = yaffs_
ReadChunkWithTagsFromNAND
(dev, chunk,
+ result = yaffs_
rd_chunk_tags_nand
(dev, chunk,
chunkData,
NULL);
chunkData,
NULL);
- oh = (yaffs_
ObjectH
eader *) chunkData;
+ oh = (yaffs_
obj_h
eader *) chunkData;
- in = yaffs_
FindObjectByN
umber(dev,
- tags.obj
ectI
d);
- if (in && in->variant
T
ype != oh->type) {
+ in = yaffs_
find_by_n
umber(dev,
+ tags.obj
_i
d);
+ if (in && in->variant
_t
ype != oh->type) {
/* This should not happen, but somehow
/* This should not happen, but somehow
- * Wev'e ended up with an obj
ectI
d that has been reused but not yet
+ * Wev'e ended up with an obj
_i
d that has been reused but not yet
* deleted, and worse still it has changed type. Delete the old object.
*/
* deleted, and worse still it has changed type. Delete the old object.
*/
- yaffs_
DeleteObject
(in);
+ yaffs_
del_obj
(in);
in = 0;
}
in = 0;
}
- in = yaffs_
FindOrCreateObjectByN
umber(dev,
+ in = yaffs_
find_or_create_by_n
umber(dev,
tags.
tags.
- obj
ectI
d,
+ obj
_i
d,
oh->type);
if (!in)
alloc_failed = 1;
oh->type);
if (!in)
alloc_failed = 1;
- if (in && oh->shadows
Object
> 0) {
+ if (in && oh->shadows
_obj
> 0) {
- struct yaffs_
ShadowFixerStruct
*fixer;
- fixer = YMALLOC(sizeof(struct yaffs_
ShadowFixerStruct
));
+ struct yaffs_
shadow_fixer_s
*fixer;
+ fixer = YMALLOC(sizeof(struct yaffs_
shadow_fixer_s
));
if (fixer) {
fixer->next = shadowFixerList;
shadowFixerList = fixer;
if (fixer) {
fixer->next = shadowFixerList;
shadowFixerList = fixer;
- fixer->objectId = tags.objectId;
- fixer->shadowedId = oh->shadowsObject;
+ fixer->obj_id = tags.obj_id;
+ fixer->shadowed_id = oh->shadows_obj;
+ T(YAFFS_TRACE_SCAN,
+ (TSTR
+ (" Shadow fixer: %d shadows %d" TENDSTR),
+ fixer->obj_id, fixer->shadowed_id));
+
}
}
}
}
@@
-239,27
+244,27
@@
int yaffs1_Scan(yaffs_Device *dev)
/* We have already filled this one. We have a duplicate and need to resolve it. */
unsigned existingSerial = in->serial;
/* We have already filled this one. We have a duplicate and need to resolve it. */
unsigned existingSerial = in->serial;
- unsigned newSerial = tags.serial
N
umber;
+ unsigned newSerial = tags.serial
_n
umber;
if (((existingSerial + 1) & 3) == newSerial) {
/* Use new one - destroy the exisiting one */
if (((existingSerial + 1) & 3) == newSerial) {
/* Use new one - destroy the exisiting one */
- yaffs_
DeleteChunk
(dev,
- in->hdr
C
hunk,
+ yaffs_
chunk_del
(dev,
+ in->hdr
_c
hunk,
1, __LINE__);
in->valid = 0;
} else {
/* Use existing - destroy this one. */
1, __LINE__);
in->valid = 0;
} else {
/* Use existing - destroy this one. */
- yaffs_
DeleteChunk
(dev, chunk, 1,
+ yaffs_
chunk_del
(dev, chunk, 1,
__LINE__);
}
}
if (in && !in->valid &&
__LINE__);
}
}
if (in && !in->valid &&
- (tags.obj
ectI
d == YAFFS_OBJECTID_ROOT ||
- tags.obj
ectI
d == YAFFS_OBJECTID_LOSTNFOUND)) {
+ (tags.obj
_i
d == YAFFS_OBJECTID_ROOT ||
+ tags.obj
_i
d == YAFFS_OBJECTID_LOSTNFOUND)) {
/* We only load some info, don't fiddle with directory structure */
in->valid = 1;
/* We only load some info, don't fiddle with directory structure */
in->valid = 1;
- in->variant
T
ype = oh->type;
+ in->variant
_t
ype = oh->type;
in->yst_mode = oh->yst_mode;
#ifdef CONFIG_YAFFS_WINCE
in->yst_mode = oh->yst_mode;
#ifdef CONFIG_YAFFS_WINCE
@@
-277,14
+282,14
@@
int yaffs1_Scan(yaffs_Device *dev)
in->yst_ctime = oh->yst_ctime;
in->yst_rdev = oh->yst_rdev;
#endif
in->yst_ctime = oh->yst_ctime;
in->yst_rdev = oh->yst_rdev;
#endif
- in->hdr
C
hunk = chunk;
- in->serial = tags.serial
N
umber;
+ in->hdr
_c
hunk = chunk;
+ in->serial = tags.serial
_n
umber;
} else if (in && !in->valid) {
/* we need to load this info */
in->valid = 1;
} else if (in && !in->valid) {
/* we need to load this info */
in->valid = 1;
- in->variant
T
ype = oh->type;
+ in->variant
_t
ype = oh->type;
in->yst_mode = oh->yst_mode;
#ifdef CONFIG_YAFFS_WINCE
in->yst_mode = oh->yst_mode;
#ifdef CONFIG_YAFFS_WINCE
@@
-302,10
+307,10
@@
int yaffs1_Scan(yaffs_Device *dev)
in->yst_ctime = oh->yst_ctime;
in->yst_rdev = oh->yst_rdev;
#endif
in->yst_ctime = oh->yst_ctime;
in->yst_rdev = oh->yst_rdev;
#endif
- in->hdr
C
hunk = chunk;
- in->serial = tags.serial
N
umber;
+ in->hdr
_c
hunk = chunk;
+ in->serial = tags.serial
_n
umber;
- yaffs_
SetObjectNameFromOH
(in, oh);
+ yaffs_
set_obj_name_from_oh
(in, oh);
in->dirty = 0;
/* directory stuff...
in->dirty = 0;
/* directory stuff...
@@
-313,20
+318,20
@@
int yaffs1_Scan(yaffs_Device *dev)
*/
parent =
*/
parent =
- yaffs_
FindOrCreateObjectByN
umber
- (dev, oh->parent
ObjectI
d,
+ yaffs_
find_or_create_by_n
umber
+ (dev, oh->parent
_obj_i
d,
YAFFS_OBJECT_TYPE_DIRECTORY);
if (!parent)
alloc_failed = 1;
YAFFS_OBJECT_TYPE_DIRECTORY);
if (!parent)
alloc_failed = 1;
- if (parent && parent->variant
T
ype ==
+ if (parent && parent->variant
_t
ype ==
YAFFS_OBJECT_TYPE_UNKNOWN) {
/* Set up as a directory */
YAFFS_OBJECT_TYPE_UNKNOWN) {
/* Set up as a directory */
- parent->variant
T
ype =
+ parent->variant
_t
ype =
YAFFS_OBJECT_TYPE_DIRECTORY;
YINIT_LIST_HEAD(&parent->variant.
YAFFS_OBJECT_TYPE_DIRECTORY;
YINIT_LIST_HEAD(&parent->variant.
- dir
ectoryV
ariant.
+ dir
_v
ariant.
children);
children);
- } else if (!parent || parent->variant
T
ype !=
+ } else if (!parent || parent->variant
_t
ype !=
YAFFS_OBJECT_TYPE_DIRECTORY) {
/* Hoosterman, another problem....
* We're trying to use a non-directory as a directory
YAFFS_OBJECT_TYPE_DIRECTORY) {
/* Hoosterman, another problem....
* We're trying to use a non-directory as a directory
@@
-336,15
+341,15
@@
int yaffs1_Scan(yaffs_Device *dev)
(TSTR
("yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found."
TENDSTR)));
(TSTR
("yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found."
TENDSTR)));
- parent = dev->lost
NFoundDir
;
+ parent = dev->lost
_n_found
;
}
}
- yaffs_
AddObjectToDirectory
(parent, in);
+ yaffs_
add_obj_to_dir
(parent, in);
- if (0 && (parent == dev->del
etedD
ir ||
- parent == dev->unlinked
D
ir)) {
+ if (0 && (parent == dev->del
_d
ir ||
+ parent == dev->unlinked
_d
ir)) {
in->deleted = 1; /* If it is unlinked at start up then it wants deleting */
in->deleted = 1; /* If it is unlinked at start up then it wants deleting */
- dev->n
DeletedF
iles++;
+ dev->n
_deleted_f
iles++;
}
/* Note re hardlinks.
* Since we might scan a hardlink before its equivalent object is scanned
}
/* Note re hardlinks.
* Since we might scan a hardlink before its equivalent object is scanned
@@
-353,26
+358,26
@@
int yaffs1_Scan(yaffs_Device *dev)
* list and fix up all the chains.
*/
* list and fix up all the chains.
*/
- switch (in->variant
T
ype) {
+ switch (in->variant
_t
ype) {
case YAFFS_OBJECT_TYPE_UNKNOWN:
/* Todo got a problem */
break;
case YAFFS_OBJECT_TYPE_FILE:
case YAFFS_OBJECT_TYPE_UNKNOWN:
/* Todo got a problem */
break;
case YAFFS_OBJECT_TYPE_FILE:
- if (dev->param.use
HeaderFileS
ize)
+ if (dev->param.use
_header_file_s
ize)
- in->variant.file
V
ariant.
- file
S
ize =
- oh->file
S
ize;
+ in->variant.file
_v
ariant.
+ file
_s
ize =
+ oh->file
_s
ize;
break;
case YAFFS_OBJECT_TYPE_HARDLINK:
break;
case YAFFS_OBJECT_TYPE_HARDLINK:
- in->variant.hard
LinkV
ariant.
- equiv
alentObjectI
d =
- oh->equiv
alentObjectI
d;
- in->hard
L
inks.next =
+ in->variant.hard
link_v
ariant.
+ equiv
_i
d =
+ oh->equiv
_i
d;
+ in->hard
_l
inks.next =
(struct ylist_head *)
(struct ylist_head *)
- hard
L
ist;
- hard
L
ist = in;
+ hard
_l
ist;
+ hard
_l
ist = in;
break;
case YAFFS_OBJECT_TYPE_DIRECTORY:
/* Do nothing */
break;
case YAFFS_OBJECT_TYPE_DIRECTORY:
/* Do nothing */
@@
-381,9
+386,9
@@
int yaffs1_Scan(yaffs_Device *dev)
/* Do nothing */
break;
case YAFFS_OBJECT_TYPE_SYMLINK:
/* Do nothing */
break;
case YAFFS_OBJECT_TYPE_SYMLINK:
- in->variant.sym
LinkV
ariant.alias =
- yaffs_
CloneString
(oh->alias);
- if (!in->variant.sym
LinkV
ariant.alias)
+ in->variant.sym
link_v
ariant.alias =
+ yaffs_
clone_str
(oh->alias);
+ if (!in->variant.sym
link_v
ariant.alias)
alloc_failed = 1;
break;
}
alloc_failed = 1;
break;
}
@@
-400,16
+405,16
@@
int yaffs1_Scan(yaffs_Device *dev)
if (state == YAFFS_BLOCK_STATE_ALLOCATING) {
/* If the block was partially allocated then treat it as fully allocated.*/
state = YAFFS_BLOCK_STATE_FULL;
if (state == YAFFS_BLOCK_STATE_ALLOCATING) {
/* If the block was partially allocated then treat it as fully allocated.*/
state = YAFFS_BLOCK_STATE_FULL;
- dev->alloc
ationB
lock = -1;
+ dev->alloc
_b
lock = -1;
}
}
- bi->block
S
tate = state;
+ bi->block
_s
tate = state;
/* Now let's see if it was dirty */
/* Now let's see if it was dirty */
- if (bi->pages
InU
se == 0 &&
- !bi->has
ShrinkHeade
r &&
- bi->block
S
tate == YAFFS_BLOCK_STATE_FULL) {
- yaffs_
BlockBecameD
irty(dev, blk);
+ if (bi->pages
_in_u
se == 0 &&
+ !bi->has
_shrink_hd
r &&
+ bi->block
_s
tate == YAFFS_BLOCK_STATE_FULL) {
+ yaffs_
block_became_d
irty(dev, blk);
}
}
}
}
@@
-421,12
+426,12
@@
int yaffs1_Scan(yaffs_Device *dev)
* hardlinks.
*/
* hardlinks.
*/
- yaffs_
HardlinkFixup(dev, hardL
ist);
+ yaffs_
link_fixup(dev, hard_l
ist);
/* Fix up any shadowed objects */
{
/* Fix up any shadowed objects */
{
- struct yaffs_
ShadowFixerStruct
*fixer;
- yaffs_
Objec
t *obj;
+ struct yaffs_
shadow_fixer_s
*fixer;
+ yaffs_
obj_
t *obj;
while (shadowFixerList) {
fixer = shadowFixerList;
while (shadowFixerList) {
fixer = shadowFixerList;
@@
-434,25
+439,25
@@
int yaffs1_Scan(yaffs_Device *dev)
/* Complete the rename transaction by deleting the shadowed object
* then setting the object header to unshadowed.
*/
/* Complete the rename transaction by deleting the shadowed object
* then setting the object header to unshadowed.
*/
- obj = yaffs_
FindObjectByNumber(dev, fixer->shadowedI
d);
+ obj = yaffs_
find_by_number(dev, fixer->shadowed_i
d);
if (obj)
if (obj)
- yaffs_
DeleteObject
(obj);
+ yaffs_
del_obj
(obj);
- obj = yaffs_
FindObjectByNumber(dev, fixer->objectI
d);
+ obj = yaffs_
find_by_number(dev, fixer->obj_i
d);
if (obj)
if (obj)
- yaffs_
UpdateObjectHeader
(obj, NULL, 1, 0, 0, NULL);
+ yaffs_
update_oh
(obj, NULL, 1, 0, 0, NULL);
YFREE(fixer);
}
}
YFREE(fixer);
}
}
- yaffs_
ReleaseTempB
uffer(dev, chunkData, __LINE__);
+ yaffs_
release_temp_b
uffer(dev, chunkData, __LINE__);
if (alloc_failed)
return YAFFS_FAIL;
if (alloc_failed)
return YAFFS_FAIL;
- T(YAFFS_TRACE_SCAN, (TSTR("yaffs1_
S
can ends" TENDSTR)));
+ T(YAFFS_TRACE_SCAN, (TSTR("yaffs1_
s
can ends" TENDSTR)));
return YAFFS_OK;
return YAFFS_OK;