Parent Directory | Revision Log
Links to HEAD: | (view) (download) (annotate) |
Sticky Tag: |
* vfs/direntry.c (vfs_s_free_super): Remove redundant code.
* vfs/direntry.c (vfs_s_inode_from_path): Revert last change.
* vfs/direntry.c (vfs_s_inode_from_path): Do not give up if a given path does not exist in the directory cache. In such scenario use the underlying vfs to determine whether the path exists or not.
* vfs/ftpfs.c (ftpfs_dir_uptodate): Remove. (init_ftpfs): Adjust the code to reflect the removal of `ftpfs_dir_uptodate'. * vfs/fish.c (fish_dir_uptodate): Remove. (init_fish): Adjust the code to reflect the removal of `fish_dir_uptodate'. * vfs/direntry.c (vfs_s_dir_uptodate): New function. (vfs_s_init_class): Initialize the `dir_uptodate' field of vfs_s_subclass.
* direntry.c (vfs_s_open): Be less restrictive when O_LINEAR is specified and `linear_start' is not implemented.
* xdirentry.h (LS_LINEAR_PREOPEN): New macro definition. * direntry.c (vfs_s_open): When opening a file in linear mode, defer the actual open operation until the first read call. (vfs_s_read): When reading in linear mode, open the file on the first read operation. (vfs_s_lseek): When in linear mode, make sure that seeking is allowed only before the first read operation. * ftpfs.c (ftpfs_ctl): Make the code aware of LS_LINEAR_PREOPEN. * fish.c (fish_ctl): Likewise.
* 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.
* direntry.c: Removed an unused variable.
* dirent.c (split_dir_name): Don't assign a string literal to a char *. Use '\0' instead of 0 when operating on characters.
* *.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.
* 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".
* direntry.c (vfs_s_readlink): Correctly calculate link length.
* direntry.c (vfs_s_open): Fix memory leak. (vfs_s_retrieve_file): Check write() return more carefully.
* 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.
* 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.
* direntry.c (vfs_s_new_entry): see 2004-09-19. Additionally followed the advice concerning g_strdup in /HACKING. (vfs_s_generate_entry): Likewise. (vfs_s_find_entry_linear): Likewise. (vfs_s_find_inode): Likewise. * xdirentry.h: Likewise.
* direnty.c (vfs_s_new_entry): Revert last changes. (vfs_s_generate_entry): Likewise. (vfs_s_find_entry_linear): Likewise. (vfs_s_find_inode): Likewise. * xdirentry.h: likewise.
* direntry.c: Added const qualifier to function declarations and variables. Introduced local modifiable strings where necessary. * xdirentry.h: likewise.
* vfs.c (vfs_cmp_handle): Fixing warnings on on 64-bit platforms. (vfs_op):Likewise. (vfs_info):Likewise. (vfs_free_handle):Likewise. * extfs/rpm (mcrpmfs_run): Quote parameters to calls to system/open that spawn a shell. * direntry.c (vfs_s_find_entry_tree): Make "size" size_t.
* local.c (local_readlink): Make "size" size_t. * direntry.c (vfs_s_readlink): Revert last changes. Make "size" size_t. * sfs.c (sfs_readlink): Reformat function. * smbfs.c (smbfs_readlink): Reformat function.
* 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.
* direntry.c: Use g_strlcpy instead strncpy for fix buffer overrun * extfs.c: Likewise. * mcfs.c: Likewise. * smbfs.c: Likewise. * utilvfs.c: Likewise.
Splittet the vfs.h header into a user's part (vfs.h) and an implementor's part (vfs-impl.h).
Const-ified the rest of the vfs_class methods.
Made the buf argument to vfs->write constant.
Made the path argument to vfs->[l]stat constant. Created a new memory leak, which will be fixed soon.
Added a typedef for a function. Added more const-ness to the function arguments.
* direntry.c (vfs_s_resolve_symlink): Check vfs_s_fullpath() return value to avoid NULL dereference. Reported by wwp <subscript@free.fr>.
* gc.c: Eliminate all code for timestamping parent filesystems. It's broken and undocumented. Adjust all dependencies.
* direntry.c (vfs_s_resolve_symlink): Eliminate g_strdup_printf(). (vfs_s_fullpath): Likewise.
* 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().
* 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.
* direntry.c (vfs_s_stamp_me): Generalize and move ... * gc.c (vfs_stamp_create): ... here. Use whenever possible.
* 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.
* 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.
* vfs.c: Split garbage collection code into ... * gc.c: ... this. * vfs.h: Corresponding code moved ... * gc.h: ... here. * Makefile.am: Adjustments for the above.
* vfs.c: Move all parsing code, vfs_die() and vfs_get_password() to utilvfs.c, vfs_print_stats() to direntry.c. * utilvfs.c (vfs_parse_ls_lga): Disable caching current date, it's done incorrectly.
* 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.
* 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.
Typo in the last commit.
* direntry.c (vfs_s_init_class): Use our getlocalcopy for remote filesystems that cache files, not for archives. (vfs_s_getlocalcopy): Corresponding changes.
* 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.
* vfs.h: Constify some arguments for many functions. * xdirentry.h: Likewise. Adjust all dependencies.
* direntry.c (vfs_s_find_inode): Only allow search from root. Change second argument to superblock to prevent abuse.
* direntry.c (vfs_s_find_entry_tree): Eliminate buffer of fixed size. Don't prepare path for vfs_s_resolve_symlink(). (vfs_s_resolve_symlink): Remove unused argument "path".
* direntry.c (vfs_s_add_dots): Remove. Fix all callers. (vfs_s_free_inode): Remove support for "." and ".." entries. * ftpfs.c (dir_load): Likewise. Support for "." and ".." entries was a hack that could make the cache non-traversible from inodes to the root and cause infinite loop in vfs_s_fullpath(). Reported by Frédéric L. W. Meunier <lists1@pervalidus.net>
* wtools.c: Merge mc_message() and message() into one background safe function message(). Fix all callers.
Remove unneeded includes in ../src
* background.c: Replace all message stubs with a new function mc_message(). Protect against strlen(MSG_ERROR). Adjust all dependencies.
* direntry.c (vfs_s_find_entry_tree): Canonicalize path.
* direntry.c (vfs_s_resolve_symlink): Don't use buffers of fixed size. This fixes a security hole. Always start from the root. Remove broken code for making symlinks relative. (vfs_s_find_entry_tree): Protect against long path, since this function uses a buffer of fixed size. (vfs_s_fullpath): Implement support for archives (real trees).
* direntry.c (vfs_s_setctl): Implement VFS_SETCTL_FLUSH. * ftpfs.c: Remove ftpfs_flushdir. Use MEDATA->flush. * fish.c: Use MEDATA->flush.
* direntry.c (vfs_s_setctl): Add support to VFS_SETCTL_LOGFILE. * ftpfs.c (ftpfs_set_debug): Remove.
* 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.
* xdirentry.h: Move system includes to the files that need them.
* vfs.h: Remove all references to seekdir and telldir. Adjust all dependencies.
* xdirentry.h: Remove all typedefs, there is no need to hide the fact that structures are structures. Fix all dependencies.
* vfs.h: Remove typedef vfs, it's too ambiguous. Massive changes to use struct vfs_class instead.
* 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.
* 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.
* direntry.c: Make more functions static. They are filled in in vfs_s_init_class() now and don't need to be exported.
* undelfs.c (undelfs_get_path): Constify first argument. * vfs.h (struct vfs_class): Constify path. Fix all dependencies.
* vfs.c (vfs_type): Rename to vfs_get_class(). Fix prototype to avoid using internal vfs type. Adjust all dependencies. (vfs_rosplit): Rename to _vfs_get_class().
* fish.c: Convert to calling vfs_register_class(). * fish.h: Eliminate. Adjust all dependencies. * direntry.c (vfs_s_init_class): Add missing vfs_s_setctl().
* vfs.h: Rename "struct _vfs" to "struct vfs_class". Allow calling vfs_register() in the file defining the VFS class. * vfs.c (vfs_init): Register cpiofs in cpio.c. (vfs_register): Rename to vfs_register_class(), remove "static". * direntry.c (vfs_s_init_class): New function - generic VFS class registraction for vfs_s descendants. * cpio.c: Register VFS class locally.
* direntry.c: Make functions static when possible. * xdirentry.h: Remove unneeded declarations.
* direntry.c (vfs_s_dump): Commented out. * extfs.c (s_readlink): Fix return value and possible buffer overflow. * mcfs.c (mcfs_readlink): Fix return value. * mcserv.c (do_readlink): Fix possible off-by-one. (commands): Make const array and remove needless comma.
* direntry.c (vfs_s_dump): SunOS 5.8 warning fix. Reformat function.
s/can not/cannot/
* direntry.c (vfs_s_open): If the filesystem is read-only, disable file creation.
s/Dir cache/Directory cache/ "Dir cache" should be in geek.po :-)
* direntry.c (vfs_s_resolve_symlink): Use g_snprintf() instead of non-portable snprintf(). Reported by Xu Qiang <Xu.Qiang@xssc.sgp.xerox.com>
* direntry.c (vfs_s_retrieve_file): Allow interrupt by Ctrl-C. From Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
Global removal of RCS Id: flags.
* direntry.c [!USE_NETCODE]: Disable functions used in networked filesystems only.
* direntry.c (vfs_s_get_line): Fix off-by-one buffer overflow.
* direntry.c (vfs_s_getlocalcopy): Fix potentially dangerous strcpy().
* extfs.c (s_readdir): Simplify. * direntry.c (vfs_s_readdir): Use vfs_dirent. * mcfs.c (mcfs_readdir): Likewise. * smbfs.c (smbfs_readdir): Likewise. * undelfs.c (undelfs_readdir): Use vfs_dirent and compute_namelen().
* direntry.c (vfs_s_readdir): Use compute_namelen(). * extfs.c (s_readdir): Likewise. * mcfs.c (mcfs_readdir): Likewise. * smbfs.c (smbfs_readdir): Likewise.
* direntry.c (vfs_s_find_entry_linear): Canonicalize path before searching
* xdirentry.h: Get rid of ifree(), it's equivalent to g_free(). * direntry.c: Likewise. * fish.c: Likewise. * ftpfs.c: Likewise.
* direntry.c (vfs_s_open): Don't pass O_LINEAR to open() - this flag is for VFS only, and causes side effects in Cygwin. * extfs.c (extfs_open): Likewise. * sfs.c (sfs_open): Likewise. Reported by Pavel Tsekov <ptsekov@gmx.net>
* xdirentry.h (vfs_s_fh.u.ftp): Add append field. (vfs_s_data.file_store): Change second argument to (vfs_s_fh *fh). * direntry.c (vfs_s_close): Adjust. * fish.c (file_store): Likewise. * ftpfs.c (file_store): Likewise. Use "APPE" if fh->u.ftp.append is true. (linear_start): Care about fh->u.ftp.append. (ftpfs_fh_open): Likewise.
* direntry.c (vfs_s_retrieve_file): Please, care about fish.local_stat ... * fish.c (linear_close): ... here.
* direntry.c (vfs_s_read): Move MEDATA->linear_start() ... * (vfs_s_open): ... here.
* direntry.c (vfs_s_resolve_symlink): Comment out buggy code. (vfs_s_retrieve_file): Set fh->handle to -1. (vfs_s_read): Don't manipulate with FH->handle if it is -1. (vfs_s_write): Likewise. (vfs_s_close): Likewise.
* direntry.c (vfs_s_retrieve_file): Use off_t for total and stat_size. * vfs.c (vfs_s_resolve_symlink): Use snprintf instead of sprintf. (vfs_print_stats): Use off_t for have and need. Cast have to double to eliminate negative percent(s). Fix print_vfs_message string formats. * vfs.h (vfs_print_stats): Adjust declaration. * ftpfs.c (file_store): Use off_t for total. Fix print_vfs_message string format.
* direntry.c (vfs_s_free_super): Remove i18n on commented out developer-only code.
* cpio.c: Include <config.h> before everything else. * direntry.c: Likewise. * fish.c: Likewise. * ftpfs.c: Likewise. * local.c: Likewise. * tar.c: Likewise. * utilvfs.h: Don't include <config.h> - it should be included in all C files instead. * xdirentry.h: Likewise.
* ftpfs.c: Declare functions without declarations static. Don't omit `void' in declarations. * cpio.c: Likewise. * direntry.c: Likewise. * extfs.c: Likewise. * mcfs.c: Likewise. * tar.c: Likewise. * vfs.c: Likewise. * vfs.h: Likewise. * mcserv.c: Likewise. Remove unused functions.
* src/ext.c (exec_extension): Use mc_mkstemps(). * src/user.c (execute_menu_command): Use mc_mkstemps(). * src/util.c (mc_mkstemps): New function - safely create and open temporary file. Return the handle and the name. * src/util.h: Declarations for init_tmpdir() and mc_mkstemps(). Define TMPDIR_DEFAULT and SCRIPT_SUFFIX. * vfs/direntry.c (vfs_s_open): Use mc_mkstemps. Create and close temporary file to reserve its name on the filesystem. (vfs_s_retrieve_file): Use mc_mkstemps(). (g_tempnam): Remove. * vfs/extfs.c (extfs_open): Use mc_mkstemps(). * vfs/sfs.c (redirect): Likewise. * vfs/shared_ftp_fish.c (_get_file_entry): Likewise. (retrieve_file): Likewise. * vfs/vfs.c (mc_def_getlocalcopy): Likewise. * vfs/xdirentry.h: Remove declaration of g_tempnam().
Fixes from Roland: we may not g_free() strdup-ed text.
Do not leave st_nlink uninitialized.
Fixed problems with stating / of ftp archive; minor bugfix.
2000-04-28 Pavel Machek <pavel@artax.karlin.mff.cuni.cz> * direntry.c (vfs_s_internal_stat): added ugly special case for / of archive to always exist. It seems I'm hiding some underlying problem :-(.
2000-04-26 Andrew V. Samoilov <sav@bcs.zp.ua> * direntry.c (vfs_s_find_entry_tree): segfault fixed when root is NULL (vfs_s_new_inode, vfs_s_new_entry): g_new replaced by g_new0 * ftpfs.c (dir_load): ent->name is free()d for "." and ".." (ftpfs_directory_timeout): default value changed to 900 (netrc_next): "const char * const keywords" go to rodata and is shared
Fix problems with stating / of ftp server + NO_LOCALHASH to prevent podfuk deadlocs
2000-03-31 Andrew V. Samoilov <sav@bcs.zp.ua> * vfs.c (mc_def_getlocalcopy): free() replaced by g_free() to prevent crushes with mad, thanks to Timur I. Bakeyev <timur@bat.ru> * fish.c (linear_start): name wasn't freed after usage * cpio.c (cpio_ungetlocalcopy): return type changed to int, function return 0 now * direntry.c (vfs_s_close, vfs_s_resolve_symlink): memory, allocated by vfs_s_fullpath () is freed after use * ftpfs.c (linear_start): ditto;
2000-01-31 Andrew V. Samoilov <sav@bcs.zp.ua> * direntry.c: (vfs_s_resolve_symlink, vfs_s_readlink) fixed segfaults for broken symlinks like 2001 -> The Space Oddysea.
ftpfs can not handle homes nicely. Is there good way to solve this?
1999-12-15 Pavel Machek <pavel@artax.karlin.mff.cuni.cz> * Merged changes by Andrew V. Samoilov <sav@bcs.zp.ua>. They are mostly internationalization + fixing stupid bugs of mine
1999-12-08 Pavel Machek <pavel@artax.karlin.mff.cuni.cz> * ftpfs.c: basically replaced ftpfs with new one. Unlike the previous one, this uses new direntry.c layer, so shared_ftp_fish.c can be killed. This is new code, so beware.
1999-02-17 Pavel Machek <pavel@bug.ucw.cz> * direntry.c (vfs_s_getlocalcopy): fixed segfault, getlocalcopy's name has to be malloced.
1999-08-18 Norbert Warmuth <nwarmuth@privat.circular.de> * vfs/direntry.c (vfs_s_getlocalcopy): There's an aditional strdup needed. In rare cases a pointer was freed twice. Pavel Machek pointed this out a while ago but obviously it hasn't been fixed, yet. * vfs/sfs.c (vfmake): Quote characters with a special meaning to the shell in filenames/-pathes (Fix Bug #1931, VFS will not work if your full path has the space character in it.).
ftpfs converted to direntry.c, many small fixes
OS/2 portability changes by Ilya
Glibing.... Wed Jan 27 03:09:48 1999 Timur I. Bakeyev <mc@bat.ru> * All around the source: Changed copy_strings() to g_strconcat(). Modi- fy last parameter in concat_dir_and_file() to "" - to prevent stack from disbalancing.
Actually commit all my changers. Fear :>
Make the code compile, take 2
Make the code compile. Reindent
more fixes to resolve symlinks
vfs_s_find_entry_tree() does not actually follow symlinks - fixed
vfs_s_resolve_symlink(): convert absolute linknames to relative linkname with some leading ../
Lots of changes: - SFS-based file systems now work on GNOME edition, I was not waiting for child process to finish decompressing. - VFS code cleanup. I am going to eventually get rid of all the macro-mania that has creeped into the vfs layer. Miguel
1999-01-02 Miguel de Icaza <miguel@nuclecu.unam.mx> * gmetadata.c (gmeta_get_icon_pos): Fixed the memory leak here. * gicon.c (gicon_get_icon_for_file): Actually return a value here. Editor fixes, vfs warning fixes;
Thu Dec 31 08:47:15 1998 Norbert Warmuth <nwarmuth@privat.circular.de> * sfs.c (sfs_nothingisopen): Assume for now it's always save to free this filesystem and delete temporary files. This needs further investigation. * tar.c: deleted unused empty struct tar_super. Thu Dec 31 08:40:44 1998 Norbert Warmuth <nwarmuth@privat.circular.de> * direntry.c: Split fd_usage into fd_usage and ino_usage. fd_usage was used for external and internal reference count. This was wrong because we can free resources taken up by the vfs as soon as the external reference count (now fd_usage) is zero. The internal reference count (ino_usage) mustn't matter because the vfs has to clean up itself in the correct order.
Fri Dec 25 21:48:51 1998 Norbert Warmuth <nwarmuth@privat.circular.de> * vfs/direntry.c (vfs_s_new_inode): Moved initialization of st_ino and st_dev from vfs_s_default_stat. (vfs_s_default_stat): initialize st_ino and st_dev to zero * vfs/tar.c (tar_open_archive): Make a new MEDATA->rdev for every new archive.
Some fixes in src/ part (want_stale_data is now done right) and more daring code in vfs/ (errors are now reported instead of silently ignored)
Many changes: - Beginning of the CORBA support for the file manager. - Tk and XView code dropped. Miguel
1998-12-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * fish.c (FISH_OP): changed snprintf to g_snprintf, as glib is used anyway. * xdirentry.h (LINK_NO_FOLLOW): * tar.c (read_header): * direntry.c (vfs_s_resolve_symlink): (vfs_s_inode_from_path): (vfs_s_open): renamed NO_FOLLOW and FOLLOW to LINK_NO_FOLLOW and LINK_FOLLOW resp. to avoid problems on solaris, where FOLLOW and NO_FOLLOW are defined in an enum. * vfs.h (ELAST): define it to 300, if not already defined, thats a bad hack, but what can we do....
* direntry.c (vfs_s_new_super): Added the missing return value.
Small bugfixes, killing of debuging hacks that escaped me.
Big merge: fish now uses proper caching, small fixes almost everywhere. I hope I did not break it too much.
Bugfixes
Make it compile
BIG changes: tar now uses brand-new direntry.c. Hope it does not hurt too much.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |