Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for DeviceOpened (0.26 sec)

  1. pkg/volume/util/hostutil/hostutil_unsupported.go

    // unsupported platforms
    func NewHostUtil() *HostUtil {
    	return &HostUtil{}
    }
    
    var errUnsupported = errors.New("volume/util/hostutil on this platform is not supported")
    
    // DeviceOpened always returns an error on unsupported platforms
    func (hu *HostUtil) DeviceOpened(pathname string) (bool, error) {
    	return false, errUnsupported
    }
    
    // PathIsDevice always returns an error on unsupported platforms
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 08 10:17:38 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  2. pkg/volume/util/hostutil/fake_hostutil.go

    	}
    }
    
    // Compile-time check to make sure FakeHostUtil implements interface
    var _ HostUtils = &FakeHostUtil{}
    
    // DeviceOpened checks if block device referenced by pathname is in use by
    // checking if is listed as a device in the in-memory mountpoint table.
    func (hu *FakeHostUtil) DeviceOpened(pathname string) (bool, error) {
    	hu.mutex.Lock()
    	defer hu.mutex.Unlock()
    
    	for _, mp := range hu.MountPoints {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 13:32:38 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  3. pkg/volume/util/hostutil/hostutil.go

    )
    
    // HostUtils defines the set of methods for interacting with paths on a host.
    type HostUtils interface {
    	// DeviceOpened determines if the device (e.g. /dev/sdc) is in use elsewhere
    	// on the system, i.e. still mounted.
    	DeviceOpened(pathname string) (bool, error)
    	// PathIsDevice determines if a path is a device.
    	PathIsDevice(pathname string) (bool, error)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 13:38:40 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. pkg/volume/util/hostutil/hostutil_windows.go

    				return "", err
    			}
    			return volumeID, nil
    		}
    	}
    
    	return filepath.Base(mountPath), nil
    }
    
    // DeviceOpened determines if the device is in use elsewhere
    func (hu *HostUtil) DeviceOpened(pathname string) (bool, error) {
    	return false, nil
    }
    
    // PathIsDevice determines if a path is a device.
    func (hu *HostUtil) PathIsDevice(pathname string) (bool, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 13:38:40 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  5. pkg/volume/util/hostutil/hostutil_linux.go

    func NewHostUtil() *HostUtil {
    	return &HostUtil{}
    }
    
    // DeviceOpened checks if block device in use by calling Open with O_EXCL flag.
    // If pathname is not a device, log and return false with nil error.
    // If open returns errno EBUSY, return true with nil error.
    // If open returns nil, return false with nil error.
    // Otherwise, return false with error
    func (hu *HostUtil) DeviceOpened(pathname string) (bool, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 23 08:36:44 UTC 2023
    - 10K bytes
    - Viewed (0)
  6. pkg/volume/util/operationexecutor/operation_generator.go

    		deviceOpened = false
    	} else if devicePathErr != nil {
    		return false, deviceToDetach.GenerateErrorDetailed("PathIsDevice failed", devicePathErr)
    	} else {
    		deviceOpened, deviceOpenedErr = hostUtil.DeviceOpened(deviceToDetach.DevicePath)
    		if deviceOpenedErr != nil {
    			return false, deviceToDetach.GenerateErrorDetailed("DeviceOpened failed", deviceOpenedErr)
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 101.4K bytes
    - Viewed (0)
Back to top