From: Paul Mackerras <paulus@samba.org>
To: Tony Vroon <chainsaw@gentoo.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2.6.22] [resend] Allow PMU LED control on PowerMac 7, 2 and 7, 3
Date: Thu, 22 Mar 2007 22:48:17 +1100 [thread overview]
Message-ID: <17922.27905.439387.814432@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20070318201110.181165B80F1@ganymede.vroon.org>
Tony Vroon writes:
> if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 &&
> - strncmp(model, "iBook", strlen("iBook")) != 0) {
> + strncmp(model, "iBook", strlen("iBook")) != 0 &&
> + strncmp(model, "PowerMac7,2", strlen("PowerMac7,2")) != 0 &&
> + strncmp(model, "PowerMac7,3", strlen("PowerMac7,3")) != 0) {
Since we only want to accept "PowerMac7,2" or "PowerMac7,3", and not
any longer strings ("PowerMac7,30" for instance), I think the
comparisons you have added should use strcmp rather than strncmp.
Paul.
next prev parent reply other threads:[~2007-03-22 11:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-18 20:11 [PATCH 2.6.22] [resend] Allow PMU LED control on PowerMac 7, 2 and 7, 3 Tony Vroon
2007-03-22 11:48 ` Paul Mackerras [this message]
2007-04-05 12:45 ` William Pitcock
2007-04-05 19:01 ` Segher Boessenkool
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=17922.27905.439387.814432@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=chainsaw@gentoo.org \
--cc=linuxppc-dev@ozlabs.org \
/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).