From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andreas Schwab <schwab@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH] partitions: fix build error in ibm partition detection code
Date: Thu, 12 Aug 2010 12:44:13 +0200 [thread overview]
Message-ID: <20100812104413.GD7814@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <m31va4nre5.fsf@hase.home>
On Thu, Aug 12, 2010 at 10:53:38AM +0200, Andreas Schwab wrote:
> Heiko Carstens <heiko.carstens@de.ibm.com> writes:
>
> > - strlcat(tmp, sizeof(tmp), "(nonl)", PAGE_SIZE);
> > + snprintf(tmp, sizeof(tmp), "(nonl)");
> > + strlcat(state->pp_buf, tmp, PAGE_SIZE);
>
> What's the point of tmp and snprintf if it just creates a copy of a
> constant string?
>
> strlcat(state->pp_buf, "(nonl)", PAGE_SIZE);
There's no point, just followed the pattern in the original patch without
thinking. Thanks! Updated patch:
Subject: [PATCH] partitions: fix build error in ibm partition detection code
From: Heiko Carstens <heiko.carstens@de.ibm.com>
9c867fbe "partitions: fix sometimes unreadable partition strings" coverted
one line within the ibm partition code incorrectly. Fix this to get rid of
a build error.
fs/partitions/ibm.c: In function 'ibm_partition':
[...]
fs/partitions/ibm.c:185: error: too many arguments to function 'strlcat'
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
fs/partitions/ibm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/partitions/ibm.c
+++ b/fs/partitions/ibm.c
@@ -182,7 +182,7 @@ int ibm_partition(struct parsed_partitio
offset = (info->label_block + 1);
} else {
/* unlabeled disk */
- strlcat(tmp, sizeof(tmp), "(nonl)", PAGE_SIZE);
+ strlcat(state->pp_buf, "(nonl)", PAGE_SIZE);
size = i_size >> 9;
offset = (info->label_block + 1);
}
prev parent reply other threads:[~2010-08-12 10:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 8:31 [PATCH] partitions: fix build error in ibm partition detection code Heiko Carstens
2010-08-12 8:53 ` Andreas Schwab
2010-08-12 10:44 ` Heiko Carstens [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=20100812104413.GD7814@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwab@redhat.com \
--cc=torvalds@linux-foundation.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