Modify VFS APIs.

* vfs_s_stat: make public.
  * vfs_s_lstat: likewise.
  * vfs_s_fstat: likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2017-01-02 11:58:49 +03:00
parent 560ca526bd
commit 061d60b82f
2 changed files with 28 additions and 25 deletions

View File

@ -496,31 +496,6 @@ vfs_s_internal_stat (const vfs_path_t * vpath, struct stat *buf, int flag)
/* --------------------------------------------------------------------------------------------- */
static int
vfs_s_stat (const vfs_path_t * vpath, struct stat *buf)
{
return vfs_s_internal_stat (vpath, buf, FL_FOLLOW);
}
/* --------------------------------------------------------------------------------------------- */
static int
vfs_s_lstat (const vfs_path_t * vpath, struct stat *buf)
{
return vfs_s_internal_stat (vpath, buf, FL_NONE);
}
/* --------------------------------------------------------------------------------------------- */
static int
vfs_s_fstat (void *fh, struct stat *buf)
{
*buf = FH->ino->st;
return 0;
}
/* --------------------------------------------------------------------------------------------- */
static int
vfs_s_readlink (const vfs_path_t * vpath, char *buf, size_t size)
{
@ -1327,6 +1302,31 @@ vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode)
/* --------------------------------------------------------------------------------------------- */
int
vfs_s_stat (const vfs_path_t * vpath, struct stat *buf)
{
return vfs_s_internal_stat (vpath, buf, FL_FOLLOW);
}
/* --------------------------------------------------------------------------------------------- */
int
vfs_s_lstat (const vfs_path_t * vpath, struct stat *buf)
{
return vfs_s_internal_stat (vpath, buf, FL_NONE);
}
/* --------------------------------------------------------------------------------------------- */
int
vfs_s_fstat (void *fh, struct stat *buf)
{
*buf = FH->ino->st;
return 0;
}
/* --------------------------------------------------------------------------------------------- */
int
vfs_s_retrieve_file (struct vfs_class *me, struct vfs_s_inode *ino)
{

View File

@ -226,6 +226,9 @@ extern int use_netrc;
/* lib/vfs/direntry.c: */
void *vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode);
int vfs_s_stat (const vfs_path_t * vpath, struct stat *buf);
int vfs_s_lstat (const vfs_path_t * vpath, struct stat *buf);
int vfs_s_fstat (void *fh, struct stat *buf);
vfsid vfs_getid (const vfs_path_t * vpath);