Kilobyte22 / libpart

Library For Partitions Management
2 stars 2 forks source link

Create new gpt and partition #1

Open cholcombe973 opened 6 years ago

cholcombe973 commented 6 years ago

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?

Kilobyte22 commented 6 years ago

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

cholcombe973 commented 6 years ago

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 notifications@github.com 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 commented 6 years ago

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 commented 6 years ago

Ok no problem.

On Tue, Oct 31, 2017 at 5:59 AM Stephan Henrichs notifications@github.com 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 commented 6 years ago

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 commented 6 years ago

Awesome! Thanks