fix enum_t and strrchr issue according to superyongzhe patch.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@883 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
82d4e49881
commit
767c64e69c
|
@ -308,7 +308,7 @@ int nfs_create(struct nfs_filesystem* nfs, const char *name, mode_t mode)
|
|||
return -1;
|
||||
}
|
||||
args.where.dir=*handle;
|
||||
args.where.name=strrchr(name, '/');
|
||||
args.where.name=strrchr(name, '/') + 1;
|
||||
if(args.where.name==RT_NULL)
|
||||
{
|
||||
args.where.name=(char *)name;
|
||||
|
@ -356,7 +356,7 @@ int nfs_mkdir(struct nfs_filesystem* nfs, const char *name, mode_t mode)
|
|||
return -1;
|
||||
|
||||
args.where.dir=*handle;
|
||||
args.where.name=strrchr(name, '/');
|
||||
args.where.name=strrchr(name, '/') + 1;
|
||||
if(args.where.name==RT_NULL)
|
||||
{
|
||||
args.where.name=(char *)name;
|
||||
|
@ -864,7 +864,7 @@ int nfs_unlink(struct dfs_filesystem* fs, const char* path)
|
|||
if(handle == RT_NULL) return -1;
|
||||
|
||||
args.object.dir=*handle;
|
||||
args.object.name=strrchr(path, '/');
|
||||
args.object.name=strrchr(path, '/') + 1;
|
||||
if(args.object.name==RT_NULL)
|
||||
{
|
||||
args.object.name=(char *)path;
|
||||
|
@ -896,7 +896,7 @@ int nfs_unlink(struct dfs_filesystem* fs, const char* path)
|
|||
if(handle==RT_NULL) return -1;
|
||||
|
||||
args.object.dir=*handle;
|
||||
args.object.name=strrchr(path, '/');
|
||||
args.object.name=strrchr(path, '/') + 1;
|
||||
if(args.object.name==RT_NULL)
|
||||
{
|
||||
args.object.name=(char *)path;
|
||||
|
@ -947,12 +947,12 @@ int nfs_rename(struct dfs_filesystem* fs, const char *src, const char *dest)
|
|||
return -1;
|
||||
|
||||
args.from.dir=*sHandle;
|
||||
args.from.name=strrchr(src, '/');
|
||||
args.from.name=strrchr(src, '/') + 1;
|
||||
if(args.from.name==RT_NULL)
|
||||
args.from.name=(char *)src;
|
||||
|
||||
args.to.dir=*dHandle;
|
||||
args.to.name=strrchr(src, '/');
|
||||
args.to.name=strrchr(src, '/') + 1;
|
||||
if(args.to.name==RT_NULL)
|
||||
args.to.name=(char *)dest;
|
||||
|
||||
|
|
|
@ -117,7 +117,6 @@ xdr_mountstat3(register XDR *xdrs, mountstat3 *objp)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
*objp = enum_objp;
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,6 @@ xdr_nfsstat3(register XDR *xdrs, nfsstat3 *objp)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
*objp = enum_objp;
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
@ -170,7 +169,6 @@ xdr_ftype3(register XDR *xdrs, ftype3 *objp)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
*objp = enum_objp;
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
@ -185,7 +183,6 @@ xdr_stable_how(register XDR *xdrs, stable_how *objp)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
*objp = enum_objp;
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
@ -200,7 +197,6 @@ xdr_createmode3(register XDR *xdrs, createmode3 *objp)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
*objp = enum_objp;
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
@ -351,7 +347,6 @@ xdr_time_how(register XDR *xdrs, time_how *objp)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
*objp = enum_objp;
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
|
|
@ -359,10 +359,6 @@ bool_t xdr_enum(xdrs, ep)
|
|||
XDR *xdrs;
|
||||
enum_t *ep;
|
||||
{
|
||||
long lp;
|
||||
|
||||
lp = *ep;
|
||||
|
||||
/*
|
||||
* enums are treated as ints
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue