linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michaelellerman@internode.on.net>
To: David Wilder <dwilder@us.ibm.com>
Cc: Mohan Kumar <mohankumar@in.ibm.com>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	fastboot@lists.osdl.org
Subject: Re: [Fastboot] [PATCH]ppc64 kexec tools rm platform fix
Date: Tue, 11 Apr 2006 11:36:49 +0200	[thread overview]
Message-ID: <1144748209.25733.5.camel@localhost.localdomain> (raw)
In-Reply-To: <1144659236.26317.35.camel@localhost.localdomain>

David Wilder wrote:
> I lost Michael's reply on the list.
> Here it is with my response..
> 
> Michael wrote:
> 
> >/ -                               continue;
> />/ -                       }
> />/                         memset(fname, 0, sizeof(fname));
> />/                         strcpy(fname, device_tree);
> />/                         strcat(fname, dentry->d_name);
> />/                         strcat(fname, "/linux,htab-base");
> />/                         if ((file = fopen(fname, "r")) == NULL) {
> />/ -                               perror(fname);
> />/                                 closedir(cdir);
> />/ +                               if (errno == ENOENT) {
> />/ +                                       /* Non LPAR */
> />/ +                                       errno = 0;
> />/ +                                       continue;
> />/ +                                }
> />/ +                               perror(fname);
> />/                                 closedir(dir);
> />/                                 return -1;
> /
> I don't think you want to do the closedir() before the if. You
> certainly
> don't need to do it twice?
> 
> The two closedir() calls are not closing the same thing.

Right. We don't seem to close cdir if it all works though. That code
needs some serious restructuring, 350+ line functions are not cool.

cheers

-- 
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

      reply	other threads:[~2006-04-11  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <443700CB.3090909@us.ibm.com>
2006-04-10  8:53 ` [Fastboot] [PATCH]ppc64 kexec tools rm platform fix Michael Ellerman
2006-04-11  9:36   ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1144748209.25733.5.camel@localhost.localdomain \
    --to=michaelellerman@internode.on.net \
    --cc=dwilder@us.ibm.com \
    --cc=fastboot@lists.osdl.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mohankumar@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).