[ntp:hackers] /dev/ntpsymlink1 -> COM1: for ntpd on Windows

Terje Mathisen terje at tmsw.no
Mon Jun 1 07:03:02 UTC 2009


Hal Murray wrote:
> david-taylor at blueyonder.co.uk said:
>> Yes, but supposing that device or symlink /doesn't/ exist, that's what
>> I  meant.  When the "open" fails.  As I said: "Perhaps the behaviour
>> should  be the same to keep the documentation consistent and
>> OS-independent?" 
> 
> I believe the Linux version gives a sensible error message if it can't open 
> the appropriate file.

The *ix response to to log an error message, something like 'could not 
open /dev/gps1', and then terminate.

> 
> Trying to keep the error messages consistent seems like asking for troubles.  
> What is a *nix user going to do when it says "Can't open COM7"?

If we remap the device names under Windows, then the same error log 
message would become 'could not open COM1:' (or \\\\.\\COMn to handle 
arbitrary numbers).

I.e. no change to the logging code at all.

Terje

-- 
- <Terje at tmsw.no>
"almost all programming can be viewed as an exercise in caching"


More information about the hackers mailing list