summaryrefslogtreecommitdiff
path: root/mbr
diff options
context:
space:
mode:
authorAlejandro Sior <aho@sior.be>2022-06-21 18:50:36 +0200
committerAlejandro Sior <aho@sior.be>2022-06-21 18:50:36 +0200
commit295e3a2a3ab4f23828f607bc84de752ad56bd0d3 (patch)
tree0e8d1e2e030a0ce25835b52735b5c5b74c89c989 /mbr
parent0bf370f4ced47c0c7b57b7c27198089abf00e75e (diff)
mbr: add finishHEADmaster
Diffstat (limited to 'mbr')
-rw-r--r--mbr/mbr.ha5
1 files changed, 5 insertions, 0 deletions
diff --git a/mbr/mbr.ha b/mbr/mbr.ha
index 31a9534..994bdb7 100644
--- a/mbr/mbr.ha
+++ b/mbr/mbr.ha
@@ -53,6 +53,11 @@ export fn from(fd: io::file) (*mbr | nombr | io::error) = {
return self;
};
+export fn finish(self: *mbr) void = {
+ sector::finish(&self.bootsector_sec);
+ free(self);
+};
+
export fn partstream_reader(self: *mbr, entry: *entry) (io::limitstream | io::error) = {
const fd = self.bootsector_sec.fd;
const part = entry.lba_begin * sector::sector_length;