scp of sysfs file repeats data

Craig McQueen craig.mcqueen at innerrange.com
Tue Jun 23 10:23:58 AWST 2015


I tried doing scp of a sysfs attribute. I found that it duplicated the data, as well as adding extra NUL bytes. E.g.:

# scp /sys/class/net/eth0/address localhost:
# cat ~/address
d0:39:72:53:ef:0e
d0:39:72:53:ef:0e
# hexdump -C ~/address
00000000  64 30 3a 33 39 3a 37 32  3a 35 33 3a 65 66 3a 30  |d0:39:72:53:ef:0|
00000010  65 0a 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |e...............|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000800  64 30 3a 33 39 3a 37 32  3a 35 33 3a 65 66 3a 30  |d0:39:72:53:ef:0|
00000810  65 0a 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |e...............|
00000820  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000

Does that seem normal?

-- 
Craig McQueen




More information about the Dropbear mailing list