[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 03 of 24] xenpaging: use PERROR to print errno



On Tue, Oct 04, George Dunlap wrote:

> On Mon, Oct 3, 2011 at 4:54 PM, Olaf Hering <olaf@xxxxxxxxx> wrote:

> > Â Â seek_ret = lseek(fd, i << PAGE_SHIFT, SEEK_SET);
> > + Â Âif (seek_ret == -1)
> > + Â Â{
> > + Â Â Â Âret = -errno;
> > + Â Â Â Âgoto err;
> > + Â Â}
> 
> Wouldn't it be more idiomatic to make both this check and the other
> check in the function:
> * check for seek_ret < 0 (rather than -1)

The man page said its -1, now that I read it again it says (off_t)-1, so
my change above should be updated to comply with the man page.

> * make file_op() return -1
> * Let the caller read errno?  (Rather than returning -errno)?

Yes, I will change this in a new patch.

Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.