Re: [bulk] - R: /dev/ttys* under cygwin problem
Eric Blake wrote: On 09/22/2010 03:02 PM, Daniel Barclay wrote: ... Again, why does Cygwin's (virtual) file system _not_ include those devices (when listing /dev)? (Why doesn't it do it more like Linux's /proc, etc., which gives a consistent view and which tells you what's available without your having to look elsewhere?) ...Also, unlike Linux, where the kernel knows what devices are present, a cygwin implementation would have to make a lot of syscalls querying whether each potential device is available. Oh--so Cygwin would have to query Windows for the current set of devices (which can change over time (right?)) each time the /dev directory was listed (since it doesn't maintain the net device list itself as a kernel would)?)? One other drawback - ... part of the implementation battle is figuring out how to merge an existing directory containing user-added symlinks or device names, in parallel with the virtual devices supported by the virtual FS magic compiled into cygwin. Okay, yeah, I see how that could be tricky. Wait a minute--doesn't Cygwin have to do that anyway? If the user adds a symlink or device with the same name as that of a virtual device provided by Cygwin, and then refers to that pathname (/dev/something), haven't the Cygwin designers already had to decide what happens (whether the user gets the virtual device or, say, gets the target of the symlink)? If so, does listing the /dev directory really add some additional consideration? Actually, is your last sentence above actually true? Looking at the device-creation script you pointed me to, I wonder: How do you (e.g., a script) determine which devices of a given type exist (e.g., sda1, sda2, sda3, ...)? (Do you have to try to open each possible device and check whether there's an error?) The script creates every known name, whether or not it actually exists as a device at the current moment, which is in itself a bit misleading. But it has to, because of devices which can be added and removed on the fly, whereas the script creating the placeholder files is only run once. Yes, I got that part. What I was wondering was what would be the recommended way to determine which devices really existed. Would it be trying to open the device and checking for some no such device error? Daniel -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
AW: [bulk] - R: /dev/ttys* under cygwin problem
Hi, Von: Marco Atzeri [] Gesendet: Mittwoch, 22. September 2010 15:26 An Betreff: [bulk] - R: /dev/ttys* under cygwin problem --- Mer 22/9/10, DEWI - N. Zacharias ha scritto: Hi all, as mentinoned in http://cygwin.com/cygwin-ug-net/using-cygwinenv.html i have set CGWIN to tty . But there are no tty devices under /dev. $ echo $CYGWIN tty So what is wrong ?? Have a nice time Norbert the TTY is not really needed anymore, see hand of the paragraph It should not be set when using other terminals (i.e., mintty or xterm). About the other question, the /dev directory is a bit unusal, as it is populated by element that are usually not visible with $ls /dev see POSIX name on http://www.cygwin.com/cygwin-ug-net/using-specialnames.htm This link do not work for me. try $ ls -l /dev/tty crw--w--w- 1 xxx 5, 0 2010-09-22 15:21 /dev/tty $ ls -l /dev/tty1 and so on. Ok : ls -al /dev/ttyS4 crw-rw-rw- 1 n-zacharias Kein 117, 4 22. Sep 17:28 /dev/ttyS4 but stty -F /dev/ttyS4 ospeed 115200 stty: /dev/ttyS4: Permission denied Again, whats going wrong Thanks Norbert -- Dipl. Phys. Norbert Zacharias Wind Measurements Power Curve Measurements DEWI GmbH Ebertstrasse 96 26382 Wilhelmshaven Germany Tel.: +49 4421 4808 876 Fax:+49 4421 4808 843 Email: n.zachar...@dewi.de Home: http://www.dewi.de DEWI GmbH - Deutsches Windenergie-Institut, Wilhelmshaven Commercial Register No.: Amtsgericht Oldenburg, HRB 130241 Managing Director: Jens Peter Molly Chairman of the supervisory board: Ministerialrat Dr. Niels Kämpny P Please consider the environment before printing this email. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
RE: [bulk] - R: /dev/ttys* under cygwin problem
DEWI - N. Zacharias sent the following at Wednesday, September 22, 2010 11:36 AM as mentinoned in http://cygwin.com/cygwin-ug-net/using-cygwinenv.html i have set CGWIN to tty . see POSIX name on http://www.cygwin.com/cygwin-ug-net/using-specialnames.htm This link do not work for me. The final l was left off. http://www.cygwin.com/cygwin-ug-net/using-specialnames.html To go there directly: http://www.cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-posixdevices - Barry Disclaimer: Statements made herein are not made on behalf of NIAID. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
R: AW: [bulk] - R: /dev/ttys* under cygwin problem
--- Mer 22/9/10, DEWI - N. Zacharias ha scritto: but stty -F /dev/ttyS4 ospeed 115200 stty: /dev/ttyS4: Permission denied Again, whats going wrong Thanks Norbert Are you the administrator ? On my PC it works $ stty -F /dev/ttyS0 ospeed 64000 $ stty -F /dev/ttyS0 speed 115200 baud; line = 0; intr = undef; quit = undef; erase = undef; kill = undef; eof = undef; swtch = undef; susp = undef; rprnt = undef; werase = undef; lnext = undef; flush = undef; min = 0; time = 0; -cread -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke what about http://cygwin.com/problems.html ?? Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: [bulk] - R: /dev/ttys* under cygwin problem
Buchbinder, Barry (NIH/NIAID) [E] wrote: ... To go there directly: http://www.cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-posixdevices Regarding where that page says: These devices cannot be seen with the command ls /dev/ ... I've wondered about that--why aren't those special files listed in a directory listing? (The Cygwin DLL makes those device files appear when they are referred to by full pathname; why doesn't it also make them appear in the containing directory's listing?) Daniel -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: [bulk] - R: /dev/ttys* under cygwin problem
On 9/22/2010 1:29 PM, Daniel Barclay wrote: Buchbinder, Barry (NIH/NIAID) [E] wrote: ... To go there directly: http://www.cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-posixdevices Regarding where that page says: These devices cannot be seen with the command ls /dev/ ... I've wondered about that--why aren't those special files listed in a directory listing? (The Cygwin DLL makes those device files appear when they are referred to by full pathname; why doesn't it also make them appear in the containing directory's listing?) They are implemented in a virtual file system. It is not necessary that there be placeholders in the file system for them to work. But if you prefer that, you can add them. This is why the documentation has a link to the script to create the devices in the file system: http://cygwin.com/ml/cygwin/2004-03/txt00028.txt -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: [bulk] - R: /dev/ttys* under cygwin problem
Larry Hall (Cygwin) wrote: On 9/22/2010 1:29 PM, Daniel Barclay wrote: Buchbinder, Barry (NIH/NIAID) [E] wrote: ... To go there directly: http://www.cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-posixdevices Regarding where that page says: These devices cannot be seen with the command ls /dev/ ... I've wondered about that--why aren't those special files listed in a directory listing? (The Cygwin DLL makes those device files appear when they are referred to by full pathname; why doesn't it also make them appear in the containing directory's listing?) They are implemented in a virtual file system. It is not necessary that there be placeholders in the file system for them to work. But if they were emulated/simulated _consistently_, one could see which devices were available by simply listing /dev instead of having to re-find the documentation. Again, why does Cygwin's (virtual) file system _not_ include those devices (when listing /dev)? (Why doesn't it do it more like Linux's /proc, etc., which gives a consistent view and which tells you what's available without your having to look elsewhere?) Actually, is your last sentence above actually true? Looking at the device-creation script you pointed me to, I wonder: How do you (e.g., a script) determine which devices of a given type exist (e.g., sda1, sda2, sda3, ...)? (Do you have to try to open each possible device and check whether there's an error?) But if you prefer that, you can add them. This is why the documentation has a link to the script to create the devices in the file system: http://cygwin.com/ml/cygwin/2004-03/txt00028.txt How do you keep things synchronized? The script you pointed me to appears to be over six years old. I doubt that it matches the code inside Cygwin 1.7. Daniel -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: [bulk] - R: /dev/ttys* under cygwin problem
On 09/22/2010 03:02 PM, Daniel Barclay wrote: They are implemented in a virtual file system. It is not necessary that there be placeholders in the file system for them to work. But if they were emulated/simulated _consistently_, one could see which devices were available by simply listing /dev instead of having to re-find the documentation. http://cygwin.com/acronyms/#PTC Again, why does Cygwin's (virtual) file system _not_ include those devices (when listing /dev)? (Why doesn't it do it more like Linux's /proc, etc., which gives a consistent view and which tells you what's available without your having to look elsewhere?) Because no one has taken the time to write the code. Also, unlike Linux, where the kernel knows what devices are present, a cygwin implementation would have to make a lot of syscalls querying whether each potential device is available. One other drawback - cygwin would like things like /dev/stdin to work as a symlink to /proc/self/0, but that is a normal symlink in today's cygwin implementation, and not an entry in the virtual file system. Therefore, part of the implementation battle is figuring out how to merge an existing directory containing user-added symlinks or device names, in parallel with the virtual devices supported by the virtual FS magic compiled into cygwin. Actually, is your last sentence above actually true? Looking at the device-creation script you pointed me to, I wonder: How do you (e.g., a script) determine which devices of a given type exist (e.g., sda1, sda2, sda3, ...)? (Do you have to try to open each possible device and check whether there's an error?) The script creates every known name, whether or not it actually exists as a device at the current moment, which is in itself a bit misleading. But it has to, because of devices which can be added and removed on the fly, whereas the script creating the placeholder files is only run once. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple