public inbox for prelink@sourceware.org
 help / color / mirror / Atom feed
* More helpful error message during path walk
@ 2007-12-04 16:12 Daniel Jacobowitz
  2007-12-04 16:24 ` Jakub Jelinek
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-12-04 16:12 UTC (permalink / raw)
  To: prelink

I don't remember if I've sent this before, but I couldn't find a
record of it.  I was working on a filesystem where nftw64 failed
(maybe permissions?  bad symlink?  I don't remember, sorry), and
nothing eventually led to an error message.  So prelink failed to
prelink some files I expected it to, but didn't say why not.  The
obvious patch made it much clearer what was happening.

-- 
Daniel Jacobowitz
CodeSourcery

2007-04-30  Daniel Jacobowitz  <dan@codesourcery.com>

	* gather.c (gather_object): Print an error if nftw64 fails.

Index: gather.c
===================================================================
--- gather.c	(revision 152)
+++ gather.c	(working copy)
@@ -1004,6 +1004,8 @@ gather_object (const char *name, int der
       ++implicit;
       ret = nftw64 (name, gather_func, 20, flags | FTW_ACTIONRETVAL);
       --implicit;
+      if (ret < 0)
+	error (0, errno, "Failed searching %s", name);
 #ifndef HAVE_FTW_ACTIONRETVAL
       free (blacklist_dir);
       blacklist_dir = NULL;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: More helpful error message during path walk
  2007-12-04 16:12 More helpful error message during path walk Daniel Jacobowitz
@ 2007-12-04 16:24 ` Jakub Jelinek
  2007-12-04 16:43   ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2007-12-04 16:24 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: prelink

On Tue, Dec 04, 2007 at 11:12:29AM -0500, Daniel Jacobowitz wrote:
> I don't remember if I've sent this before, but I couldn't find a
> record of it.  I was working on a filesystem where nftw64 failed
> (maybe permissions?  bad symlink?  I don't remember, sorry), and
> nothing eventually led to an error message.  So prelink failed to
> prelink some files I expected it to, but didn't say why not.  The
> obvious patch made it much clearer what was happening.

I'd worry about ENOENT errors, because prelink.conf generally contains
a bunch of dirs that may not be present and that should be silent.
But in that case already stat64 at the beginning of gather_object
should fail with ENOENT and when implicit this should silently return,
so I guess the patch is ok.  Please commit it.

> 2007-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* gather.c (gather_object): Print an error if nftw64 fails.

	Jakub

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: More helpful error message during path walk
  2007-12-04 16:24 ` Jakub Jelinek
@ 2007-12-04 16:43   ` Daniel Jacobowitz
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-12-04 16:43 UTC (permalink / raw)
  To: prelink

On Tue, Dec 04, 2007 at 11:24:10AM -0500, Jakub Jelinek wrote:
> I'd worry about ENOENT errors, because prelink.conf generally contains
> a bunch of dirs that may not be present and that should be silent.
> But in that case already stat64 at the beginning of gather_object
> should fail with ENOENT and when implicit this should silently return,
> so I guess the patch is ok.  Please commit it.

I verified that it doesn't cause a problem in that case.  nftw64
calls the gather function for inaccessible directories, too, so that
isn't affected.  So mostly this has no effect except in whatever case
prompted me to write it.  Really must take better notes about these
things...

Thanks.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-04 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-04 16:12 More helpful error message during path walk Daniel Jacobowitz
2007-12-04 16:24 ` Jakub Jelinek
2007-12-04 16:43   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).