Re: More fdisk tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 12, 2009 at 11:51:59PM +0200, Zdenek Behan wrote:
> Also, I believe some kind of cleanup of the interface sometime  
> unspecified in the future, especially of the "fdisk" utility (not  
> [cs]fdisk) will be more or less necessary, and keeping backwards  
> compatibility would only make sense in understanding exactly the same  
> input sequences, not producing exactly the same output, especially in  
> the interactive parts. The current UI may be notoriously known by  
> everyone and unchanged for a decade, but still is rather crazy and  
> adding any more options may gradually become a hell.

 Yes. The question is what should be our next step after the
 refactoring. fdisk2? :-)

>>   Well, if you really want to use checksums and you know offset and
>>   size of random bytes you can remove it from the image by sed (or so)
>>   and then count the checksum.
>>    
> It seems a bit hardcore to do in scripts, but it's definitely a way if  
> everything else fails. ;)

 That's simple and elegant by dd(1):

 $ echo -n "aaaXXXaaa" > a

 $ hexdump -C a | head -1
 00000000  61 61 61 58 58 58 61 61 61  |aaaXXXaaa|

 $ dd if=/dev/zero of=~/a bs=1 seek=3 count=3 conv=notrunc

 $ hexdump -C a | head -1                                     
 00000000  61 61 61 00 00 00 61 61  61 |aaa...aaa|

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux