projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs: Replace YBUG() with BUG()
[yaffs2.git]
/
yaffs_guts.c
diff --git
a/yaffs_guts.c
b/yaffs_guts.c
index a579eee51bbd232e2d4a33630aac7cb1eb5cd165..c31ca30235758657a2ef746c7766aacb68aaf7ca 100644
(file)
--- a/
yaffs_guts.c
+++ b/
yaffs_guts.c
@@
-1089,7
+1089,7
@@
int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
yaffs_trace(YAFFS_TRACE_ERROR,
"yaffs tragedy:attempt to put data chunk into a non-file"
);
yaffs_trace(YAFFS_TRACE_ERROR,
"yaffs tragedy:attempt to put data chunk into a non-file"
);
-
Y
BUG();
+ BUG();
}
yaffs_chunk_del(dev, nand_chunk, 1, __LINE__);
}
yaffs_chunk_del(dev, nand_chunk, 1, __LINE__);
@@
-1290,19
+1290,19
@@
void yaffs_add_obj_to_dir(struct yaffs_obj *directory, struct yaffs_obj *obj)
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: Trying to add an object to a null pointer directory"
);
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: Trying to add an object to a null pointer directory"
);
-
Y
BUG();
+ BUG();
return;
}
if (directory->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: Trying to add an object to a non-directory"
);
return;
}
if (directory->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: Trying to add an object to a non-directory"
);
-
Y
BUG();
+ BUG();
}
if (obj->siblings.prev == NULL) {
/* Not initialised */
}
if (obj->siblings.prev == NULL) {
/* Not initialised */
-
Y
BUG();
+ BUG();
}
yaffs_verify_dir(directory);
}
yaffs_verify_dir(directory);
@@
-1339,7
+1339,7
@@
static int yaffs_change_obj_name(struct yaffs_obj *obj,
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_change_obj_name: new_dir is not a directory"
);
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_change_obj_name: new_dir is not a directory"
);
-
Y
BUG();
+ BUG();
}
/* TODO: Do we need this different handling for YAFFS2 and YAFFS1?? */
}
/* TODO: Do we need this different handling for YAFFS2 and YAFFS1?? */
@@
-1640,19
+1640,19
@@
static void yaffs_unhash_obj(struct yaffs_obj *obj)
/* FreeObject frees up a Object and puts it back on the free list */
static void yaffs_free_obj(struct yaffs_obj *obj)
{
/* FreeObject frees up a Object and puts it back on the free list */
static void yaffs_free_obj(struct yaffs_obj *obj)
{
- struct yaffs_dev *dev = obj->my_dev;
-
- yaffs_trace(YAFFS_TRACE_OS, "FreeObject %p inode %p",
- obj, obj->my_inode);
+ struct yaffs_dev *dev;
if (!obj) {
if (!obj) {
-
Y
BUG();
+ BUG();
return;
}
return;
}
+ dev = obj->my_dev;
+ yaffs_trace(YAFFS_TRACE_OS, "FreeObject %p inode %p",
+ obj, obj->my_inode);
if (obj->parent)
if (obj->parent)
-
Y
BUG();
+ BUG();
if (!list_empty(&obj->siblings))
if (!list_empty(&obj->siblings))
-
Y
BUG();
+ BUG();
if (obj->my_inode) {
/* We're still hooked up to a cached inode.
if (obj->my_inode) {
/* We're still hooked up to a cached inode.
@@
-3041,7
+3041,7
@@
static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
yaffs_trace(YAFFS_TRACE_ERROR,
"Writing %d bytes to chunk!!!!!!!!!",
n_bytes);
yaffs_trace(YAFFS_TRACE_ERROR,
"Writing %d bytes to chunk!!!!!!!!!",
n_bytes);
-
Y
BUG();
+ BUG();
}
new_chunk_id =
}
new_chunk_id =
@@
-3591,7
+3591,7
@@
int yaffs_do_file_wr(struct yaffs_obj *in, const u8 *buffer, loff_t offset,
if (n_writeback < 0 ||
n_writeback > dev->data_bytes_per_chunk)
if (n_writeback < 0 ||
n_writeback > dev->data_bytes_per_chunk)
-
Y
BUG();
+ BUG();
} else {
n_copy = dev->data_bytes_per_chunk - start;
} else {
n_copy = dev->data_bytes_per_chunk - start;
@@
-4083,11
+4083,11
@@
int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR *old_name,
struct yaffs_dev *dev;
if (!old_dir || old_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
struct yaffs_dev *dev;
if (!old_dir || old_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
-
Y
BUG();
+ BUG();
return YAFFS_FAIL;
}
if (!new_dir || new_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
return YAFFS_FAIL;
}
if (!new_dir || new_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
-
Y
BUG();
+ BUG();
return YAFFS_FAIL;
}
return YAFFS_FAIL;
}
@@
-4330,7
+4330,7
@@
static void yaffs_del_dir_contents(struct yaffs_obj *dir)
struct list_head *n;
if (dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
struct list_head *n;
if (dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
-
Y
BUG();
+ BUG();
list_for_each_safe(lh, n, &dir->variant.dir_variant.children) {
obj = list_entry(lh, struct yaffs_obj, siblings);
list_for_each_safe(lh, n, &dir->variant.dir_variant.children) {
obj = list_entry(lh, struct yaffs_obj, siblings);
@@
-4364,14
+4364,14
@@
struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_find_by_name: null pointer directory"
);
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_find_by_name: null pointer directory"
);
-
Y
BUG();
+ BUG();
return NULL;
}
if (directory->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_find_by_name: non-directory"
);
return NULL;
}
if (directory->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_find_by_name: non-directory"
);
-
Y
BUG();
+ BUG();
}
sum = yaffs_calc_name_sum(name);
}
sum = yaffs_calc_name_sum(name);
@@
-4380,7
+4380,7
@@
struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
l = list_entry(i, struct yaffs_obj, siblings);
if (l->parent != directory)
l = list_entry(i, struct yaffs_obj, siblings);
if (l->parent != directory)
-
Y
BUG();
+ BUG();
yaffs_check_obj_details_loaded(l);
yaffs_check_obj_details_loaded(l);