mtd/drivers/mtd cmdlinepart.c,1.17,1.18
joern at infradead.org
joern at infradead.org
Tue Jun 7 11:04:29 EDT 2005
Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/home/joern/mtd/drivers/mtd
Modified Files:
cmdlinepart.c
Log Message:
From: "Timofei V. Bondarenko" <tim at ipi.ac.ru>
Add alignment to cmdline.
Index: cmdlinepart.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/cmdlinepart.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- cmdlinepart.c 26 Nov 2004 11:18:47 -0000 1.17
+++ cmdlinepart.c 7 Jun 2005 15:04:26 -0000 1.18
@@ -239,7 +239,8 @@
&num_parts, /* out: number of parts */
0, /* first partition */
(unsigned char**)&this_mtd, /* out: extra mem */
- mtd_id_len + 1 + sizeof(*this_mtd));
+ mtd_id_len + 1 + sizeof(*this_mtd) +
+ sizeof(void*)-1 /*alignment*/);
if(!parts)
{
/*
@@ -252,6 +253,9 @@
return 0;
}
+ /* align this_mtd */
+ this_mtd = (struct cmdline_mtd_partition *)
+ ALIGN((unsigned long)this_mtd, sizeof(void*));
/* enter results */
this_mtd->parts = parts;
this_mtd->num_parts = num_parts;
More information about the linux-mtd-cvs
mailing list