Commit Graph

124 Commits

Author SHA1 Message Date
Roland Illig 7e7b81b73e * direntry.c: Added const qualifiers to work around gcc
warnings.
	* extfs.c: Likewise.
	* fish.c: Likewise.
	* ftpfs.c: Likewise.
	* sfs.c: Likewise.
	* xdirentry.h: Likewise.
2005-09-05 00:52:56 +00:00
Pavel Roskin 1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Pavel Roskin 8b6a126125 * extfs.c: Fix warnings reported by gcc 4.0.0. 2005-05-21 03:24:50 +00:00
Roland Illig d7e7ec48dd * *.c: Declared unused variables with (void) to avoid the gcc
warnings.
	* extfs.c (extfs_get_path_mangle, extfs_get_path): Removed unused
	parameter.
	* ftpfs.c (ftpfs_netrc_bad_mode): Likewise.
	* vfs.c (mc_def_getlocalcopy): Likewise.
2005-02-22 18:35:22 +00:00
Roland Illig 54cccec688 * utilvfs.h: Removed unneeded #includes.
* *.c: Added the #includes that have been removed from utilvfs.h.
	* tcputil.c: Just removed the unneeded #include "utilvfs.h".
2005-02-19 16:36:38 +00:00
Andrew V. Samoilov 1735921c14 * extfs.c (struct inode): Remove unused linkflag field.
(extfs_internal_stat): Eliminate "inode" variable.
        (extfs_fstat): Likewise.
        (extfs_unlink): Fix memory leak if extfs_get_path_mangle() fails.
2004-12-29 07:32:41 +00:00
Andrew V. Samoilov 278ae44436 * extfs.c (extfs_generate_entry): Initialize inode->last_in_subdir.
(extfs_read_archive): Likewise. Remove unneeded test.
        Fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286990

        * extfs/ulha.in (mc_lha_fs_list): Use $NF instead of $10 as filename
        for permission intention.
        Fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286990
2004-12-27 12:12:31 +00:00
Roland Illig a0aef5042d * ext.c: Fixed FIXME by passing around a reference to a VFS. 2004-12-06 23:27:23 +00:00
Andrew V. Samoilov c060826178 * direntry.c (vfs_s_free_entry): g_free handles NULL argument too,
no need for the comparison.
        * extfs.c (extfs_free_archive): Likewise.
            (extfs_open_archive): Likewise.
            (extfs_read_archive): Likewise.
            (extfs_remove_entry): Likewise.
            (extfs_free_entry): Likewise.
        * fish.c (fish_open_archive): Likewise.
            (fish_archive_same): Likewise.
        * ftpfs.c (ftpfs_split_url):  Likewise.
        * local.c       (local_closedir): Likewise.
        * mcserv.c (close_handle): Likewise.
        * smbfs.c (smbfs_free_bucket): Likewise.
        * tar.c (tar_read_header): Likewise.
        * undelfs.c (undelfs_shutdown): Likewise.
        * vfs.c (vfs_shut): Likewise.
2004-09-24 23:00:18 +00:00
Roland Illig 4bc786735e * cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where
NULL was meant.
	* direntry.c: Likewise.
	* extfs.c: Likewise.
	* fish.c: Likewise.
	* ftpfs.c: Likewise.
	* mcfs.c: Likewise.
	* tar.c: Likewise.
	* undelfs.c: Likewise.
	* vfs.c: Likewise.
2004-09-24 15:08:21 +00:00
Andrew V. Samoilov 312da833ff * extfs.c (extfs_open_archive): Fixes bug in extfs, which showed
'Inconsistent extfs archive' on small archives and diffs.
        QNX 6.x (QNX Neutrino) specific
2004-09-17 11:44:43 +00:00
Andrew V. Samoilov e04694309c * tar.c (tar_read_header): Fix missed *.
* extfs.c (extfs_readlink): Revert last change: readlink does not
        append a NUL character to buf.
        * ftpfs.c: Warning fix.
        * vfs-impl.h (struct vfs_class.readlink): Make "size" size_t.
        Adjust all callers.
2004-09-02 13:57:59 +00:00
Andrew V. Samoilov 15c6e5cae6 * direntry.c (vfs_s_readlink): Use g_strlcpy instead strncpy.
* ftpfs.c (ftpfs_get_reply): Use g_strlcpy instead strncpy.
* extfs.c (extfs_readlink): Fix return value. Use g_strlcpy
        instead strncpy.
* mcfs.c (mcfs_readlink): Fix return value. Use g_strlcpy
        instead strncpy.
* tar.c (tar_read_header): Add additional check for consistency.
        Fix memory leak.
