Subject: Re: [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd)
From: Jason Tishler <[email-masked]>
To: Earnie Boyd <[email-masked]>
Cc: [email-masked]
Date: Tue, 19 Sep 2000 15:55:27 -0400

Earnie,

On Tue, Sep 19, 2000 at 12:18:00PM -0700, Earnie Boyd wrote:
> --- Jason Tishler <[email-masked]> wrote:
> -8<-
> >  static void
> >  read_mount_table ()
> >  {
> > @@ -83,7 +137,7 @@ read_mount_table ()
> >        windir[2] = 0;
> >        root_dir = concat (windir, "\\cygwin", 0);
> >        root_text = IDC_ROOT_BINARY;
> > -      root_scope = IDC_ROOT_USER;
> > +      root_scope = (is_admin()) ? IDC_ROOT_SYSTEM : IDC_ROOT_USER;
> >      }
> >  }
> >  
> 
> Of course you did test this patch, correct?

Yes.  I would not have submit it if I didn't.

> What happens if I with
> administrator privileges have my mounts in IDC_ROOT_USER and not
> IDC_ROOT_SYSTEM?  Shouldn't it default to what is already setup in the mount
> tables?

It does.  You were mislead into an erroneous conclusion due to the limited
context provided by the patch.  Try the following:

static void
read_mount_table ()
{
  int istext;
  int issystem;
  root_dir = find_root_mount (&istext, &issystem);
  if (root_dir)
    {
      if (istext)
        root_text = IDC_ROOT_TEXT;
      else
        root_text = IDC_ROOT_BINARY;
      if (issystem)
        root_scope = IDC_ROOT_SYSTEM;
      else
        root_scope = IDC_ROOT_USER;
    }
  else
    {
      char windir[_MAX_PATH];
      GetWindowsDirectory (windir, sizeof (windir));
      windir[2] = 0;
      root_dir = concat (windir, "\\cygwin", 0);
      root_text = IDC_ROOT_BINARY;
      root_scope = (is_admin()) ? IDC_ROOT_SYSTEM : IDC_ROOT_USER;
    }
}

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: [email-masked]
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Want to unsubscribe from this list?
Send a message to [email-masked]