jaypipes / ghw

Go HardWare discovery/inspection library
Apache License 2.0
1.62k stars 174 forks source link

Address #256 #293

Closed taigrr closed 2 years ago

taigrr commented 2 years ago

If a disk has no partitions, common use cases for looping over partitions on the disk array created by Block.New() don't work as expected. Now, underlying partition functions detect partitionless disks and treat a full-disk filesystem as a partition.

The Partition UUID is set to the empty string (since there isn't one), so this behavior can be detected.

This issue will resolve #256

taigrr commented 2 years ago

@fromanirh Could you take a look at this please?

taigrr commented 2 years ago

I am closing this PR since github doesn't let you change the name of the source branch for comparison and I now have multiple PRs. I'll reopen and reference this PR in the new one.