Re: [PATCH] partitions: fix build error in ibm partition detection code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 12, 2010 at 10:53:38AM +0200, Andreas Schwab wrote:
> Heiko Carstens <heiko.carstens@xxxxxxxxxx> 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@xxxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---
 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);
 			}
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux