mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
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:
parent
560ca526bd
commit
061d60b82f
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user