Create new gpt and partition

#1 · open · 6 comments

View on GitHub ↗

cholcombe973

I might be reading this api wrongly but it doesn't seem possibly to create a fresh GPT + PartitionEntry in a new file. Is that correct?

Comments

Kilobyte22

That is correct, this is currently not possible. Shouldn't be too hard to implement, so i'll look into it later today.

cholcombe973

Yeah I think you have most of the pieces in place. I can lend a hand if you like. On Mon, Oct 23, 2017 at 5:51 AM Stephan Henrichs <[email protected]> wrote: > That is correct, this is currently not possible. Shouldn't be too hard to > implement, so i'll look into it later today. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/Kilobyte22/libpart/issues/1#issuecomment-338648775>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AC6qEyShoXN77UGLZgxqon0YvCu9_yGjks5svIvqgaJpZM4QCIBd> > . >

Kilobyte22

I don't seem to have the time/motivation right now. If you don't mind, submit a pull request for this and i'll merge it.

cholcombe973

Ok no problem. On Tue, Oct 31, 2017 at 5:59 AM Stephan Henrichs <[email protected]> wrote: > I don't seem to have the time/motivation right now. If you don't mind, > submit a pull request for this and i'll merge it. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/Kilobyte22/libpart/issues/1#issuecomment-340754471>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AC6qE_Vub6RhXt-qxwXrL6sHn4-d5Sp7ks5sxxm6gaJpZM4QCIBd> > . >

Kilobyte22

Small status update: As of commit 76af974 it should be possible to create a GPT using `GPTTable::new(...)`. Furthermore, there is the `GPTTable::set_partition(&mut self, ...)` function for modifying the table. Creating a `PartitionEntry` is possible using either the `::default()` method or manually filling the entry. Please note that this API is not very well tested (and certainly not stabilized) yet.

cholcombe973

Awesome! Thanks