mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-10 21:42:00 +03:00
* vfs.c: Remove unused code.
* vfs.h: Define vfs_uid and vfs_gid as 0, they never change.
This commit is contained in:
parent
316993bf83
commit
3f40a2b274
@ -1,3 +1,8 @@
|
|||||||
|
2002-11-03 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* vfs.c: Remove unused code.
|
||||||
|
* vfs.h: Define vfs_uid and vfs_gid as 0, they never change.
|
||||||
|
|
||||||
2002-11-01 Andrew V. Samoilov <sav@bcs.zp.ua>
|
2002-11-01 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||||
|
|
||||||
* fish.c: Use name_quote() to quote filenames.
|
* fish.c: Use name_quote() to quote filenames.
|
||||||
|
62
vfs/vfs.c
62
vfs/vfs.c
@ -60,7 +60,7 @@
|
|||||||
extern int get_other_type (void);
|
extern int get_other_type (void);
|
||||||
|
|
||||||
int vfs_timeout = 60; /* VFS timeout in seconds */
|
int vfs_timeout = 60; /* VFS timeout in seconds */
|
||||||
int vfs_flags = 0; /* Flags */
|
static int vfs_flags = 0; /* Flags */
|
||||||
|
|
||||||
extern int cd_symlinks; /* Defined in main.c */
|
extern int cd_symlinks; /* Defined in main.c */
|
||||||
|
|
||||||
@ -75,9 +75,6 @@ static int current_mday;
|
|||||||
static int current_mon;
|
static int current_mon;
|
||||||
static int current_year;
|
static int current_year;
|
||||||
|
|
||||||
uid_t vfs_uid = 0;
|
|
||||||
gid_t vfs_gid = 0;
|
|
||||||
|
|
||||||
/* FIXME: Open files managed by the vfs layer, should be dynamical */
|
/* FIXME: Open files managed by the vfs layer, should be dynamical */
|
||||||
#define MAX_VFS_FILES 100
|
#define MAX_VFS_FILES 100
|
||||||
|
|
||||||
@ -290,7 +287,7 @@ vfs_timeouts ()
|
|||||||
return stamps ? 10 : 0;
|
return stamps ? 10 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
vfs_addstamp (vfs *v, vfsid id, struct vfs_stamping *parent)
|
vfs_addstamp (vfs *v, vfsid id, struct vfs_stamping *parent)
|
||||||
{
|
{
|
||||||
if (v != &vfs_local_ops && id != (vfsid)-1){
|
if (v != &vfs_local_ops && id != (vfsid)-1){
|
||||||
@ -932,27 +929,6 @@ vfs_current_is_local (void)
|
|||||||
return current_vfs == &vfs_local_ops;
|
return current_vfs == &vfs_local_ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* External world should not do differences between VFS-s */
|
|
||||||
int
|
|
||||||
vfs_current_is_extfs (void)
|
|
||||||
{
|
|
||||||
return current_vfs == &vfs_extfs_ops;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
vfs_current_is_tarfs (void)
|
|
||||||
{
|
|
||||||
return current_vfs == &vfs_tarfs_ops;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
vfs_current_is_cpiofs (void)
|
|
||||||
{
|
|
||||||
return current_vfs == &vfs_cpiofs_ops;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
vfs_file_is_local (const char *file)
|
vfs_file_is_local (const char *file)
|
||||||
{
|
{
|
||||||
@ -1279,35 +1255,6 @@ vfs_init (void)
|
|||||||
vfs_setup_wd ();
|
vfs_setup_wd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
vfs_free_resources (char *path)
|
|
||||||
{
|
|
||||||
vfs *vfs;
|
|
||||||
vfsid vid;
|
|
||||||
struct vfs_stamping *parent;
|
|
||||||
|
|
||||||
vfs = vfs_type (path);
|
|
||||||
vid = vfs_ncs_getid (vfs, path, &parent);
|
|
||||||
if (vid != (vfsid) -1)
|
|
||||||
(*vfs->free)(vid);
|
|
||||||
vfs_rm_parents (parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Shutdown a vfs given a path name */
|
|
||||||
void
|
|
||||||
vfs_shut_path (char *p)
|
|
||||||
{
|
|
||||||
vfs *the_vfs;
|
|
||||||
struct vfs_stamping *par;
|
|
||||||
|
|
||||||
the_vfs = vfs_type (p);
|
|
||||||
vfs_ncs_getid (the_vfs, p, &par);
|
|
||||||
(*par->v->free)(par->id);
|
|
||||||
vfs_rm_parents (par);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
vfs_shut (void)
|
vfs_shut (void)
|
||||||
{
|
{
|
||||||
@ -1782,11 +1729,6 @@ vfs_parse_ls_lga (const char *p, struct stat *s, char **filename, char **linknam
|
|||||||
goto error;
|
goto error;
|
||||||
/* Use resulting time value */
|
/* Use resulting time value */
|
||||||
s->st_atime = s->st_ctime = s->st_mtime;
|
s->st_atime = s->st_ctime = s->st_mtime;
|
||||||
#if 0
|
|
||||||
/* These variables must be initialized by vfs_s_new_inode () */
|
|
||||||
s->st_dev = 0;
|
|
||||||
s->st_ino = 0;
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_ST_BLKSIZE
|
#ifdef HAVE_ST_BLKSIZE
|
||||||
s->st_blksize = 512;
|
s->st_blksize = 512;
|
||||||
#endif
|
#endif
|
||||||
|
@ -156,10 +156,8 @@
|
|||||||
|
|
||||||
void vfs_stamp (vfs *, vfsid);
|
void vfs_stamp (vfs *, vfsid);
|
||||||
void vfs_rmstamp (vfs *, vfsid, int);
|
void vfs_rmstamp (vfs *, vfsid, int);
|
||||||
void vfs_addstamp (vfs *, vfsid, struct vfs_stamping *);
|
|
||||||
void vfs_add_noncurrent_stamps (vfs *, vfsid, struct vfs_stamping *);
|
void vfs_add_noncurrent_stamps (vfs *, vfsid, struct vfs_stamping *);
|
||||||
void vfs_add_current_stamps (void);
|
void vfs_add_current_stamps (void);
|
||||||
void vfs_free_resources(char *path);
|
|
||||||
void vfs_timeout_handler (void);
|
void vfs_timeout_handler (void);
|
||||||
void vfs_expire (int);
|
void vfs_expire (int);
|
||||||
int vfs_timeouts (void);
|
int vfs_timeouts (void);
|
||||||
@ -282,7 +280,6 @@ static inline int mc_setctl(a,b,c) { return 0; }
|
|||||||
# define vfs_init() do { } while (0)
|
# define vfs_init() do { } while (0)
|
||||||
# define vfs_shut() do { } while (0)
|
# define vfs_shut() do { } while (0)
|
||||||
# define vfs_canon(p) g_strdup (canonicalize_pathname(p))
|
# define vfs_canon(p) g_strdup (canonicalize_pathname(p))
|
||||||
# define vfs_free_resources() do { } while (0)
|
|
||||||
# define vfs_timeout_handler() do { } while (0)
|
# define vfs_timeout_handler() do { } while (0)
|
||||||
# define vfs_timeouts() 0
|
# define vfs_timeouts() 0
|
||||||
# define vfs_force_expire() do { } while (0)
|
# define vfs_force_expire() do { } while (0)
|
||||||
@ -359,9 +356,8 @@ extern void vfs_print_stats (const char *fs_name, const char *action,
|
|||||||
#define MCCTL_WANT_STALE_DATA 9
|
#define MCCTL_WANT_STALE_DATA 9
|
||||||
#define MCCTL_NO_STALE_DATA 10
|
#define MCCTL_NO_STALE_DATA 10
|
||||||
|
|
||||||
extern int vfs_flags;
|
#define vfs_uid 0
|
||||||
extern uid_t vfs_uid;
|
#define vfs_gid 0
|
||||||
extern gid_t vfs_gid;
|
|
||||||
|
|
||||||
#define FL_ALWAYS_MAGIC 1
|
#define FL_ALWAYS_MAGIC 1
|
||||||
#define FL_NO_MCFS 2
|
#define FL_NO_MCFS 2
|
||||||
|
Loading…
Reference in New Issue
Block a user