Code Monkey home page Code Monkey logo

Comments (8)

Quyzi avatar Quyzi commented on July 16, 2024

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.

gradzik avatar gradzik commented on July 16, 2024

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.

Quyzi avatar Quyzi commented on July 16, 2024

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.

gradzik avatar gradzik commented on July 16, 2024

It would be very helpful, thanks.

from gpt.

Quyzi avatar Quyzi commented on July 16, 2024

@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.

gradzik avatar gradzik commented on July 16, 2024

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.

Quyzi avatar Quyzi commented on July 16, 2024

@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.

oldgalileo avatar oldgalileo commented on July 16, 2024

Nice work @gradzik! Addressed in PR #68 and merged. This issue should probably be closed.

from gpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.