projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs direct: Fix error handling in yaffs_access
[yaffs2.git]
/
direct
/
yaffsfs.c
diff --git
a/direct/yaffsfs.c
b/direct/yaffsfs.c
index 203a034c739dfd4287459cb8402746a8b5efb6ee..6622536c834e652826445ada9c76cc0cae764659 100644
(file)
--- a/
direct/yaffsfs.c
+++ b/
direct/yaffsfs.c
@@
-32,7
+32,10
@@
/* Some forward references */
static struct yaffs_obj *yaffsfs_FindObject(struct yaffs_obj *relativeDirectory,
/* Some forward references */
static struct yaffs_obj *yaffsfs_FindObject(struct yaffs_obj *relativeDirectory,
- const YCHAR *path, int symDepth, int getEquiv);
+ const YCHAR *path,
+ int symDepth, int getEquiv,
+ struct yaffs_obj **dirOut);
+
static void yaffsfs_RemoveObjectCallback(struct yaffs_obj *obj);
unsigned int yaffs_wr_attempts;
static void yaffsfs_RemoveObjectCallback(struct yaffs_obj *obj);
unsigned int yaffs_wr_attempts;
@@
-444,10
+447,10
@@
static struct yaffs_obj *yaffsfs_FollowLink(struct yaffs_obj *obj,int symDepth)
if(yaffsfs_IsPathDivider(*alias))
/* Starts with a /, need to scan from root up */
if(yaffsfs_IsPathDivider(*alias))
/* Starts with a /, need to scan from root up */
- obj = yaffsfs_FindObject(NULL,alias,symDepth++,1);
+ obj = yaffsfs_FindObject(NULL,alias,symDepth++,1
,NULL
);
else
/* Relative to here, so use the parent of the symlink as a start */
else
/* Relative to here, so use the parent of the symlink as a start */
- obj = yaffsfs_FindObject(obj->parent,alias,symDepth++,1);
+ obj = yaffsfs_FindObject(obj->parent,alias,symDepth++,1
,NULL
);
}
return obj;
}
}
return obj;
}
@@
-531,7
+534,9
@@
static struct yaffs_obj *yaffsfs_FindDirectory(struct yaffs_obj *relativeDirecto
/*
* yaffsfs_FindObject turns a path for an existing object into the object
*/
/*
* yaffsfs_FindObject turns a path for an existing object into the object
*/
-static struct yaffs_obj *yaffsfs_FindObject(struct yaffs_obj *relativeDirectory, const YCHAR *path,int symDepth, int getEquiv)
+static struct yaffs_obj *yaffsfs_FindObject(struct yaffs_obj *relativeDirectory,
+ const YCHAR *path,int symDepth, int getEquiv,
+ struct yaffs_obj **dirOut)
{
struct yaffs_obj *dir;
struct yaffs_obj *obj;
{
struct yaffs_obj *dir;
struct yaffs_obj *obj;
@@
-539,6
+544,9
@@
static struct yaffs_obj *yaffsfs_FindObject(struct yaffs_obj *relativeDirectory,
dir = yaffsfs_FindDirectory(relativeDirectory,path,&name,symDepth);
dir = yaffsfs_FindDirectory(relativeDirectory,path,&name,symDepth);
+ if(dirOut)
+ *dirOut = dir;
+
if(dir && *name)
obj = yaffs_find_by_name(dir,name);
else
if(dir && *name)
obj = yaffs_find_by_name(dir,name);
else
@@
-628,7
+636,7
@@
int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
yh = yaffsfs_GetHandlePointer(handle);
/* try to find the exisiting object */
yh = yaffsfs_GetHandlePointer(handle);
/* try to find the exisiting object */
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
,NULL
);
obj = yaffsfs_FollowLink(obj,symDepth++);
obj = yaffsfs_FollowLink(obj,symDepth++);
@@
-1052,13
+1060,16
@@
int yaffs_pwrite(int fd, const void *buf, unsigned int nbyte, unsigned int offse
int yaffs_truncate(const YCHAR *path,off_t new_size)
{
struct yaffs_obj *obj = NULL;
int yaffs_truncate(const YCHAR *path,off_t new_size)
{
struct yaffs_obj *obj = NULL;
+ struct yaffs_obj *dir = NULL;
int result = YAFFS_FAIL;
yaffsfs_Lock();
int result = YAFFS_FAIL;
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
,&dir
);
- if(!obj)
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
yaffsfs_SetError(-ENOENT);
else if(obj->variant_type != YAFFS_OBJECT_TYPE_FILE)
yaffsfs_SetError(-EISDIR);
yaffsfs_SetError(-ENOENT);
else if(obj->variant_type != YAFFS_OBJECT_TYPE_FILE)
yaffsfs_SetError(-EISDIR);
@@
-1148,8
+1159,9
@@
int yaffsfs_DoUnlink(const YCHAR *path,int isDirectory)
yaffsfs_Lock();
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,0);
+ obj = yaffsfs_FindObject(NULL,path,0,0
,NULL
);
dir = yaffsfs_FindDirectory(NULL,path,&name,0);
dir = yaffsfs_FindDirectory(NULL,path,&name,0);
+
if(!dir)
yaffsfs_SetError(-ENOTDIR);
else if(!obj)
if(!dir)
yaffsfs_SetError(-ENOTDIR);
else if(!obj)
@@
-1199,14
+1211,16
@@
int yaffs_rename(const YCHAR *oldPath, const YCHAR *newPath)
olddir = yaffsfs_FindDirectory(NULL,oldPath,&oldname,0);
newdir = yaffsfs_FindDirectory(NULL,newPath,&newname,0);
olddir = yaffsfs_FindDirectory(NULL,oldPath,&oldname,0);
newdir = yaffsfs_FindDirectory(NULL,newPath,&newname,0);
- obj = yaffsfs_FindObject(NULL,oldPath,0,0);
+ obj = yaffsfs_FindObject(NULL,oldPath,0,0
,NULL
);
- if(!olddir || !newdir || !obj) {
- /* bad file */
- yaffsfs_SetError(-EBADF);
+ if(!olddir || !newdir) {
+ yaffsfs_SetError(-ENOTDIR);
+ rename_allowed = 0;
+ } else if(!obj) {
+ yaffsfs_SetError(-ENOENT);
rename_allowed = 0;
} else if(obj->my_dev->read_only){
rename_allowed = 0;
} else if(obj->my_dev->read_only){
- yaffsfs_SetError(-E
INVAL
);
+ yaffsfs_SetError(-E
ROFS
);
rename_allowed = 0;
} else if(olddir->my_dev != newdir->my_dev) {
/* Rename must be on same device */
rename_allowed = 0;
} else if(olddir->my_dev != newdir->my_dev) {
/* Rename must be on same device */
@@
-1227,7
+1241,7
@@
int yaffs_rename(const YCHAR *oldPath, const YCHAR *newPath)
xx = xx->parent;
}
if(!rename_allowed)
xx = xx->parent;
}
if(!rename_allowed)
- yaffsfs_SetError(-E
ACCES
);
+ yaffsfs_SetError(-E
INVAL
);
}
if(rename_allowed)
}
if(rename_allowed)
@@
-1283,22
+1297,24
@@
static int yaffsfs_DoStat(struct yaffs_obj *obj,struct yaffs_stat *buf)
static int yaffsfs_DoStatOrLStat(const YCHAR *path, struct yaffs_stat *buf,int doLStat)
{
static int yaffsfs_DoStatOrLStat(const YCHAR *path, struct yaffs_stat *buf,int doLStat)
{
- struct yaffs_obj *obj;
+ struct yaffs_obj *obj=NULL;
+ struct yaffs_obj *dir=NULL;
int retVal = -1;
yaffsfs_Lock();
int retVal = -1;
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
,&dir
);
if(!doLStat && obj)
obj = yaffsfs_FollowLink(obj,0);
if(!doLStat && obj)
obj = yaffsfs_FollowLink(obj,0);
- if(obj)
- retVal = yaffsfs_DoStat(obj,buf);
- else
- /* todo error not found */
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
yaffsfs_SetError(-ENOENT);
yaffsfs_SetError(-ENOENT);
+ else
+ retVal = yaffsfs_DoStat(obj,buf);
yaffsfs_Unlock();
yaffsfs_Unlock();
@@
-1343,25
+1359,28
@@
int yaffs_fstat(int fd, struct yaffs_stat *buf)
static int yaffs_do_setxattr(const YCHAR *path, const char *name, const void *data, int size, int flags, int follow)
{
struct yaffs_obj *obj;
static int yaffs_do_setxattr(const YCHAR *path, const char *name, const void *data, int size, int flags, int follow)
{
struct yaffs_obj *obj;
+ struct yaffs_obj *dir;
int retVal = -1;
yaffsfs_Lock();
int retVal = -1;
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
,&dir
);
if(follow)
obj = yaffsfs_FollowLink(obj,0);
if(follow)
obj = yaffsfs_FollowLink(obj,0);
- if(obj) {
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
+ yaffsfs_SetError(-ENOENT);
+ else {
retVal = yaffs_set_xattrib(obj,name,data,size,flags);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
retVal = yaffs_set_xattrib(obj,name,data,size,flags);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
- } else
- /* todo error not found */
- yaffsfs_SetError(-ENOENT);
+ }
yaffsfs_Unlock();
yaffsfs_Unlock();
@@
-1390,15
+1409,15
@@
int yaffs_fsetxattr(int fd, const char *name, const void *data, int size, int fl
yaffsfs_Lock();
obj = yaffsfs_GetHandleObject(fd);
yaffsfs_Lock();
obj = yaffsfs_GetHandleObject(fd);
- if(obj) {
+ if(!obj)
+ yaffsfs_SetError(-EBADF);
+ else {
retVal = yaffs_set_xattrib(obj,name,data,size,flags);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
retVal = yaffs_set_xattrib(obj,name,data,size,flags);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
- } else
- /* bad handle */
- yaffsfs_SetError(-EBADF);
+ }
yaffsfs_Unlock();
yaffsfs_Unlock();
@@
-1408,26
+1427,28
@@
int yaffs_fsetxattr(int fd, const char *name, const void *data, int size, int fl
static int yaffs_do_getxattr(const YCHAR *path, const char *name, void *data, int size, int follow)
{
struct yaffs_obj *obj;
static int yaffs_do_getxattr(const YCHAR *path, const char *name, void *data, int size, int follow)
{
struct yaffs_obj *obj;
+ struct yaffs_obj *dir;
int retVal = -1;
yaffsfs_Lock();
int retVal = -1;
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
,&dir
);
if(follow)
obj = yaffsfs_FollowLink(obj,0);
if(follow)
obj = yaffsfs_FollowLink(obj,0);
- if(obj) {
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
+ yaffsfs_SetError(-ENOENT);
+ else {
retVal = yaffs_get_xattrib(obj,name,data,size);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
retVal = yaffs_get_xattrib(obj,name,data,size);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
- } else
- /* todo error not found */
- yaffsfs_SetError(-ENOENT);
-
+ }
yaffsfs_Unlock();
return retVal;
yaffsfs_Unlock();
return retVal;
@@
-1471,26
+1492,29
@@
int yaffs_fgetxattr(int fd, const char *name, void *data, int size)
static int yaffs_do_listxattr(const YCHAR *path, char *data, int size, int follow)
{
static int yaffs_do_listxattr(const YCHAR *path, char *data, int size, int follow)
{
- struct yaffs_obj *obj;
+ struct yaffs_obj *obj=NULL;
+ struct yaffs_obj *dir=NULL;
int retVal = -1;
yaffsfs_Lock();
int retVal = -1;
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
,&dir
);
if(follow)
obj = yaffsfs_FollowLink(obj,0);
if(follow)
obj = yaffsfs_FollowLink(obj,0);
- if(obj) {
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
+ yaffsfs_SetError(-ENOENT);
+ else {
retVal = yaffs_list_xattrib(obj, data,size);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
retVal = yaffs_list_xattrib(obj, data,size);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
- } else
- /* todo error not found */
- yaffsfs_SetError(-ENOENT);
+ }
yaffsfs_Unlock();
yaffsfs_Unlock();
@@
-1534,26
+1558,29
@@
int yaffs_flistxattr(int fd, char *data, int size)
static int yaffs_do_removexattr(const YCHAR *path, const char *name, int follow)
{
static int yaffs_do_removexattr(const YCHAR *path, const char *name, int follow)
{
- struct yaffs_obj *obj;
+ struct yaffs_obj *obj=NULL;
+ struct yaffs_obj *dir=NULL;
int retVal = -1;
yaffsfs_Lock();
int retVal = -1;
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
, &dir
);
if(follow)
obj = yaffsfs_FollowLink(obj,0);
if(follow)
obj = yaffsfs_FollowLink(obj,0);
- if(obj) {
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
+ yaffsfs_SetError(-ENOENT);
+ else {
retVal = yaffs_remove_xattrib(obj,name);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
retVal = yaffs_remove_xattrib(obj,name);
if(retVal< 0){
yaffsfs_SetError(retVal);
retVal = -1;
}
- } else
- /* todo error not found */
- yaffsfs_SetError(-ENOENT);
+ }
yaffsfs_Unlock();
yaffsfs_Unlock();
@@
-1694,9
+1721,10
@@
static int yaffsfs_DoChMod(struct yaffs_obj *obj,mode_t mode)
int yaffs_access(const YCHAR *path, int amode)
{
int yaffs_access(const YCHAR *path, int amode)
{
- struct yaffs_obj *obj;
+ struct yaffs_obj *obj=NULL;
+ struct yaffs_obj *dir=NULL;
- int retval =
0
;
+ int retval =
-1
;
if(amode & ~(R_OK | W_OK | X_OK)){
yaffsfs_SetError(-EINVAL);
if(amode & ~(R_OK | W_OK | X_OK)){
yaffsfs_SetError(-EINVAL);
@@
-1705,9
+1733,13
@@
int yaffs_access(const YCHAR *path, int amode)
yaffsfs_Lock();
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
, &dir
);
- if(obj) {
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
+ yaffsfs_SetError(-ENOENT);
+ else {
int access_ok = 1;
if((amode & R_OK) && !(obj->yst_mode & S_IREAD))
int access_ok = 1;
if((amode & R_OK) && !(obj->yst_mode & S_IREAD))
@@
-1717,14
+1749,10
@@
int yaffs_access(const YCHAR *path, int amode)
if((amode & X_OK) && !(obj->yst_mode & S_IEXEC))
access_ok = 0;
if((amode & X_OK) && !(obj->yst_mode & S_IEXEC))
access_ok = 0;
- if(!access_ok)
{
+ if(!access_ok)
yaffsfs_SetError(-EACCES);
yaffsfs_SetError(-EACCES);
- retval = -1;
- }
- } else {
- /* todo error not found */
- yaffsfs_SetError(-ENOENT);
- retval = -1;
+ else
+ retval = 0;
}
yaffsfs_Unlock();
}
yaffsfs_Unlock();
@@
-1736,18
+1764,25
@@
int yaffs_access(const YCHAR *path, int amode)
int yaffs_chmod(const YCHAR *path, mode_t mode)
{
int yaffs_chmod(const YCHAR *path, mode_t mode)
{
- struct yaffs_obj *obj;
-
+ struct yaffs_obj *obj
=NULL
;
+ struct yaffs_obj *dir=NULL;
int retVal = -1;
int retVal = -1;
+ if(mode & ~(0777)){
+ yaffsfs_SetError(-EINVAL);
+ return -1;
+ }
+
yaffsfs_Lock();
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
, &dir
);
- if(!obj)
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
yaffsfs_SetError(-ENOENT);
else if(obj->my_dev->read_only)
yaffsfs_SetError(-ENOENT);
else if(obj->my_dev->read_only)
- yaffsfs_SetError(-E
INVAL
);
+ yaffsfs_SetError(-E
ROFS
);
else
retVal = yaffsfs_DoChMod(obj,mode);
else
retVal = yaffsfs_DoChMod(obj,mode);
@@
-1761,16
+1796,20
@@
int yaffs_chmod(const YCHAR *path, mode_t mode)
int yaffs_fchmod(int fd, mode_t mode)
{
struct yaffs_obj *obj;
int yaffs_fchmod(int fd, mode_t mode)
{
struct yaffs_obj *obj;
-
int retVal = -1;
int retVal = -1;
+ if(mode & ~(0777)){
+ yaffsfs_SetError(-EINVAL);
+ return -1;
+ }
+
yaffsfs_Lock();
obj = yaffsfs_GetHandleObject(fd);
if(!obj)
yaffsfs_Lock();
obj = yaffsfs_GetHandleObject(fd);
if(!obj)
- yaffsfs_SetError(-E
NOENT
);
+ yaffsfs_SetError(-E
BADF
);
else if(obj->my_dev->read_only)
else if(obj->my_dev->read_only)
- yaffsfs_SetError(-E
INVAL
);
+ yaffsfs_SetError(-E
ROFS
);
else
retVal = yaffsfs_DoChMod(obj,mode);
else
retVal = yaffsfs_DoChMod(obj,mode);
@@
-2194,7
+2233,7
@@
yaffs_DIR *yaffs_opendir(const YCHAR *dirname)
yaffsfs_Lock();
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,dirname,0,1);
+ obj = yaffsfs_FindObject(NULL,dirname,0,1
,NULL
);
if(obj && obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY){
if(obj && obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY){
@@
-2317,19
+2356,20
@@
int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath)
int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz)
{
struct yaffs_obj *obj = NULL;
int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz)
{
struct yaffs_obj *obj = NULL;
- int retVal;
+ struct yaffs_obj *dir = NULL;
+ int retVal= -1;
yaffsfs_Lock();
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
, &dir
);
- if(!obj) {
+ if(!dir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(!obj)
yaffsfs_SetError(-ENOENT);
yaffsfs_SetError(-ENOENT);
- retVal = -1;
- } else if(obj->variant_type != YAFFS_OBJECT_TYPE_SYMLINK) {
+ else if(obj->variant_type != YAFFS_OBJECT_TYPE_SYMLINK)
yaffsfs_SetError(-EINVAL);
yaffsfs_SetError(-EINVAL);
- retVal = -1;
- } else {
+ else {
YCHAR *alias = obj->variant.symlink_variant.alias;
memset(buf,0,bufsiz);
yaffs_strncpy(buf,alias,bufsiz - 1);
YCHAR *alias = obj->variant.symlink_variant.alias;
memset(buf,0,bufsiz);
yaffs_strncpy(buf,alias,bufsiz - 1);
@@
-2339,42
+2379,36
@@
int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz)
return retVal;
}
return retVal;
}
-int yaffs_link(const YCHAR *oldpath, const YCHAR *
new
path)
+int yaffs_link(const YCHAR *oldpath, const YCHAR *
link
path)
{
/* Creates a link called newpath to existing oldpath */
struct yaffs_obj *obj = NULL;
{
/* Creates a link called newpath to existing oldpath */
struct yaffs_obj *obj = NULL;
- struct yaffs_obj *
target
= NULL;
- int retVal =
0
;
+ struct yaffs_obj *
lnk
= NULL;
+ int retVal =
-1
;
yaffsfs_Lock();
yaffsfs_Lock();
- obj = yaffsfs_FindObject(NULL,oldpath,0,1);
-
target = yaffsfs_FindObject(NULL,newpath,0,0
);
+ obj = yaffsfs_FindObject(NULL,oldpath,0,1
,NULL
);
+
lnk = yaffsfs_FindObject(NULL,linkpath,0,0,NULL
);
- if(!obj)
{
+ if(!obj)
yaffsfs_SetError(-ENOENT);
yaffsfs_SetError(-ENOENT);
- retVal = -1;
- } else if(obj->my_dev->read_only){
+ else if(obj->my_dev->read_only)
yaffsfs_SetError(-EINVAL);
yaffsfs_SetError(-EINVAL);
- retVal= -1;
- } else if(target) {
+ else if(lnk)
yaffsfs_SetError(-EEXIST);
yaffsfs_SetError(-EEXIST);
- retVal = -1;
- } else {
+ else {
struct yaffs_obj *newdir = NULL;
struct yaffs_obj *link = NULL;
YCHAR *newname;
struct yaffs_obj *newdir = NULL;
struct yaffs_obj *link = NULL;
YCHAR *newname;
- newdir = yaffsfs_FindDirectory(NULL,
new
path,&newname,0);
+ newdir = yaffsfs_FindDirectory(NULL,
link
path,&newname,0);
- if(!newdir)
{
+ if(!newdir)
yaffsfs_SetError(-ENOTDIR);
yaffsfs_SetError(-ENOTDIR);
- retVal = -1;
- }else if(newdir->my_dev != obj->my_dev){
+ else if(newdir->my_dev != obj->my_dev)
yaffsfs_SetError(-EXDEV);
yaffsfs_SetError(-EXDEV);
- retVal = -1;
- }
retVal = yaffsfs_CheckNameLength(newname);
retVal = yaffsfs_CheckNameLength(newname);
@@
-2412,7
+2446,7
@@
int yaffs_n_handles(const YCHAR *path)
{
struct yaffs_obj *obj;
{
struct yaffs_obj *obj;
- obj = yaffsfs_FindObject(NULL,path,0,1);
+ obj = yaffsfs_FindObject(NULL,path,0,1
,NULL
);
return yaffsfs_CountHandles(obj);
}
return yaffsfs_CountHandles(obj);
}