code: func ExclusiveOpenFailsOnDevice(pathname string) (bool, error) {
  	var isDevice bool
  	finfo, err := os.Stat(pathname)
  	if os.IsNotExist(err) {
  		isDevice = false
  	}
  	// err in call to os.Stat
  	if err != nil {
  		return false, fmt.Errorf(
  			"PathIsDevice failed for path %q: %v",
  			pathname,
  			err)
  	}
  	// path refers to a device
  	if finfo.Mode()&os.ModeDevice != 0 {
  		isDevice = true
  	}
  
  	if !isDevice {
  		klog.Errorf("Path %q is not referring to a device.", pathname)
  		return false, nil
  	}
  	fd, errno := unix.Open(pathname, unix.O_RDONLY|unix.O_EXCL, 0)
  	// If the device is in use, open will return an invalid fd.
  	// When this happens, it is expected that Close will fail and throw an error.
  	defer unix.Close(fd)
  	if errno == nil {
  		// device not in use
  		return false, nil
  	} else if errno == unix.EBUSY {
  		// device is in use
  		return true, nil
  	}
  	// error during call to Open
  	return false, errno
  }
docs: // ExclusiveOpenFailsOnDevice is shared with NsEnterMounter