Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOOT/EFI Partitions are missing in windows, only Logical Partitions are returned #780

Open
gufranmirza opened this issue Oct 19, 2019 · 3 comments

Comments

@gufranmirza
Copy link

gufranmirza commented Oct 19, 2019

When you call the Partitions function on windows system, it returns only logical partitions

To Reproduce [On Windows System]

package main

import (
  "github.com/shirou/gopsutil/disk"
  "fmt"
  "strconv"
)

func main() {
  parts, err := disk.Partitions(true)
  check(err)

  for _, part := range parts {
    fmt.Println(part)
  }
}

func check(err error) {
  if err != nil {
    panic(err)
  }
}

Expected behavior
Ideally it should return the SYSTEM/BOOT/EFI partitions alongside with the logical partitions.

Environment

  • Windows

I would like to create a PR to fix this issue on windows.

@Lomanic
Copy link
Collaborator

Lomanic commented Oct 19, 2019

I would like to create a PR to fix this issue on windows.

Please do, would be highly appreciated. Just need to confirm if these partitions are also returned on other OSes.

@gufranmirza
Copy link
Author

gufranmirza commented Oct 20, 2019

Working on it, issue is only on windows OSes. I will confirm that its working on other windows OSes as well. #781

@gufranmirza
Copy link
Author

gufranmirza commented Oct 23, 2019

@shirou raised the PR #781

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants