Re: dd of=/dev/port.

From: amos_at_nonexisting.hamakor.org.il
Date: Thu 12 Aug 2004 - 09:28:19 IDT


Ez-Aton wrote:

> dd is meant to be used with block devices, not with character devices.
> To hijack character devices, you can simply cat them to somewhere.

But dd has the relatively singular option (apart from perl, I guess) of
letting its user
to control an lseek(2) call from command line, which is what Shaul
exploited "as
designed" (in the answer to his own question he used "seek" which solved
his problem).

Cheers,

--Amos

>
> Ez.
>
> amos_at_amos.mailshell.com wrote:
>
>> Shaul Karl wrote:
>>
>>> Is the following expected?
>>>
>>> # printf "\xa2" | dd of=/dev/port bs=1 count=1 skip=675
>>> 0+0 records in
>>> 0+0 records out
>>> 0 bytes transferred in 0.001999 seconds (0 bytes/sec)
>>> # printf "$?\n"
>>> 0
>>>
>>> I run it as root. Why there were 0 bytes transferred and still it is
>>> a 0 return code? Is there any significance in the fact that there were
>>

=================================================================
To unsubscribe, send mail to linux-il-request_at_linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request_at_linux.org.il



This archive was generated by hypermail 2.1.7 : Thu 12 Aug 2004 - 09:40:03 IDT