delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/09/16/06:15:03

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: New winsup snapshot 9/14/98
16 Sep 1998 06:15:03 -0700 :
Message-ID: <19980916090839.A7497.cygnus.cygwin32.developers@cygnus.com>
References: <19980914141243 DOT 37248 AT cygnus DOT com>
Mime-Version: 1.0
To: Corinna Vinschen <corinna DOT vinschen AT cityweb DOT de>,
cygwin32-developers AT cygnus DOT com

On Wed, Sep 16, 1998 at 02:42:07PM +0200, Corinna Vinschen wrote:
>Hello,
>
>I have figured out my problem in compiling winsup, it works now,
>but with newlib-980530.
>
>In the new file 'path.cc' I have seen somthing, which is IMHO
>disappointing.
>My changes to winsup-980812 contain code, which makes it
>possible, to use any device name, beginning with '/dev/', for
>raw devices, such as tape, floppy and disk. It's simple, if one
>uses the native windows device names for the decision.
>Now I see, that the method mount_info::conv_to_win32_path
>calls the function win32_device_name before any other code and
>this function lets one use only static device names, which doesn't
>represent the possibilities of WinNT. There's neither room for
>norewind tapes nor for the distinction between raw disk
>partitions '\\.\X:' and raw physical drives '\\.\harddriveN'.
>Now I'm not sure, how to integrate this changes from my code,
>into the new winsup.
>
>I think, the following way would be better:
>1. Method mount_info::conv_to_win32_path()
>   - Call win32_device_name() with special third parameter.
>
>2. Function get_device_number():
>    - Third parameter, to decide, from whom it's called.
>    - If called by 'conv_win32_path()': Returns device names
>      only for non mass storage devices (e.g. tty).
>    - else returns device number, but uses WinNT path, to
>      generate wellformed major and minor numbers.
>
>Other opinions?
>If not, I would reimplement this in the above manner.

I'll consider such a change, but wouldn't it be a lot less work to
just modify:

    hinfo::build_fhandler (int fd, const char *name, HANDLE handle)

in the condition where get_device_number returns FH_BAD?

Eventually, I'd like to see a scheme in cygwin where the /dev directory
actually exists and is populated with devices on your system, just like
in UNIX.  Then you can call your tape /dev/foobar and it won't matter.

-- 
cgf AT cygnus DOT com
http://www.cygnus.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019