fs: Rename link to symlink
since the current implementation is really a symoblic link not hard link Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I59d30d0a620b0b5714fe91bbe90d4405cf53d187
This commit is contained in:
parent
028d0c0d15
commit
651eefc8f7
|
@ -51,7 +51,7 @@ endif
|
|||
CSRCS += fs_pread.c fs_pwrite.c
|
||||
|
||||
ifneq ($(CONFIG_PSEUDOFS_SOFTLINKS),0)
|
||||
CSRCS += fs_link.c fs_readlink.c
|
||||
CSRCS += fs_symlink.c fs_readlink.c
|
||||
endif
|
||||
|
||||
# Stream support
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* fs/vfs/fs_link.c
|
||||
* fs/vfs/fs_symlink.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -47,10 +47,10 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: link
|
||||
* Name: symlink
|
||||
*
|
||||
* Description:
|
||||
* The link() function will create a new link (directory entry) for the
|
||||
* The symlink() function will create a new link (directory entry) for the
|
||||
* existing file, path2. This implementation is simplied for use with
|
||||
* NuttX in these ways:
|
||||
*
|
||||
|
@ -72,7 +72,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int link(FAR const char *path1, FAR const char *path2)
|
||||
int symlink(FAR const char *path1, FAR const char *path2)
|
||||
{
|
||||
struct inode_search_s desc;
|
||||
FAR struct inode *inode = NULL;
|
|
@ -246,7 +246,7 @@ SYSCALL_LOOKUP(telldir, 1)
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_PSEUDOFS_SOFTLINKS)
|
||||
SYSCALL_LOOKUP(link, 2)
|
||||
SYSCALL_LOOKUP(symlink, 2)
|
||||
SYSCALL_LOOKUP(readlink, 3)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@
|
|||
|
||||
/* Helpers and legacy compatibility definitions */
|
||||
|
||||
#define symlink(p1, p2) link((p1), (p2))
|
||||
#define link(p1, p2) symlink((p1), (p2))
|
||||
#define fdatasync(f) fsync(f)
|
||||
#define getdtablesize(f) ((int)sysconf(_SC_OPEN_MAX))
|
||||
|
||||
|
@ -359,7 +359,7 @@ int unlink(FAR const char *pathname);
|
|||
int truncate(FAR const char *path, off_t length);
|
||||
|
||||
#ifdef CONFIG_PSEUDOFS_SOFTLINKS
|
||||
int link(FAR const char *path1, FAR const char *path2);
|
||||
int symlink(FAR const char *path1, FAR const char *path2);
|
||||
ssize_t readlink(FAR const char *path, FAR char *buf, size_t bufsize);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"insmod","nuttx/module.h","defined(CONFIG_MODULE)","FAR void *","FAR const char *","FAR const char *"
|
||||
"ioctl","sys/ioctl.h","","int","int","int","...","unsigned long"
|
||||
"kill","signal.h","","int","pid_t","int"
|
||||
"link","unistd.h","defined(CONFIG_PSEUDOFS_SOFTLINKS)","int","FAR const char *","FAR const char *"
|
||||
"symlink","unistd.h","defined(CONFIG_PSEUDOFS_SOFTLINKS)","int","FAR const char *","FAR const char *"
|
||||
"listen","sys/socket.h","defined(CONFIG_NET)","int","int","int"
|
||||
"lseek","unistd.h","","off_t","int","off_t","int"
|
||||
"lstat","sys/stat.h","","int","FAR const char *","FAR struct stat *"
|
||||
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
Loading…
Reference in New Issue