4
4
* Written by Cai Zhiyong <[email protected] >
5
5
*
6
6
*/
7
- #include <linux/buffer_head.h>
8
- #include <linux/module.h>
7
+ #include <linux/export.h>
9
8
#include <linux/cmdline-parser.h>
10
9
11
10
static int parse_subpart (struct cmdline_subpart * * subpart , char * partdef )
@@ -159,6 +158,7 @@ void cmdline_parts_free(struct cmdline_parts **parts)
159
158
* parts = next_parts ;
160
159
}
161
160
}
161
+ EXPORT_SYMBOL (cmdline_parts_free );
162
162
163
163
int cmdline_parts_parse (struct cmdline_parts * * parts , const char * cmdline )
164
164
{
@@ -206,6 +206,7 @@ int cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline)
206
206
cmdline_parts_free (parts );
207
207
goto done ;
208
208
}
209
+ EXPORT_SYMBOL (cmdline_parts_parse );
209
210
210
211
struct cmdline_parts * cmdline_parts_find (struct cmdline_parts * parts ,
211
212
const char * bdev )
@@ -214,17 +215,17 @@ struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts,
214
215
parts = parts -> next_parts ;
215
216
return parts ;
216
217
}
218
+ EXPORT_SYMBOL (cmdline_parts_find );
217
219
218
220
/*
219
221
* add_part()
220
222
* 0 success.
221
223
* 1 can not add so many partitions.
222
224
*/
223
- void cmdline_parts_set (struct cmdline_parts * parts , sector_t disk_size ,
224
- int slot ,
225
- int (* add_part )(int , struct cmdline_subpart * , void * ),
226
- void * param )
227
-
225
+ int cmdline_parts_set (struct cmdline_parts * parts , sector_t disk_size ,
226
+ int slot ,
227
+ int (* add_part )(int , struct cmdline_subpart * , void * ),
228
+ void * param )
228
229
{
229
230
sector_t from = 0 ;
230
231
struct cmdline_subpart * subpart ;
@@ -247,4 +248,7 @@ void cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size,
247
248
if (add_part (slot , subpart , param ))
248
249
break ;
249
250
}
251
+
252
+ return slot ;
250
253
}
254
+ EXPORT_SYMBOL (cmdline_parts_set );
0 commit comments