mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-10 14:30:09 +00:00
First revision
This commit is contained in:
parent
d99ad66589
commit
999395cca1
24
libemile/emile_map_set_startup.c
Normal file
24
libemile/emile_map_set_startup.c
Normal file
@ -0,0 +1,24 @@
|
||||
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
||||
/*
|
||||
*
|
||||
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "partition.h"
|
||||
#include "libemile.h"
|
||||
|
||||
int emile_map_set_startup(char* dev_name, int partition)
|
||||
{
|
||||
emile_map_t* map;
|
||||
int ret;
|
||||
|
||||
map = emile_map_open(dev, O_RDWR);
|
||||
for (i = 0; i < emile_map_get_number(map); i++)
|
||||
{
|
||||
emile_map_read(map, i);
|
||||
emile_map_partition_set_startup(map, i == partition);
|
||||
emile_map_write(map, i);
|
||||
}
|
||||
emile_map_close(map);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user