Commit 6fd7957e authored by Pat Wood's avatar Pat Wood
Browse files

sends the nand driver a BLKRRPART via ioctl; depends on kernel mods

that allow on-the-fly repartitioning of the nand
parent c058922c
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
#include "nand-part.h" #include "nand-part.h"
#define MAX_NAME 16 #define MAX_NAME 16
...@@ -315,6 +317,7 @@ int main (int argc, char **argv) ...@@ -315,6 +317,7 @@ int main (int argc, char **argv)
if (writembrs(fd, names, lens, user_types, argc)) { if (writembrs(fd, names, lens, user_types, argc)) {
printf("\nverifying new partition tables:\n"); printf("\nverifying new partition tables:\n");
checkmbrs(fd); checkmbrs(fd);
printf("rereading partition table... returned %d\n", ioctl(fd, BLKRRPART, 0));
} }
} }
close(fd); close(fd);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment