Can't open character-special file

Vance Shipley vances@REDACTED
Mon Jul 28 15:10:39 CEST 2003


1> file:open("adc@REDACTED,9e:00temperature", [read, raw, binary]).
{error,eisdir}

This is not a directory but a character-special file:

cr--r--r--   1 root     sys      163,256 Jul 27 00:54 adc@REDACTED,9e:00temperature

2> file:read_file_info("adc@REDACTED,9e:00temperature,translated").
{ok,{file_info,2147483647,
               device,
               read,
               {{2003,7,27},{0,54,37}},
               {{2003,7,27},{0,54,37}},
               {{2003,7,27},{0,54,37}},
               8484,
               1,
               8388608,
               42729728,
               12699,
               0,
               3}}

Is there any way around this?  

Am I asking for something unreasonable?

I just want to be able to open these files and read a single byte:

3> file:read(IoDevice, 1).


In case you're wondering this is how you access the current 
temperauture readings from the thermistor on board a SUN OEM
processor board (e.g. CP1500).

	-Vance

Vance Shipley
Motivity Telecom Inc.
+1 519 240 3684
vances@REDACTED



More information about the erlang-questions mailing list