public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: mount's --change-cygdrive-prefix option (was Re: text / binary mounts  (sorry))
@ 2000-06-06 14:01 Earnie Boyd
  2000-06-06 14:17 ` Chris Faylor
  0 siblings, 1 reply; 5+ messages in thread
From: Earnie Boyd @ 2000-06-06 14:01 UTC (permalink / raw)
  To: Jason Tishler, Cygwin

--- Jason Tishler <Jason.Tishler@dothill.com> wrote:
-8<-
> The tougher issue is the desired semantics when reading the cygdrive
> path prefix from the registry.  That is, what should be the
> functionality of read_cygdrive_info_from_registry ():
> 
> 1. Should it search for the system path prefix and if not found,
> then search for the user path prefix?  Or, should it search for the
> user path prefix and then the system?
> 
> 2. When no path prefixes are found should it default the system path
> prefix?  Or, should it default the user path prefix (as it currently
> does)?
> 
> Any thoughts?
> 

The data supplied by the user in the user path prefix should override anything
set in the system prefix and if the user path prefix doesn't exist the system
path prefix should be used.  If neither system or user prefixes exist already
then the initialization should continue to create the user path prefix.

Regards,

=====
---
   Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
            __Cygwin: POSIX on Windows__
Cygwin Newbies: < http://www.freeyellow.com/members5/gw32/index.html >
           __Minimalist GNU for Windows__
  Mingw32 List: < http://www.egroups.com/group/mingw32/ >
    Mingw Home: < http://www.mingw.org/ >

__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mount's --change-cygdrive-prefix option (was Re: text / binary mounts  (sorry))
  2000-06-06 14:01 mount's --change-cygdrive-prefix option (was Re: text / binary mounts (sorry)) Earnie Boyd
@ 2000-06-06 14:17 ` Chris Faylor
  2000-06-07  7:37   ` Jason Tishler
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Faylor @ 2000-06-06 14:17 UTC (permalink / raw)
  To: Cygwin

On Tue, Jun 06, 2000 at 02:01:02PM -0700, Earnie Boyd wrote:
>--- Jason Tishler <Jason.Tishler@dothill.com> wrote:
>-8<-
>> The tougher issue is the desired semantics when reading the cygdrive
>> path prefix from the registry.  That is, what should be the
>> functionality of read_cygdrive_info_from_registry ():
>> 
>> 1. Should it search for the system path prefix and if not found,
>> then search for the user path prefix?  Or, should it search for the
>> user path prefix and then the system?
>> 
>> 2. When no path prefixes are found should it default the system path
>> prefix?  Or, should it default the user path prefix (as it currently
>> does)?
>> 
>> Any thoughts?
>
>The data supplied by the user in the user path prefix should override anything
>set in the system prefix and if the user path prefix doesn't exist the system
>path prefix should be used.  If neither system or user prefixes exist already
>then the initialization should continue to create the user path prefix.

That's correct.  In other words, the path prefix semantics should mirror the
regular mount semantics.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mount's --change-cygdrive-prefix option (was Re: text / binary mounts  (sorry))
  2000-06-06 14:17 ` Chris Faylor