* cpio.c (cpio_defer_find): Remove recursion.
        (cpio_free_archive): Fix memory leak.
        (cpio_read_bin_head): Use union for simplicity using of header
        structure. Add additional check for consistency.
        (cpio_read_oldc_head): Add additional check for consistency.
2004-09-02 00:09:02 +00:00
Andrew V. Samoilov 0bc44d553c * extfs.c (struct inode): Use off_t for size. 2004-08-30 18:38:21 +00:00
Andrew V. Samoilov a2d1d4e8dc * direntry.c: Use g_strlcpy instead strncpy for fix buffer overrun
* extfs.c: Likewise.
* mcfs.c: Likewise.
* smbfs.c: Likewise.
* utilvfs.c: Likewise.
2004-08-26 08:47:50 +00:00
Roland Illig 83c07852e9 * extfs.c (extfs_internal_stat): Fixed memory leaks introduced
by my change from 2004-08-16. (extfs_unlink): likewise.

	* ftpfs.c (ftpfs_send_command): likewise.
2004-08-24 15:56:24 +00:00
Roland Illig 34a8088483 Splittet the vfs.h header into a user's part (vfs.h) and an implementor's part (vfs-impl.h). 2004-08-16 23:18:42 +00:00
Roland Illig b17b1ac213 Const-ified the rest of the vfs_class methods. 2004-08-16 22:15:28 +00:00
Roland Illig e0bf99d516 Made the path argument to vfs->{chmod,chown,utime} constant. 2004-08-16 21:36:39 +00:00
Roland Illig dc70d154db Made the buf argument to vfs->write constant. 2004-08-16 21:16:54 +00:00
Roland Illig 789e5e9bcb Made the path argument to vfs->[l]stat constant. Created a new memory leak, which will be fixed soon. 2004-08-16 20:26:42 +00:00
Roland Illig b472c18c79 Made the patch argument to vfs->which const. 2004-08-16 19:47:21 +00:00
Roland Illig db3f21b702 Added a typedef for a function. Added more const-ness to the function arguments. 2004-08-16 16:34:11 +00:00
Roland Illig f17c1f291c mc_ungetlocalcopy does not free its second argument anymore. 2004-08-16 15:18:17 +00:00
Andrew V. Samoilov 5b290ada65 * extfs.c (extfs_init): Fix possible off-by-one buffer underflow
for empty lines in extfs.ini.
2004-08-14 10:51:00 +00:00
Pavel Roskin 6ffd35bf07 * gc.c: Eliminate all code for timestamping parent filesystems.
It's broken and undocumented.  Adjust all dependencies.
2003-11-26 21:10:42 +00:00
Pavel Roskin 54b8c9aaad * vfs.c (vfs_split): Deconstify.
* direntry.c (vfs_s_get_path_mangle): Likewise.  "mangle" is in
the name for a reason.  Use vfs_s_get_path() instead where the
path should be preserved.
* extfs.c (extfs_get_path_mangle): Likewise.
* sfs.c (sfs_vfmake): Protect against changes in vfs_split().
2003-11-14 08:25:50 +00:00
Pavel Roskin 30c4bd1b6d * vfs.h: Constify chdir() and opendir() methods. Adjust all
dependencies.
* vfs.c (mc_chdir): Constify, eliminate protection against
broken implementations of chdir() method.
(mc_opendir): Constify.
2003-11-13 08:29:37 +00:00
Pavel Roskin 4b5a2a0b62 * direntry.c (vfs_s_stamp_me): Generalize and move ...
* gc.c (vfs_stamp_create): ... here.  Use whenever possible.
2003-11-13 08:03:03 +00:00
Pavel Roskin de12104436 * gc.c: Use NULL instead of -1 for empty vfsid. Adjust all
dependencies.
* undelfs.c (undelfs_get_path): Don't shadow static ext2_fname.
(undelfs_getid): Likewise.  Use fs for non-empty vfsid.
2003-11-12 23:00:16 +00:00
Pavel Roskin 4eab382dba * gc.c: Make getid(), nothingisopen() and free() methods
optional.  Eliminate trivial implementations.
(vfs_getid): New function - safe wrapper around getid().  Use
it everywhere.
(vfs_ncs_getid): Remove dead code, inprove readability.
2003-11-08 23:53:00 +00:00
Pavel Roskin b33f2cbb47 * vfs.c: Split garbage collection code into ...
* gc.c: ... this.
* vfs.h: Corresponding code moved ...
* gc.h: ... here.
* Makefile.am: Adjustments for the above.
2003-11-07 23:43:55 +00:00
Pavel Roskin cb2aaf4c16 * extfs.c: Remove current_dir field, its role was purely
decorative.  Rename names starting with underscore.
2003-10-29 23:16:31 +00:00
Pavel Roskin f2550b08ee * extfs.h: Merge ...
* extfs.c: ... here.
* Makefile.am: Remove extfs.h.
2003-10-29 23:05:27 +00:00
Pavel Roskin 0ba019a90b * configure.in: Use AC_CHECK_MEMBERS to check fields of struct
stat.  Adjust all dependencies.
2003-10-29 17:36:16 +00:00
Pavel Roskin edce41facd * utilvfs.c (vfs_mkstemps): New function - create temporary file
with the name resembling the original, but safe for scripts.
* direntry.c (vfs_s_open): Use it.
(vfs_s_retrieve_file): Likewise.
* extfs.c (extfs_open): Likewise.
* sfs.c (sfs_redirect): Likewise.
2003-10-29 00:50:36 +00:00
Pavel Roskin 77bcdc8127 * vfs.c (mc_ungetlocalcopy): Free local path here, not in class
implementations.
* vfs.h (struct vfs_s_class): Constify "local" argument for
ungetlocalcopy.  Adjust all implementations.
2003-10-28 21:52:06 +00:00
Pavel Roskin 8e3a0c9d65 * direntry.c (vfs_s_init_class): Improve interface to allow more
code reuse.  Change all callers.
(vfs_s_getlocalcopy): New implementation.  Don't use
mc_def_getlocalcopy().  Use vfs_s_open() to create local copy.
(vfs_s_ungetlocalcopy): New function.
* xdirentry.h: Add new field "flags" to struct vfs_s_subclass.
* extfs.c (extfs_ungetlocalcopy): Don't use
mc_def_ungetlocalcopy() in the dead branch.
* vfs.c (mc_def_getlocalcopy): Make static.
(mc_def_ungetlocalcopy): Likewise.
2003-10-28 07:09:39 +00:00
Pavel Roskin 7d16d65e35 * vfs.h: Constify some arguments for many functions.
* xdirentry.h: Likewise.  Adjust all dependencies.
2003-10-28 02:10:33 +00:00
Pavel Roskin 5bc20fd294 * *.c: Rename functions that don't have an a prefix indicating
what file they are defined in.  This simplifies debugging.
2003-10-28 00:57:02 +00:00
Pavel Roskin 211ce16fac * wtools.c: Merge mc_message() and message() into one background
safe function message().  Fix all callers.
2003-10-26 04:47:20 +00:00
Pavel Roskin 50045218ab Remove unneeded includes in ../src 2003-10-25 21:34:57 +00:00
Pavel Roskin 2d33b5047e * background.c: Replace all message stubs with a new function
mc_message().  Protect against strlen(MSG_ERROR).  Adjust all
dependencies.
2003-10-25 19:54:24 +00:00
Pavel Roskin 52844a3092 * vfs.h: Rename commands for mc_ctl() and mc_setctl() to make it
clear which function they are used with.
* vfs.c (mc_ctl): Change last argument to (void*).
(mc_set): Likewise.
Adjust all dependencies.
2003-10-16 16:12:19 +00:00
Pavel Roskin 426c1836d5 * vfs.h: Remove all references to seekdir and telldir. Adjust
all dependencies.
2003-10-14 22:24:26 +00:00
Pavel Roskin 72c64a60e2 * extfs.c: Switch to self-registration.
* mcfs.c: Likewise.
* sfs.c: Likewise.
* smbfs.c: Likewise.
* undelfs.c: Likewise.
* vfs.s (_vfs_add_noncurrent_stamps): Temporary disable code
that uses vfs_extfs_ops.
(vfs_file_is_smb): Remove.
2003-10-12 22:25:53 +00:00
Pavel Roskin 00b57fd4bf * vfs.h: Remove typedef vfs, it's too ambiguous. Massive
changes to use struct vfs_class instead.
2003-10-12 00:24:00 +00:00
Pavel Roskin 6e6fd9b352 * vfs.c (vfs_add_noncurrent_stamps): Call vfs_rm_parents() at
the end.  Change all callers not to call it.
(vfs_rm_parents): Make static.
2003-10-11 17:30:54 +00:00
Pavel Roskin 3fb8e46501 * direntry.c: Don't use vfs_local_fs directly, use VFSF_LOCAL.
* extfs.c: Likewise.
* vfs.c (vfs_addstamp): Likewise.
(vfs_init): Register vfs_local_fs like other classes.
2003-10-11 16:54:46 +00:00
Pavel Roskin b2486a2b71 * extfs.c: Don't include xdirentry.h.
* vfs.c: Likewise.
2003-10-11 09:36:29 +00:00