|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V5 2/7] libxl_read_file_contents: add new entry to read sysfs file
Chunyan Liu writes ("[PATCH V5 2/7] libxl_read_file_contents: add new entry to
read sysfs file"):
> 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 fails.
>
> Add a new entry libxl_read_sysfs_file_contents to handle sysfs file
> specially. It would be used in later pvusb work.
I think this still fails to detect a situation where the file is
unexpectedly longer than the requested size ?
As we wrote earlier:
> > > Is there any risk that the file is actually bigger than advertised,
> > > rather than smaller ?
> >
> > For sysfs file, couldn't be bigger.
>
> Then you should detect the condition that the file is bigger, and call
> it an error.
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |