-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Content-ID: <alpine.LSU.2.21.1803071417330.18075@minas-tirith.valinor> El 2018-03-07 a las 12:52 -0000, Wols Lists escribió:
On 07/03/18 09:05, Peter Suetterlin wrote:
James Knott wrote:
On 03/06/2018 11:56 AM, Per Jessen wrote:
>> Any ideas why it's not working? I'm no expert, but maybe because ttyS0 is a character device, not a file? Just guessing wildly.
I thought everything on *nix was supposed to be a file. Yes, my thought, too.
Except when it's not. Like networking, for example.
But files can be both character (sequential access) or block (direct access). So ttyS0 is a sequential (character) file, while sda is a block (direct access) file.
Confussion here. Device files, typically inside /dev/*, can be either character mode or block mode: crw-rw----+ 1 root audio 14, 4 Mar 4 01:46 audio crw------- 1 root root 10, 235 Mar 4 01:46 autofs crw-rw---- 1 root dialout 4, 64 Mar 4 01:46 ttyS0 crw-rw---- 1 root dialout 4, 65 Mar 4 01:46 ttyS1 brw-rw---- 1 root disk 8, 0 Mar 4 01:46 sda brw-rw---- 1 root disk 8, 1 Mar 4 01:46 sda1 brw-rw---- 1 root disk 8, 2 Mar 4 01:46 sda2 ^... Regular files are just files. It refers, I understand, to the capabilities they support. A serial port outputs one character at a time, can not seek... I don't know the exact list but you get the idea. - -- Cheers Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREIAAYFAlqf5w4ACgkQja8UbcUWM1y/BwD/Qy3kCiZglPSABECCBAjowKp+ QKFdO2y7KHT9wE4BdvkA/1SXIrbiBGQjA4e0IMLvSyV498GmY95tnCSGhZeZIhFd =MY1u -----END PGP SIGNATURE-----