Lines Matching defs:path

34 					    const YCHAR *path,
439 static int yaffsfs_alt_dir_path(const YCHAR *path, YCHAR **ret_path)
446 * We don't have a definition for max path length.
450 path_length = yaffs_strnlen(path, (YAFFS_MAX_NAME_LENGTH + 1) * 3 + 1);
452 /* If the last character is a path divider, then we need to
455 * Curveball: Need to handle multiple path dividers:
458 if (path_length > 0 && yaffsfs_IsPathDivider(path[path_length - 1])) {
462 yaffs_strcpy(alt_path, path);
480 static struct yaffs_dev *yaffsfs_FindDevice(const YCHAR *path,
499 leftOver = path;
550 static int yaffsfs_CheckPath(const YCHAR *path)
555 while (*path && n < YAFFS_MAX_NAME_LENGTH && divs < 100) {
556 if (yaffsfs_IsPathDivider(*path)) {
561 path++;
564 return (*path) ? -1 : 0;
567 /* FindMountPoint only returns a dev entry if the path is a mount point */
568 static struct yaffs_dev *yaffsfs_FindMountPoint(const YCHAR *path)
573 dev = yaffsfs_FindDevice(path, &restOfPath);
579 static struct yaffs_obj *yaffsfs_FindRoot(const YCHAR *path,
584 dev = yaffsfs_FindDevice(path, restOfPath);
618 * Parse a path to determine the directory and the name within the directory.
623 const YCHAR *path,
640 restOfPath = (YCHAR *) path;
642 dir = yaffsfs_FindRoot(path, &restOfPath);
693 const YCHAR *path,
698 return yaffsfs_DoFindDirectory(relDir, path, name, symDepth, notDir,
703 * yaffsfs_FindObject turns a path for an existing object into the object
706 const YCHAR *path, int symDepth,
716 yaffsfs_FindDirectory(relDir, path, &name, symDepth, notDir, loop);
774 int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
796 if (!path) {
801 if (yaffsfs_CheckPath(path) < 0) {
833 obj = yaffsfs_FindObject(NULL, path, 0, 1, NULL, NULL, NULL);
924 dir = yaffsfs_FindDirectory(NULL, path, &name, 0,
997 int yaffs_open(const YCHAR *path, int oflag, int mode)
999 return yaffs_open_sharing(path, oflag, mode,
1305 int yaffs_truncate(const YCHAR *path, loff_t new_size)
1313 if (!path) {
1318 if (yaffsfs_CheckPath(path) < 0) {
1325 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
1419 int yaffsfs_DoUnlink(const YCHAR *path, int isDirectory)
1428 if (!path) {
1433 if (yaffsfs_CheckPath(path) < 0) {
1440 obj = yaffsfs_FindObject(NULL, path, 0, 0, NULL, NULL, NULL);
1441 dir = yaffsfs_FindDirectory(NULL, path, &name, 0, &notDir, &loop);
1475 int yaffs_unlink(const YCHAR *path)
1477 return yaffsfs_DoUnlink(path, 0);
1524 * path ended with a "/" then the olddir == obj.
1627 static int yaffsfs_DoStatOrLStat(const YCHAR *path,
1636 if (!path || !buf) {
1641 if (yaffsfs_CheckPath(path) < 0) {
1648 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
1668 int yaffs_stat(const YCHAR *path, struct yaffs_stat *buf)
1670 return yaffsfs_DoStatOrLStat(path, buf, 0);
1673 int yaffs_lstat(const YCHAR *path, struct yaffs_stat *buf)
1675 return yaffsfs_DoStatOrLStat(path, buf, 1);
1735 int yaffs_utime(const YCHAR *path, const struct yaffs_utimbuf *buf)
1743 if (!path) {
1748 if (yaffsfs_CheckPath(path) < 0) {
1755 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
1795 static int yaffs_do_setxattr(const YCHAR *path, const char *name,
1805 if (!path || !name || !data) {
1810 if (yaffsfs_CheckPath(path) < 0) {
1817 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
1842 int yaffs_setxattr(const YCHAR *path, const char *name,
1845 return yaffs_do_setxattr(path, name, data, size, flags, 1);
1848 int yaffs_lsetxattr(const YCHAR *path, const char *name,
1851 return yaffs_do_setxattr(path, name, data, size, flags, 0);
1884 static int yaffs_do_getxattr(const YCHAR *path, const char *name,
1893 if (!path || !name || !data) {
1898 if (yaffsfs_CheckPath(path) < 0) {
1905 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
1929 int yaffs_getxattr(const YCHAR *path, const char *name, void *data, int size)
1931 return yaffs_do_getxattr(path, name, data, size, 1);
1934 int yaffs_lgetxattr(const YCHAR *path, const char *name, void *data, int size)
1936 return yaffs_do_getxattr(path, name, data, size, 0);
1968 static int yaffs_do_listxattr(const YCHAR *path, char *data,
1977 if (!path || !data) {
1982 if (yaffsfs_CheckPath(path) < 0) {
1989 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
2014 int yaffs_listxattr(const YCHAR *path, char *data, int size)
2016 return yaffs_do_listxattr(path, data, size, 1);
2019 int yaffs_llistxattr(const YCHAR *path, char *data, int size)
2021 return yaffs_do_listxattr(path, data, size, 0);
2053 static int yaffs_do_removexattr(const YCHAR *path, const char *name,
2062 if (!path || !name) {
2067 if (yaffsfs_CheckPath(path) < 0) {
2074 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
2099 int yaffs_removexattr(const YCHAR *path, const char *name)
2101 return yaffs_do_removexattr(path, name, 1);
2104 int yaffs_lremovexattr(const YCHAR *path, const char *name)
2106 return yaffs_do_removexattr(path, name, 0);
2231 int yaffs_access(const YCHAR *path, int amode)
2239 if (!path) {
2244 if (yaffsfs_CheckPath(path) < 0) {
2256 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
2289 int yaffs_chmod(const YCHAR *path, mode_t mode)
2297 if (!path) {
2302 if (yaffsfs_CheckPath(path) < 0) {
2314 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
2359 int yaffs_mkdir(const YCHAR *path, mode_t mode)
2369 if (!path) {
2374 if (yaffsfs_CheckPath(path) < 0) {
2379 if (yaffsfs_alt_dir_path(path, &alt_path) < 0) {
2384 path = alt_path;
2387 parent = yaffsfs_FindDirectory(NULL, path, &name, 0, &notDir, &loop);
2418 int yaffs_rmdir(const YCHAR *path)
2423 if (!path) {
2428 if (yaffsfs_CheckPath(path) < 0) {
2433 if (yaffsfs_alt_dir_path(path, &alt_path) < 0) {
2438 path = alt_path;
2439 result = yaffsfs_DoUnlink(path, 1);
2446 void *yaffs_getdev(const YCHAR *path)
2450 dev = yaffsfs_FindDevice(path, &dummy);
2454 int yaffs_mount_common(const YCHAR *path, int read_only, int skip_checkpt)
2460 if (!path) {
2465 yaffs_trace(YAFFS_TRACE_MOUNT, "yaffs: Mounting %s", path);
2467 if (yaffsfs_CheckPath(path) < 0) {
2476 dev = yaffsfs_FindMountPoint(path);
2503 int yaffs_mount2(const YCHAR *path, int readonly)
2505 return yaffs_mount_common(path, readonly, 0);
2508 int yaffs_mount(const YCHAR *path)
2510 return yaffs_mount_common(path, 0, 0);
2513 int yaffs_sync(const YCHAR *path)
2519 if (!path) {
2524 if (yaffsfs_CheckPath(path) < 0) {
2530 dev = yaffsfs_FindDevice(path, &dummy);
2563 int yaffs_remount(const YCHAR *path, int force, int read_only)
2568 if (!path) {
2573 if (yaffsfs_CheckPath(path) < 0) {
2579 dev = yaffsfs_FindMountPoint(path);
2603 int yaffs_unmount2(const YCHAR *path, int force)
2608 if (!path) {
2613 if (yaffsfs_CheckPath(path) < 0) {
2619 dev = yaffsfs_FindMountPoint(path);
2646 int yaffs_unmount(const YCHAR *path)
2648 return yaffs_unmount2(path, 0);
2651 loff_t yaffs_freespace(const YCHAR *path)
2657 if (!path) {
2662 if (yaffsfs_CheckPath(path) < 0) {
2668 dev = yaffsfs_FindDevice(path, &dummy);
2680 loff_t yaffs_totalspace(const YCHAR *path)
2686 if (!path) {
2691 if (yaffsfs_CheckPath(path) < 0) {
2697 dev = yaffsfs_FindDevice(path, &dummy);
2711 int yaffs_inodecount(const YCHAR *path)
2717 if (!path) {
2722 if (yaffsfs_CheckPath(path) < 0) {
2728 dev = yaffsfs_FindDevice(path, &dummy);
3036 int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz)
3044 if (!path || !buf) {
3051 obj = yaffsfs_FindObject(NULL, path, 0, 1, &dir, &notDir, &loop);
3149 int yaffs_n_handles(const YCHAR *path)
3153 if (!path) {
3158 if (yaffsfs_CheckPath(path) < 0) {
3163 obj = yaffsfs_FindObject(NULL, path, 0, 1, NULL, NULL, NULL);
3182 int yaffs_dump_dev(const YCHAR *path)
3187 struct yaffs_obj *obj = yaffsfs_FindRoot(path, &rest);