Re: [Xen-devel] [PATCH V3 2/6] libxl_read_file_contents: fix reading sysfs file

2015-05-18 Thread Chun Yan Liu
>>> On 5/18/2015 at 10:30 PM, in message <20150518143008.ge9...@zion.uk.xensource.com>, Wei Liu wrote: > On Mon, May 18, 2015 at 03:23:38PM +0100, Ian Jackson wrote: > > Chunyan Liu writes ("[PATCH V3 2/6] libxl_read_file_contents: fix reading > sysfs file"): > > > Sysfs file has size=4096

Re: [Xen-devel] [PATCH V3 2/6] libxl_read_file_contents: fix reading sysfs file

2015-05-18 Thread Wei Liu
On Sun, Apr 19, 2015 at 11:50:48AM +0800, Chunyan Liu wrote: > Sysfs file has size=4096 but actual file content is less than that. > Current libxl_read_file_contents will treat it as error when file size > and actual file content differs, so reading sysfs file content with > this function always fa

Re: [Xen-devel] [PATCH V3 2/6] libxl_read_file_contents: fix reading sysfs file

2015-05-18 Thread Ian Jackson
Chunyan Liu writes ("[PATCH V3 2/6] libxl_read_file_contents: fix reading sysfs file"): > Sysfs file has size=4096 but actual file content is less than that. Wow. Is there any danger that the actual size might be >4096 ? > Current libxl_read_file_contents will treat it as error when file size

Re: [Xen-devel] [PATCH V3 2/6] libxl_read_file_contents: fix reading sysfs file

2015-05-18 Thread Wei Liu
On Mon, May 18, 2015 at 03:23:38PM +0100, Ian Jackson wrote: > Chunyan Liu writes ("[PATCH V3 2/6] libxl_read_file_contents: fix reading > sysfs file"): > > Sysfs file has size=4096 but actual file content is less than that. > > Wow. > > Is there any danger that the actual size might be >4096 ?

Re: [Xen-devel] [PATCH V3 2/6] libxl_read_file_contents: fix reading sysfs file

2015-05-18 Thread Ian Campbell
On Mon, 2015-05-18 at 15:23 +0100, Ian Jackson wrote: > Perhaps the bulk should be made into libxl__read_file_contents_core > which takes a boolean instructing whether to tolerate magically > shrinking files ? > > Setting that boolean probably ought to arrange to insist that the > function gets eo