Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <4265F5D6.2458C631@dessent.net> Date: Tue, 19 Apr 2005 23:25:26 -0700 From: Brian Dessent Organization: My own little world... MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: does not work : change /cygdrive to / (Attn: documentation patch) References: <426449CF DOT CD24BEB8 AT dessent DOT net> <20050419193940 DOT GF26832 AT trixie DOT casa DOT cgf DOT cx> Content-Type: multipart/mixed; boundary="------------6B5A1B0841FD6F17753596DE" X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com --------------6B5A1B0841FD6F17753596DE Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Patricia J. Hawkins" wrote: > I gather it was an accidentally introduced bug? My inference that it > was an intended change, which unexpectedly changed the visible > filesystem structure (added to the time I spent wading through > archives, doc, and system changes) is a good bit of what ticked me > off. > > Anyway, I think the mount doc needs clarification. Having different > mount points for the user and for the system is unexpected, and it's > also not clear from the doc that in cygwin, the user mount points > take precedence over the system mount points. The 'mount' system has always had user mode mounts and system mode mounts from day one. And, as far as I know, it has always been the case that user mode mounts take precedence over system wide mounts if the same path is mounted both ways. The only thing that we're actually talking about here, as far as I can tell, is the cygdrive prefix. Until 1.5.14, it did not work the same way as normal mounts in that you could not override a system mode cygdrive prefix with a user mode cygdrive prefix. This was fixed, so that the whole user/system distinction worked consistently for all mounts. (And, it was mentioned in the release notes for 1.5.14.) The documentation about the mount table[1] does explain that there are both system and user mounts. It however does not explicitly say that user mode mounts override system mode mounts. If anything, it would be good to perhaps add a sentence or two along those lines. Also the documentation for 'mount' regarding cygpath[2] does say that by default you are modifying the systemwide cygdrive prefix, but it does not say that if you have a user mode cygdrive prefix it will take precedence. That too might benefit from clarification. I have attached a patch to the documentation that clarifies these two locations. I ask that those that know more about Cygwin than I review the change to make sure I didn't say anything misleading. Brian [1] http://cygwin.com/cygwin-ug-net/using.html#mount-table "The mapping is stored in the current user's Cygwin mount table in the Windows registry so that the information will be retrieved next time the user logs in. Because it is sometimes desirable to have system-wide as well as user-specific mounts, there is also a system-wide mount table that all Cygwin users inherit. " [2] http://cygwin.com/cygwin-ug-net/using-utils.html#mount "Note that if you set a new prefix in this manner, you can specify the -s flag to make this the system-wide default prefix. By default, the cygdrive-prefix applies only to the system-wide setting. You can always see the user and system cygdrive prefixes with the -p option. " --------------6B5A1B0841FD6F17753596DE Content-Type: text/plain; charset=us-ascii; name="user-system-mounts-doc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="user-system-mounts-doc.patch" Index: utils/utils.sgml =================================================================== RCS file: /cvs/src/src/winsup/utils/utils.sgml,v retrieving revision 1.51 diff -u -p -r1.51 utils.sgml --- utils/utils.sgml 24 Feb 2005 04:32:45 -0000 1.51 +++ utils/utils.sgml 20 Apr 2005 06:20:38 -0000 @@ -729,9 +729,11 @@ set the automount prefix to /< -Note that if you set a new prefix in this manner, you can -specify the -s flag to make this the system-wide default -prefix. By default, the cygdrive-prefix applies only to the system-wide setting. +Note that the cygdrive prefix can be set both per-user and system-wide, +and that as with all mounts, a user-specific mount takes precedence over the +system-wide setting. The mount utility creates system-wide +mounts by default if you do not specify a type. Use the -s +or -u flag to indicate a system or user mount, respectively. You can always see the user and system cygdrive prefixes with the -p option. Using the -b flag with --change-cygdrive-prefix makes all new Index: doc/pathnames.sgml =================================================================== RCS file: /cvs/src/src/winsup/doc/pathnames.sgml,v retrieving revision 1.18 diff -u -p -r1.18 pathnames.sgml --- doc/pathnames.sgml 6 Mar 2005 02:46:54 -0000 1.18 +++ doc/pathnames.sgml 20 Apr 2005 06:20:39 -0000 @@ -47,7 +47,9 @@ v<version>" where <version> is the latest registry version associated with the Cygwin library (this version is not the same as the release number). The system-wide table is located under the same subkeys -under HKEY_LOCAL_SYSTEM. +under HKEY_LOCAL_SYSTEM. The user mount table takes precedence over +the system-wide table if a path is mounted in both. This includes the +setting of the cygdrive prefix. Since Windows uses drive letters instead of a single filesystem root, the POSIX root / must be set to a directory --------------6B5A1B0841FD6F17753596DE Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --------------6B5A1B0841FD6F17753596DE--