Skip to content

Commit

Permalink
update docstring to reflect partitionless disk changes
Browse files Browse the repository at this point in the history
Signed-off-by: Tai Groot <tai@taigrr.com>
  • Loading branch information
taigrr committed Dec 10, 2021
1 parent b36a1c3 commit aafe05b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/block/block_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ func diskWWN(paths *linuxpath.Paths, disk string) string {
// diskPartitions takes the name of a disk (note: *not* the path of the disk,
// but just the name. In other words, "sda", not "/dev/sda" and "nvme0n1" not
// "/dev/nvme0n1") and returns a slice of pointers to Partition structs
// representing the partitions in that disk
// representing the partitions in that disk. If a disk has no partitions,
// it returns information on the disk instead, but the Partition UUID is set
// to the empty string (since there isn't one.)
func diskPartitions(ctx *context.Context, paths *linuxpath.Paths, disk string) []*Partition {
out := make([]*Partition, 0)
path := filepath.Join(paths.SysBlock, disk)
Expand Down

0 comments on commit aafe05b

Please sign in to comment.