Comments (8)
num_parts
by the UEFI model should be a minimum of 128. It's the total number of entries in the partition table, not the number of used partitions. I've kept it at 128 to maintain compatibility.
from gpt.
Yes, the default is 128, but in embedded systems, I sometimes need to change it, so I was curious how to do this. If modification isn't allowed intentionally, I will look for another solution.
Thanks for the reply.
from gpt.
I didn't build it in because of compatibility, but if there is a use case I could add an additional fn to create a new header with a variable for num_parts.
from gpt.
It would be very helpful, thanks.
from gpt.
@gradzik Could you clone into the enable_embedded branch and test it against your use case? I've added a new fn update_partitions_embedded
that takes a u32 for the number of partitions.
from gpt.
The new function works fine when creating a new partition table, but when resizing the existing partition table first_usable_sector and last_usable_sector don't change. I think it should be updated.
from gpt.
@gradzik I don't have as much time to dedicate to this project as I used to. If you would want to submit a PR to add this functionality, I'll approve it and update the crate.
from gpt.
Nice work @gradzik! Addressed in PR #68 and merged. This issue should probably be closed.
from gpt.
Related Issues (20)
- The description on crates.io needs to be update HOT 3
- Feedback and problem with backup header HOT 2
- Creating a new table HOT 2
- Partition creates empty partition entries HOT 2
- Reading from arbitrary Read + Seek types
- Allow opening disk from existing `File`
- Allow creating table from scratch
- Off-by-one bug in `Partition::bytes_len`? HOT 2
- Rounding issue of `size` in `add_partition` HOT 3
- Create standard-sized GPT linux disk image
- Tilde dependency requirements cause issues with other crates HOT 4
- partition-types: document whether/how codegen works HOT 1
- Data loss after loading an existing partition table with unknown partition types HOT 2
- Improve ProtectiveMBR API HOT 1
- Testing for GPT devices HOT 4
- Maintenance
- Please allow not to detect the backup GPT table by default HOT 4
- Idears HOT 2
- Version 3.0.0 breaks on nightly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt.