Hi,

Stuart Henderson schrieb:
> On 2008-12-12, Stuart Henderson <s...@spacehopper.org> wrote:
>> On 2008-12-12, Marco Peereboom <sl...@peereboom.us> wrote:
>>> It isn't pretty but:
>>> dd if=/dev/wd1a skip=8244 bs=1 count=4 | hexdump -C
>>> 4+0 records in
>>> 4+0 records out
>>> 4 bytes transferred in 0.001 secs (3263 bytes/sec)
>>> 00000000  41 00 00 00                                       |A...|
>>> 00000004
>> Here's a fragment you can add to /etc/magic so that these can be
>> recognised with "file -s /dev/wd1a".
>>
>> 8192    string                  marcCRAM        OpenBSD softraid
>>> 8244   long&037777777          00000000        RAID 0
>>> 8244   long&037777777          00000001        RAID 1
>>> 8244   long&037777777          00000041        AOE target
>>> 8244   long&037777777          0000004c        crypto
>>> 8244   long&037777777          0000006c        AOE initiator
>> Filling in more flags from softraidvar.h sr_metadata is left as
>> an exercise for the reader :)
>>
>>
> 
> better:
> 
> 8192    string                  marcCRAM        OpenBSD softraid
>> 8200   long&0xFFFFFFFF         >0              version %u
>>> 8244  long&0xFFFFFFFF         00000000        RAID 0
>>> 8244  long&0xFFFFFFFF         00000001        RAID 1
>>> 8244  long&0xFFFFFFFF         00000041        AOE target
>>> 8244  long&0xFFFFFFFF         0000004c        crypto
>>> 8244  long&0xFFFFFFFF         0000006c        AOE initiator

Thanks a lot, however as long as this doesn't make it into base I prefer
Marcos version to solve the problem. Makes the script more machine
independent.

Would you consider to commit a patch for magic if I provide one?


Michael

Reply via email to