diff --git a/nand-part.c b/nand-part.c index de3c618..334776d 100644 --- a/nand-part.c +++ b/nand-part.c @@ -49,6 +49,8 @@ #include #include #include +#include +#include /* 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; }