/* 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, struct yaffs_obj **dirOut, int *notDir, int *loop)
/* 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, struct yaffs_obj **dirOut, int *notDir, int *loop)
{
	struct yaffs_obj *dir;
	struct yaffs_obj *obj;
	YCHAR *name;
	dir =
	    yaffsfs_FindDirectory(relDir, path, &name, symDepth, notDir, loop);
	if (dirOut)
		*dirOut = dir;
	if (dir && *name)
		obj = yaffs_find_by_name(dir, name);
	else
		obj = dir;
	if (getEquiv)
		obj = yaffs_get_equivalent_obj(obj);
	return obj;
}