Re: [PATCH] unbreak booting with virtio

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

 



On Sat, Aug 01, 2009 at 10:19:20AM +0200, Alexander Graf wrote:
>
> On 01.08.2009, at 10:01, Ján ONDREJ (SAL) wrote:
>
>> On Sat, Aug 01, 2009 at 09:04:55AM +0200, Ján ONDREJ (SAL) wrote:
>>> On Fri, Jul 31, 2009 at 09:55:39PM +0200, Alexander Graf wrote:
>>>>
>>>> On 31.07.2009, at 20:19, Glauber Costa <glommer@xxxxxxxxxx> wrote:
>>>>
>>>>> cp "$1" "$2"
>>>>> +sum=$(echo "obase=8; $sum" | bc)
>>>>> printf "\\$sum" | dd of="$2" bs=1 count=1 seek=$size conv=notrunc 
>>>>> 2>/
>>>>> dev/null
>>>
>>> May be it's better to use awk:
>>>
>>> echo $sum | awk '{ printf("%c", $1) }' \
>>>  | dd of="$2" bs=1 count=1 seek=$size conv=notrunc 2>/dev/null
>>>
>>> This version accepts decimal $sum, does not need conversion to octal.
>>
>> Ane may be it's better to write whole checksum in awk, it's faster and
>> cleaner. See attached patch (I am sorry, I don't know how to use git- 
>> email).
>
> My awk magic is pretty bad, but I think this version is missing the  
> padding, right?

Right. If you prefer this version agains Paolos double printf, I can
update it, if not, just use Pauols solution.

			SAL
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux