[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] CMOS file support
From: |
Mathias Krause |
Subject: |
Re: [Qemu-devel] [PATCH] CMOS file support |
Date: |
Fri, 17 Sep 2010 08:50:03 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.24 (X11/20100328) |
Am 16.09.2010 19:20 schrieb Anthony Liguori:
> Instead of using FILE, I'd suggest using a BlockDriver to read and write
> the data.
I'll fix that as soon as I figured how to use this interface.
> I think it would be very nice to add write support too so that writes to
> CMOS were persisted across boots.
Indeed. Also I would like to have a command line interface like '-cmos
cmos.bin' instead of the ugly '-global mc146818rtc.file=cmos.bin'. But
I'm not aware how to create such an alias. Any pointers?
>> +static long get_file_size(FILE *f)
>> +{
>> + long where, size;
>> +
>> + /* XXX: on Unix systems, using fstat() probably makes more sense */
>> +
>> + where = ftell(f);
>> + fseek(f, 0, SEEK_END);
>> + size = ftell(f);
>> + fseek(f, where, SEEK_SET);
>> +
>> + return size;
>> +}
>>
>
> BlockDrivers have a getlength() functions.
Would reduce the size of the patch which is always a good thing (tm).
Mathias
Re: [Qemu-devel] [PATCH] CMOS file support, Anthony Liguori, 2010/09/16
- Re: [Qemu-devel] [PATCH] CMOS file support,
Mathias Krause <=
- Re: [Qemu-devel] [PATCH] CMOS file support, Anthony Liguori, 2010/09/17
- Re: [Qemu-devel] [PATCH] CMOS file support, Mathias Krause, 2010/09/22
- [Qemu-devel] Re: [PATCH] CMOS file support, Paolo Bonzini, 2010/09/23
- Re: [Qemu-devel] [PATCH] CMOS file support, Markus Armbruster, 2010/09/24
- Re: [Qemu-devel] [PATCH] CMOS file support, Mathias Krause, 2010/09/26
Re: [Qemu-devel] [PATCH] CMOS file support, Markus Armbruster, 2010/09/24