From: Ian Jackson Subject: Re: [PATCH V5 2/7] libxl_read_file_contents: add new entry to read sysfs file Date: Tue, 30 Jun 2015 10:08:34 +0100 Message-ID: <21906.23698.778991.627734@mariner.uk.xensource.com> References: <1435226838-3067-1-git-send-email-cyliu@suse.com> <1435226838-3067-3-git-send-email-cyliu@suse.com> <21899.57676.368102.982820@mariner.uk.xensource.com> <558D7442020000660004C2F1@relay2.provo.novell.com> <21901.20009.85407.581628@mariner.uk.xensource.com> <55918B4E0200006600042119@relay2.provo.novell.com> <21905.9050.452111.208124@mariner.uk.xensource.com> <559264D90200006600042819@relay2.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <559264D90200006600042819@relay2.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chun Yan Liu Cc: Juergen Gross , wei.liu2@citrix.com, ian.campbell@citrix.com, george.dunlap@eu.citrix.com, xen-devel@lists.xen.org, Jim Fehlig List-Id: xen-devel@lists.xenproject.org Chun Yan Liu writes ("Re: [PATCH V5 2/7] libxl_read_file_contents: add new entry to read sysfs file"): > >>> On 6/29/2015 at 06:52 PM, in message > <21905.9050.452111.208124@mariner.uk.xensource.com>, Ian Jackson > wrote: > > Chun Yan Liu writes ("Re: [PATCH V5 2/7] libxl_read_file_contents: add new > > But if we are intending to use this with sysfs files, where the > > reported size is known to be wrong, it seems to me that we should be > > more proactive. > > If only for sysfs files, the bigger size problem should never > happens, since sysfs system is not like normal file system, user > won't be able to change the size. > > Reference from following link: > http://www.makelinux.net/books/lkd2/ch17lev1sec8 I don't think that can be relied on as a guide to the future API. Maybe sysfs will grow support for bigger files in the future. (Also, that is actually a description of the kernel internals, not of the syscall API). Thanks, Ian.