Skip to content

Commit

Permalink
Merge pull request openshift#26 from crosbymichael/device-copy-links
Browse files Browse the repository at this point in the history
Use lstat to check device symlinks
  • Loading branch information
vmarmol committed Jun 17, 2014
2 parents e00eadd + bbb502c commit c4ec56a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devices/devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func (device *Device) GetCgroupAllowString() string {
}

// Given the path to a device and it's cgroup_permissions(which cannot be easilly queried) look up the information about a linux device and return that information as a Device struct.
func GetDevice(path string, cgroupPermissions string) (*Device, error) {
fileInfo, err := os.Stat(path)
func GetDevice(path, cgroupPermissions string) (*Device, error) {
fileInfo, err := os.Lstat(path)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c4ec56a

Please sign in to comment.