Re: [Qemu-devel] [PATCH v2 3/3] hostmem-file: make option 'size' optional

2016-11-01 Thread Haozhong Zhang
On 10/31/16 16:18 -0200, Eduardo Habkost wrote: On Fri, Oct 28, 2016 at 10:06:40AM +0800, Haozhong Zhang wrote: [...] > > diff --git a/exec.c b/exec.c > > index 264a25f..89065bd 100644 > > --- a/exec.c > > +++ b/exec.c > > @@ -1234,7 +1234,7 @@ static int64_t get_file_size(int fd) > > } > > >

Re: [Qemu-devel] [PATCH v2 3/3] hostmem-file: make option 'size' optional

2016-10-31 Thread Eduardo Habkost
On Fri, Oct 28, 2016 at 10:06:40AM +0800, Haozhong Zhang wrote: [...] > > > diff --git a/exec.c b/exec.c > > > index 264a25f..89065bd 100644 > > > --- a/exec.c > > > +++ b/exec.c > > > @@ -1234,7 +1234,7 @@ static int64_t get_file_size(int fd) > > > } > > > > > > static void

Re: [Qemu-devel] [PATCH v2 3/3] hostmem-file: make option 'size' optional

2016-10-27 Thread Haozhong Zhang
On 10/28/16 10:06 +0800, Haozhong Zhang wrote: On 10/27/16 12:55 -0200, Eduardo Habkost wrote: On Thu, Oct 27, 2016 at 12:23:00PM +0800, Haozhong Zhang wrote: [..] static char *get_mem_path(Object *o, Error **errp) diff --git a/exec.c b/exec.c index 264a25f..89065bd 100644 --- a/exec.c +++

Re: [Qemu-devel] [PATCH v2 3/3] hostmem-file: make option 'size' optional

2016-10-27 Thread Haozhong Zhang
On 10/27/16 12:55 -0200, Eduardo Habkost wrote: On Thu, Oct 27, 2016 at 12:23:00PM +0800, Haozhong Zhang wrote: If 'size' option is not given, Qemu will use the file size of 'mem-path' instead. If an empty file, a non-existing file or a directory is specified by option 'mem-path', a non-zero

Re: [Qemu-devel] [PATCH v2 3/3] hostmem-file: make option 'size' optional

2016-10-27 Thread Eduardo Habkost
On Thu, Oct 27, 2016 at 12:23:00PM +0800, Haozhong Zhang wrote: > If 'size' option is not given, Qemu will use the file size of 'mem-path' > instead. If an empty file, a non-existing file or a directory is specified > by option 'mem-path', a non-zero option 'size' is still needed. > >

[Qemu-devel] [PATCH v2 3/3] hostmem-file: make option 'size' optional

2016-10-26 Thread Haozhong Zhang
If 'size' option is not given, Qemu will use the file size of 'mem-path' instead. If an empty file, a non-existing file or a directory is specified by option 'mem-path', a non-zero option 'size' is still needed. Signed-off-by: Haozhong Zhang --- backends/hostmem-file.c