Comments (4)
Correct link to offending line: https://github.com/diskfs/go-diskfs/blob/master/partition/gpt/table.go#L521
from go-diskfs.
Hmm... here it is in bytes (and everywhere else that consumes it), but in gpt.Table.GetPartitionSize() it is multiplying the already-bytes-denominated field by the sector size, making it, e.g. 512*size-in-bytes (or whatever the sector size is)? Is that right?
I assume you came across this in a practical example. Do you mind pasting it here? We can use that code as part of tests, and I would like it documented here in the issue. PR is a one-line fix, but need the test first of course.
The other question is, if this is an error, why does this test pass?
from go-diskfs.
Drat. I figured it out. It tests against added partitions that do not have sizes, so it always is 0. First thing is to fix this test.
from go-diskfs.
See #11, and thanks for finding this, @queuem !
from go-diskfs.
Related Issues (20)
- io.Copy error? HOT 11
- support creating 4K raw images via Create (or new function)? HOT 3
- Question: Can this be used to flash images to disks? HOT 5
- Allow writing sparse disk images HOT 3
- Support for Darwin HOT 2
- Command line utility HOT 5
- minimal gpt partition size is wrong HOT 3
- Is there a golang util to manage RAID(0, 1, 5 6, 10...)? HOT 2
- Where is the type `PartitionTable` defined? HOT 9
- How to close the disk? HOT 1
- gpt can have size larger than minimum size
- Partitions not created HOT 15
- SectorSizeDefault not declared by package diskfs HOT 3
- Is 0o666 a typo? HOT 1
- Can't seem to read fat32 partition HOT 1
- Any plans for a release version? HOT 3
- Implement standard fs.FS interface and friends HOT 3
- Support status for solaris, aix, freebsd, illumos, netbsd, openbsd and plan9 HOT 3
- Incorrect number of partitions reported for the Ubuntu 22.04.02 Server ISO HOT 4
- corrupt GPT with examples/efi_create.go HOT 10
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 go-diskfs.