From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============9138185614679302487==" MIME-Version: 1.0 From: Petr Machata To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] elf_begin sets elf_errno for cases that the file is completely unreadable Date: Thu, 11 Sep 2014 20:49:01 +0200 Message-ID: In-Reply-To: 20140910203656.D09BA2C39CA@topped-with-meat.com --===============9138185614679302487== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Roland McGrath writes: >> if (unlikely (nread =3D=3D -1)) >> - /* We cannot even read the head of the file. Maybe FILDES is assoc= iated >> - with an unseekable device. This is nothing we can handle. */ >> - return NULL; >> + { >> + __libelf_seterrno (ELF_E_INVALID_FILE); >> + /* We cannot even read the head of the file. Maybe FILDES is ass= ociated >> + with an unseekable device. This is nothing we can handle. */ >> + return NULL; >> + } > > That looks sensible, though I'd keep the comment at the top of the block. Pushed with that fix. Thanks, PM --===============9138185614679302487==--