[fpc-pascal] Re: cannot read /sys/class/net/eth1/address even as root user on linux

Lukasz Sokol el.es.cr at gmail.com
Fri Dec 6 17:57:56 CET 2013


On 05/12/13 14:42, Dennis Poon wrote:
> 
>> While your method should work if that file actually exists, you
>> probably want to use libudev for enumerating and getting device
>> information from sysfs.  libudev will also enable you to get
>> hotplug notification.
>> 
>> 
> For your your reply. The fact is: 1)  my linux distro starts with
> eth1 not eth0. Strange. I know. 2) my question was, why simply 'cat'
> works but I cannot read it from fpc usign Tfilestream or readlin(F,
> S);
> 
> Since I don't have time to invest in a portable solution, I am happy
> already if it works on my particular xubuntu distro.
> 
> Dennis

Try installing strace and use it :

 strace <your executable name> 

from command line/terminal ?

-L.




More information about the fpc-pascal mailing list