@ 2000-06-07  7:37   ` Jason Tishler
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Tishler @ 2000-06-07  7:37 UTC (permalink / raw)
  To: cygwin

I few spec level issues before I continue...

There is currently no way to remove the user or system path prefix
(except via the registry).  Hence, once the user path prefix is set,
the system path prefix can never have any effect (unless one hacks the
registry).  How should this missing functionality be realized?

1. Add a "--remove-cygdrive-prefix" to mount.
2. Add a "--remove-cygdrive-prefix" to umount.
3. Enhance mount's "--change-cygdrive-prefix" to accept a missing
   posixpath that indicates the appropriate path prefix should be
   removed.

Additionally, there is currently no way to display the current value
for the user and system path prefixes (except via the registry).
Should this functionality be added to the mount display?

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corporation         Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mount's --change-cygdrive-prefix option (was Re: text / binary mounts  (sorry))
@ 2000-06-07 18:38 Bob McGowan
  0 siblings, 0 replies; 5+ messages in thread
From: Bob McGowan @ 2000-06-07 18:38 UTC (permalink / raw)
  To: Cygwin

I intended this for the list but apparently hit the reply button rather
than reply-all...

-------- Original Message --------
Subject: Re: mount's --change-cygdrive-prefix option (was Re: text /
binary mounts  (sorry))
Date: Wed, 07 Jun 2000 10:04:37 -0700
From: Bob McGowan <rmcgowan@veritas.com>
Organization: VERITAS Software
To: Jason Tishler <Jason.Tishler@dothill.com>
References: < 20000606210102.24531.qmail@web124.yahoomail.com >
< 20000606171751.A30312@cygnus.com > < 393E5E03.C89FE8E0@dothill.com >

Jason Tishler wrote:
> 
> I few spec level issues before I continue...
> 
> There is currently no way to remove the user or system path prefix
> (except via the registry).  Hence, once the user path prefix is set,
> the system path prefix can never have any effect (unless one hacks the
> registry).  How should this missing functionality be realized?
> 
> 1. Add a "--remove-cygdrive-prefix" to mount.
> 2. Add a "--remove-cygdrive-prefix" to umount.

I think umount is the best place to do this.  It should default to
processing user entries and only do system entries if the -s option is
used (to match current functionality).

> 3. Enhance mount's "--change-cygdrive-prefix" to accept a missing
>    posixpath that indicates the appropriate path prefix should be
>    removed.
> 
> Additionally, there is currently no way to display the current value
> for the user and system path prefixes (except via the registry).
> Should this functionality be added to the mount display?

I think this is important if you are going to provide a "umount" feature
as above.  It is useful to display the current state before trying to
modify it.  Maybe the mount command should have a specific option to do
so, perhaps "--show-cygdrive-prefix"?  But including the cygdrive-prefix
info as part of the default output works too.  Either way, the
information is useful. 

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* mount's --change-cygdrive-prefix option (was Re: text / binary mounts (sorry))
@ 2000-06-06 13:43 Jason Tishler
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Tishler @ 2000-06-06 13:43 UTC (permalink / raw)
  To: Cygwin

Chris Faylor wrote:
> Jason Tishler wrote:
> >Is this a documentation or programming bug?
> 
> Dunno.  How about checking out the sources and finding out?

This a programming bug or by design.

I tracked the issue down to winsup/cygwin/path.cc:

int
mount_info::write_cygdrive_info_to_registry (const char *cygdrive_prefix, unsigned flags)
{
  /* reg_key for user mounts in HKEY_CURRENT_USER. */
  reg_key r;
  ...
}

The reg_key constructor above

    reg_key(REGSAM access = KEY_ALL_ACCESS)

was designed to construct an object that only operates on
HKEY_CURRENT_USER.

It is easy to change write_cygdrive_info_to_registry () to check flags
and write to HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER as appropriate.  I
have already implemented this.

The tougher issue is the desired semantics when reading the cygdrive
path prefix from the registry.  That is, what should be the
functionality of read_cygdrive_info_from_registry ():

1. Should it search for the system path prefix and if not found,
then search for the user path prefix?  Or, should it search for the
user path prefix and then the system?

2. When no path prefixes are found should it default the system path
prefix?  Or, should it default the user path prefix (as it currently
does)?

Any thoughts?

I am willing to implement the consensus and supply patches.

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corporation         Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-06-07 18:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-06 14:01 mount's --change-cygdrive-prefix option (was Re: text / binary mounts (sorry)) Earnie Boyd
2000-06-06 14:17 ` Chris Faylor
2000-06-07  7:37   ` Jason Tishler
  -- strict thread matches above, loose matches on Subject: below --
2000-06-07 18:38 Bob McGowan
2000-06-06 13:43 Jason Tishler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).