I was going to just return if open() fails, but realized that failing ioctls on the not-opened fd are ... maybe intentional? By trying to run the ioctls on the invalid fd, it actually spits useful error messages to the log, so... Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> --- restore/tree.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/restore/tree.c b/restore/tree.c index 08e177f..fda4fc5 100644 --- a/restore/tree.c +++ b/restore/tree.c @@ -2626,7 +2626,8 @@ setdirattr( dah_t dah, char *path ) path, strerror(errno)); } - ( void )close( fd ); + if (fd >= 0) + close( fd ); } /* deletes orphanage if empty, else warns -- 1.7.1 _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs