Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
033706af
Commit
033706af
authored
Feb 28, 2013
by
Michal Suchanek
Committed by
Alejandro Mery
Mar 01, 2013
Browse files
nand-part: Tell kernel to reread partition table after writing it.
parent
5c9e55e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
nand-part.c
View file @
033706af
...
...
@@ -49,6 +49,8 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
/* BLKRRPART */
#include "nand-part.h"
#define MAX_NAME 16
...
...
@@ -261,6 +263,10 @@ int writembrs(int fd, char names[][MAX_NAME], __u32 *lens, unsigned int *user_ty
lseek
(
fd
,
MBR_START_ADDRESS
+
MBR_SIZE
*
i
,
SEEK_SET
);
write
(
fd
,
mbr
,
MBR_SIZE
);
}
if
(
ioctl
(
fd
,
BLKRRPART
,
NULL
))
perror
(
"Failed rereading partition table"
);
return
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment