247 char *fullpath = NULL;
249#ifdef VFS_USING_WORKDIR
252 BOOL dir_flags = (directory == NULL) ? TRUE : FALSE;
260#ifdef VFS_USING_WORKDIR
261 if (directory == NULL)
267 if ((directory == NULL) && (filename[0] !=
'/')) {
268 PRINT_ERR(
"NO_WORKING_DIR\n");
276 if ((filename[0] !=
'/') && (strlen(directory) + namelen + 2 > TEMP_PATH_MAX)) {
277#ifdef VFS_USING_WORKDIR
278 if (dir_flags == TRUE)
283 return -ENAMETOOLONG;
287#ifdef VFS_USING_WORKDIR
288 if (dir_flags == TRUE)
293 if (fullpath == NULL) {
299 if (strlen(fullpath) >= PATH_MAX) {
302 return -ENAMETOOLONG;
305 *pathname = fullpath;
static char * vfs_normalize_fullpath(const char *directory, const char *filename, char **pathname, int namelen)
static char * str_path(char *path)
static char * str_normalize_path(char *fullpath)
static int vfs_normalize_path_parame_check(const char *filename, char **pathname)
STATIC INLINE LosProcessCB * OsCurrProcessGet(VOID)
struct files_struct * files
spinlock_t workdir_lock
工作区目录自旋锁
char workdir[PATH_MAX]
工作区路径,最大 256个字符
ARG_NUM_3 ARG_NUM_1 ARG_NUM_2 ARG_NUM_2 ARG_NUM_3 ARG_NUM_1 ARG_NUM_4 ARG_NUM_2 ARG_NUM_2 ARG_NUM_5 ARG_NUM_2 void