projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some extra debugging to yaffs_vfs_multi.c
[yaffs2.git]
/
direct
/
yaffs_error.c
diff --git
a/direct/yaffs_error.c
b/direct/yaffs_error.c
index 6757eec83cc3a352233e974e0d44841c9bff12e0..11b75f7a0b24f6a5420b960f402c5c1dfde3d3a8 100644
(file)
--- a/
direct/yaffs_error.c
+++ b/
direct/yaffs_error.c
@@
-1,7
+1,7
@@
/*
* YAFFS: Yet another FFS. A NAND-flash specific file system.
*
/*
* YAFFS: Yet another FFS. A NAND-flash specific file system.
*
- * Copyright (C) 2002-201
0
Aleph One Ltd.
+ * Copyright (C) 2002-201
1
Aleph One Ltd.
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Timothy Manning <timothy@yaffs.net>
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Timothy Manning <timothy@yaffs.net>
@@
-14,8
+14,8
@@
#include "yaffsfs.h"
struct error_entry {
#include "yaffsfs.h"
struct error_entry {
- int code;
- char * text;
+
int code;
+ const char *text;
};
static const struct error_entry error_list[] = {
};
static const struct error_entry error_list[] = {
@@
-31,7
+31,7
@@
static const struct error_entry error_list[] = {
{ ERANGE , "ERANGE"},
{ ENODATA, "ENODATA"},
{ ENOTEMPTY, "ENOTEMPTY"},
{ ERANGE , "ERANGE"},
{ ENODATA, "ENODATA"},
{ ENOTEMPTY, "ENOTEMPTY"},
- { ENAMETOOLONG,"ENAMETOOLONG"},
+ { ENAMETOOLONG,
"ENAMETOOLONG"},
{ ENOMEM , "ENOMEM"},
{ EEXIST , "EEXIST"},
{ ENOTDIR , "ENOTDIR"},
{ ENOMEM , "ENOMEM"},
{ EEXIST , "EEXIST"},
{ ENOTDIR , "ENOTDIR"},
@@
-42,15
+42,15
@@
static const struct error_entry error_list[] = {
{ 0, NULL }
};
{ 0, NULL }
};
-const char *
yaffs_error_to_str(int err)
+const char *yaffs_error_to_str(int err)
{
const struct error_entry *e = error_list;
{
const struct error_entry *e = error_list;
- if (err < 0)
+ if (err < 0)
err = -err;
err = -err;
- while
(e->code && e->text)
{
- if(err == e->code)
+ while
(e->code && e->text)
{
+ if
(err == e->code)
return e->text;
e++;
}
return e->text;
e++;
}