* vfs.c (mc_stat): Make first argument const.
(mc_lstat): Likewise. * vfs.h: Adjust declarations and remove some useless defines.
Этот коммит содержится в:
родитель
825fd4d1ed
Коммит
60a725395c
@ -1,3 +1,9 @@
|
|||||||
|
2002-12-11 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||||
|
|
||||||
|
* vfs.c (mc_stat): Make first argument const.
|
||||||
|
(mc_lstat): Likewise.
|
||||||
|
* vfs.h: Adjust declarations and remove some useless defines.
|
||||||
|
|
||||||
2002-12-10 Pavel Roskin <proski@gnu.org>
|
2002-12-10 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* extfs/a: Enable Perl warnings. Ignore entries without a date.
|
* extfs/a: Enable Perl warnings. Ignore entries without a date.
|
||||||
|
12
vfs/vfs.c
12
vfs/vfs.c
@ -568,11 +568,11 @@ mc_closedir (DIR *dirp)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mc_stat (char *path, struct stat *buf) {
|
int mc_stat (const char *filename, struct stat *buf) {
|
||||||
vfs *vfs;
|
vfs *vfs;
|
||||||
int result;
|
int result;
|
||||||
|
char *path;
|
||||||
path = vfs_canon (path); vfs = vfs_type (path);
|
path = vfs_canon (filename); vfs = vfs_type (path);
|
||||||
result = vfs->stat ? (*vfs->stat) (vfs, vfs_name (path), buf) : -1;
|
result = vfs->stat ? (*vfs->stat) (vfs, vfs_name (path), buf) : -1;
|
||||||
g_free (path);
|
g_free (path);
|
||||||
if (result == -1)
|
if (result == -1)
|
||||||
@ -580,11 +580,11 @@ int mc_stat (char *path, struct stat *buf) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mc_lstat (char *path, struct stat *buf) {
|
int mc_lstat (const char *filename, struct stat *buf) {
|
||||||
vfs *vfs;
|
vfs *vfs;
|
||||||
int result;
|
int result;
|
||||||
|
char *path;
|
||||||
path = vfs_canon (path); vfs = vfs_type (path);
|
path = vfs_canon (filename); vfs = vfs_type (path);
|
||||||
result = vfs->lstat ? (*vfs->lstat) (vfs, vfs_name (path), buf) : -1;
|
result = vfs->lstat ? (*vfs->lstat) (vfs, vfs_name (path), buf) : -1;
|
||||||
g_free (path);
|
g_free (path);
|
||||||
if (result == -1)
|
if (result == -1)
|
||||||
|
15
vfs/vfs.h
15
vfs/vfs.h
@ -142,11 +142,6 @@
|
|||||||
char *vfs_canon (const char *path);
|
char *vfs_canon (const char *path);
|
||||||
char *mc_get_current_wd (char *buffer, int bufsize);
|
char *mc_get_current_wd (char *buffer, int bufsize);
|
||||||
int vfs_current_is_local (void);
|
int vfs_current_is_local (void);
|
||||||
#if 0
|
|
||||||
int vfs_current_is_extfs (void);
|
|
||||||
int vfs_current_is_tarfs (void);
|
|
||||||
int vfs_current_is_cpiofs (void);
|
|
||||||
#endif
|
|
||||||
int vfs_file_is_local (const char *name);
|
int vfs_file_is_local (const char *name);
|
||||||
int vfs_file_is_ftp (char *filename);
|
int vfs_file_is_ftp (char *filename);
|
||||||
int vfs_file_is_smb (char *filename);
|
int vfs_file_is_smb (char *filename);
|
||||||
@ -190,8 +185,8 @@
|
|||||||
int mc_telldir (DIR *dir);
|
int mc_telldir (DIR *dir);
|
||||||
void mc_seekdir (DIR *dir, int offset);
|
void mc_seekdir (DIR *dir, int offset);
|
||||||
|
|
||||||
int mc_stat (char *path, struct stat *buf);
|
int mc_stat (const char *path, struct stat *buf);
|
||||||
int mc_lstat (char *path, struct stat *buf);
|
int mc_lstat (const char *path, struct stat *buf);
|
||||||
int mc_fstat (int fd, struct stat *buf);
|
int mc_fstat (int fd, struct stat *buf);
|
||||||
|
|
||||||
int mc_chmod (char *path, int mode);
|
int mc_chmod (char *path, int mode);
|
||||||
@ -213,9 +208,9 @@
|
|||||||
int mc_ctl (int fd, int ctlop, int arg);
|
int mc_ctl (int fd, int ctlop, int arg);
|
||||||
int mc_setctl (char *path, int ctlop, char *arg);
|
int mc_setctl (char *path, int ctlop, char *arg);
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_MMAP
|
||||||
caddr_t mc_mmap (caddr_t, size_t, int, int, int, off_t);
|
caddr_t mc_mmap (caddr_t, size_t, int, int, int, off_t);
|
||||||
int mc_unmap (caddr_t, size_t);
|
int mc_unmap (caddr_t, size_t);
|
||||||
int mc_munmap (caddr_t addr, size_t len);
|
int mc_munmap (caddr_t addr, size_t len);
|
||||||
#endif /* HAVE_MMAP */
|
#endif /* HAVE_MMAP */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user