This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch]: mkdir -p and network drives


Here is a patch to allow mkdir -p to easily work with network
drives and to allow future enumeration of computers and of
network drives by ls -l.

It works by defining a new FH_NETDRIVE virtual handler for
names such as // and //machine.
This also makes chdir work without additional change.

The code for the new handler is currently in fhandler_virtual.cc, for
simplicity (not an expert on Makefile and fomit-frame-pointer).
It should eventually be placed in fhandler_netdrive.cc

The code should handle "//" correctly, but path.cc still transforms it
into "/", because of the bash bug.

I have directly edited devices.cc instead of using the devices.in
magic.

About implementing readdir: PTC...

Pierre


2005-05-05  Pierre Humblet <pierre.humblet@ieee.org>

	* fhandler.h (class fhandler_netdrive): New class.
	* fhandler_virtual.cc (fhandler_netdrive::fhandler_netdrive): New
constructor.
	(fhandler_netdrive::exists): New method.
	(fhandler_netdrive::fstat): Ditto.
	(fhandler_netdrive::readdir): Ditto.
	(fhandler_netdrive::open): Ditto.
	(fhandler_netdrive::fill_filebuf): Ditto.
	* dtable.cc (build_fh_pc): Handle case FH_NETDRIVE.
	* path.cc (isvirtual_dev): Add FH_NETDRIVE.
	(mount_info::conv_to_win32_path): Detect netdrive device.
	* devices.h (enum fh_devices): Add FH_NETDRIVE and renumber FH_FS.
	Declare dev_netdrive_storage and define netdrive_dev.
	* devices.cc: Define dev_netdrive_storage.

Attachment: netdrive.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]