public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [?@yahoo.com: Found problem of floppy drive acces]
@ 2004-12-17 17:23 Eric Schweitz
  2004-12-17 17:25 ` Dave Korn
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schweitz @ 2004-12-17 17:23 UTC (permalink / raw)
  To: cygwin

----- Forwarded message from Vijay Jaswal -----

Hello again,

I found where the floppy drive was being access and it's definately a
problem of Cygwin.

/etc/profile is invoked when "bash --login" is used, which is used in the 
cygwin.bat file.  Without the --login (or -l) option, /etc/profile is not
touched and the floppy drives aren't either.

In /etc/profile, the following block is the problem; search for "profile.d".

> # Run all of the profile.d scripts
> # Note that these are supplied by separate packages
> # Ascending alphanumerical order enforced
> if [ -d "/etc/profile.d" ]; then
> 	while read f; do
> 		if [ -f "${f}" ]; then
> 			. "${f}"
> 		fi
> 	done <<- EOF
> 	`/bin/find /etc/profile.d -iname '*.sh' -type f | sort`
> 	EOF
> fi

The find command is invoked, and it is hitting the floppy, no matter what
options are supplied: "/bin/find --version" and "/bin/find --help" both 
hit the floppy drive, which is clearly a blunder.

BTW, /bin/df is also screwed up, but not as badly:
"df ." hits the floppy, even the current directory is a harddrive,
but "df --version" and "df --help" are fine and not brain-dead.

So, there are bugs in a few places, but /bin/find is definately one of
them. BTW, could you inform the mailing list about this (without using 
my email address)?

-vijay

----- End forwarded message -----

--
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/

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

* RE: [?@yahoo.com: Found problem of floppy drive acces]
  2004-12-17 17:23 [?@yahoo.com: Found problem of floppy drive acces] Eric Schweitz
@ 2004-12-17 17:25 ` Dave Korn
  2004-12-17 17:45   ` Dave Korn
  2005-01-02 18:44   ` Tom Hall
  0 siblings, 2 replies; 6+ messages in thread
From: Dave Korn @ 2004-12-17 17:25 UTC (permalink / raw)
  To: cygwin

> -----Original Message-----
> From: cygwin-owner On Behalf Of Eric Schweitz
> Sent: 17 December 2004 17:23

> ----- Forwarded message from Vijay Jaswal -----
> 
> Hello again,
> 
> I found where the floppy drive was being access and it's definately a
> problem of Cygwin.


  No it is not.  It is WINDOWS that is accessing the drive and there is
absolutely nothing cygwin can do to either cause or prevent this.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


--
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/

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

* RE: [?@yahoo.com: Found problem of floppy drive acces]
  2004-12-17 17:25 ` Dave Korn
@ 2004-12-17 17:45   ` Dave Korn
  2004-12-18  2:43     ` Gary R. Van Sickle
  2005-01-02 18:44   ` Tom Hall
  1 sibling, 1 reply; 6+ messages in thread
From: Dave Korn @ 2004-12-17 17:45 UTC (permalink / raw)
  To: cygwin

> -----Original Message-----
> From: cygwin-owner On Behalf Of Dave Korn
> Sent: 17 December 2004 17:24

> > -----Original Message-----
> > From: cygwin-owner On Behalf Of Eric Schweitz
> > Sent: 17 December 2004 17:23
> 
> > ----- Forwarded message from Vijay Jaswal -----
> > 
> > Hello again,
> > 
> > I found where the floppy drive was being access and it's 
> > definately a problem of Cygwin.
> 
> 
>   No it is not.  It is WINDOWS that is accessing the drive and there is
> absolutely nothing cygwin can do to either cause or prevent this.

  Actually, that may not be strictly true.  Let me elaborate:

  The reason the floppy is being accessed is because some win32 api function or
other wants to check its status.  It is quite likely some function related to
drive or file properties or information, and it probably scans all the known
drive letters despite that being superfluous for most of them.

  It's not just cygwin, it's absolutely definitely part of windows.  For quite
some time my home PC used to always scan the floppy whenever I opened the "My
computer" window.  And if there's an A:\ path in the File...Open MRU list in
wordpad or similar, it will scan the floppy when it starts up.  So this is
natural windoze behaviour in lots of circumstances.

  So it is conceivable that this is a consequence of some system call that
cygwin makes to get drive info and it is also conceivable that there might be
some other way cygwin could get the same info using some other system call that
doesn't decide to scan the floppy.

  But it's also conceivable that there's no way to avoid this side-effect, and
it's certainly not a cygwin *bug* that it uses a bog-standard win32 api function
in the way it is supposed to be used and for the purpose it is supposed to be
used for; it is a *windows* bug that it superfluously scans the floppy.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


--
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/

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

* RE: [?@yahoo.com: Found problem of floppy drive acces]
  2004-12-17 17:45   ` Dave Korn
@ 2004-12-18  2:43     ` Gary R. Van Sickle
  0 siblings, 0 replies; 6+ messages in thread
From: Gary R. Van Sickle @ 2004-12-18  2:43 UTC (permalink / raw)
  To: cygwin

[snip]
> > > Hello again,
> > > 
> > > I found where the floppy drive was being access and it's 
> definately 
> > > a problem of Cygwin.
> > 
> > 
> >   No it is not.  It is WINDOWS that is accessing the drive 
> and there 
> > is absolutely nothing cygwin can do to either cause or prevent this.
> 
>   Actually, that may not be strictly true.  Let me elaborate:
> 
>   The reason the floppy is being accessed is because some 
> win32 api function or other wants to check its status.  It is 
> quite likely some function related to drive or file 
> properties or information, and it probably scans all the 
> known drive letters despite that being superfluous for most of them.
> 
>   It's not just cygwin, it's absolutely definitely part of 
> windows.  For quite some time my home PC used to always scan 
> the floppy whenever I opened the "My computer" window.

???  Doesn't it still?  I thought it always has and always will because MS
refuses to keep track of media properly....  Hmm, seems like on this fancy
Dell of mine it doesn't... Did MS finally fix a bug that affects
people?!??!?!

>  And 
> if there's an A:\ path in the File...Open MRU list in wordpad 
> or similar, it will scan the floppy when it starts up.  So 
> this is natural windoze behaviour in lots of circumstances.
> 

That's Wordpad telling Windows to hit the floppy.  Just because a menu has a
bunch of file paths in it doesn't result in any disk being hit.

>   So it is conceivable that this is a consequence of some 
> system call that cygwin makes to get drive info and it is 
> also conceivable that there might be some other way cygwin 
> could get the same info using some other system call that 
> doesn't decide to scan the floppy.
> 
>   But it's also conceivable that there's no way to avoid this 
> side-effect,

No, it isn't, since Cygwin did avoid this somehow until recently.  For
suitable definitions of "somehow" and "recently".

> and it's certainly not a cygwin *bug* that it 
> uses a bog-standard win32 api function in the way it is 
> supposed to be used and for the purpose it is supposed to be 
> used for; it is a *windows* bug that it superfluously scans 
> the floppy.

Well:

1.  You've entered the realm of wild speculation.  For all anybody in this
discussion knows, Cygwin could have been changed recently to specifically
and superfluously hit the floppy.
2.  Since we're speculating, what probably happened is that a call got
added/changed somewhere in the bowels of cygwin1.dll to GetAllDriveLetters()
(or whatever that one's called) or one of its ilk, and it hits the floppy
for reasons known only to Microsoft instead of properly supporting
change-line.  Pretty much what you speculate above actually.
3.  The Windows bug is not that it superfluously hits the floppy.  It's
that, for an operating system which grew out of a purported Disk Operating
System,  the one thing it handles worst above all others is mass storage.
Apparently MS puts the new grads and the burnouts on the filesystem team.
How else can you explain a filesystem refusing to mount a USB disk drive
because it can't write to it, even though the drive properly reports
"Read-Only" in the two appropriate structures, properly fails the
WriteSector commands it shouldn't be receiving in the first place, and
properly clears the resulting proper errors when told to do so by Windows?
Yeah, the story you just read is true.  Count your blessings if the worst MS
does to you is hit your floppy drive once in a while.

PS: I thought you were Korn-shell-guy. ;-)

-- 
Gary R. Van Sickle
 


--
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/

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

* Re: [?@yahoo.com: Found problem of floppy drive acces]
  2004-12-17 17:25 ` Dave Korn
  2004-12-17 17:45   ` Dave Korn
@ 2005-01-02 18:44   ` Tom Hall
  2005-01-02 21:53     ` Christopher Faylor
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Hall @ 2005-01-02 18:44 UTC (permalink / raw)
  To: cygwin

Since this problem appears to be the result of a bug in Windows, and I
don't use my floppy too much, I've come up with a Windows-level hack
that makes the problem more tolerable for me on Windows 98 until the
proper Cygwin solution is found.  This "works" for both find and df.

Add this line somewhere above where bash is called in CYGWIN.BAT :

   subst a: c:

When I really want to use the floppy:
   
   subst a: /d
   [use the floppy]
   subst a: c:

This assumes that c:\windows\command is in my path.


--
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/

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

* Re: [?@yahoo.com: Found problem of floppy drive acces]
  2005-01-02 18:44   ` Tom Hall
@ 2005-01-02 21:53     ` Christopher Faylor
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Faylor @ 2005-01-02 21:53 UTC (permalink / raw)
  To: cygwin

On Sun, Jan 02, 2005 at 11:45:19AM -0700, Tom Hall wrote:
>Since this problem appears to be the result of a bug in Windows, and I
>don't use my floppy too much, I've come up with a Windows-level hack
>that makes the problem more tolerable for me on Windows 98 until the
>proper Cygwin solution is found.  This "works" for both find and df.
>
>Add this line somewhere above where bash is called in CYGWIN.BAT :
>
>   subst a: c:
>
>When I really want to use the floppy:
>   
>   subst a: /d
>   [use the floppy]
>   subst a: c:
>
>This assumes that c:\windows\command is in my path.

Of course, the other option is just to update your findutils...

cgf

--
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/

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

end of thread, other threads:[~2005-01-02 21:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-17 17:23 [?@yahoo.com: Found problem of floppy drive acces] Eric Schweitz
2004-12-17 17:25 ` Dave Korn
2004-12-17 17:45   ` Dave Korn
2004-12-18  2:43     ` Gary R. Van Sickle
2005-01-02 18:44   ` Tom Hall
2005-01-02 21:53     ` Christopher Faylor

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).