diff options
Diffstat (limited to 'src/disk.c')
-rw-r--r-- | src/disk.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1,5 +1,6 @@ #include "project.h" +#include <linux/fs.h> DISK * @@ -45,7 +46,7 @@ disk_read (DISK * d, void *buf, uint64_t lba, int lbas) if (read (d->fd, buf, lbas) != lbas) { perror ("read"); - // abort (); + // abort (); } } void @@ -72,3 +73,15 @@ disk_lbas (DISK * d) { return d->lbas; } + +disk_reread_kernel_table (DISK * d) +{ + if (ioctl (d->fd, BLKRRPART, NULL)) + { + perror ("Telling kernel to re-read partition table failed:"); + } + else + { + fprintf (stderr, "Kernel has re-read partition table\n"); + } +} |