public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jason Tishler <Jason.Tishler@dothill.com>
To: Cygwin <cygwin@sourceware.cygnus.com>
Subject: mount's --change-cygdrive-prefix option (was Re: text / binary mounts (sorry))
Date: Tue, 06 Jun 2000 13:43:00 -0000	[thread overview]
Message-ID: <393D6281.D37CEB1A@dothill.com> (raw)

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

             reply	other threads:[~2000-06-06 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-06 13:43 Jason Tishler [this message]
2000-06-06 14:01 Earnie Boyd
2000-06-06 14:17 ` Chris Faylor
2000-06-07  7:37   ` Jason Tishler
2000-06-07 18:38 Bob McGowan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=393D6281.D37CEB1A@dothill.com \
    --to=jason.tishler@dothill.com \
    --cc=cygwin@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).