github.com/hpcng/singularity@v3.1.1+incompatible/pkg/util/loop/loop_unsupported.go (about)

     1  // Copyright (c) 2019, Sylabs Inc. All rights reserved.
     2  // This software is licensed under a 3-clause BSD license. Please consult the
     3  // LICENSE.md file distributed with the sources of this project regarding your
     4  // rights to use or distribute this software.
     5  
     6  // +build !linux
     7  
     8  package loop
     9  
    10  import (
    11  	"fmt"
    12  	"os"
    13  )
    14  
    15  // AttachFromFile finds a free loop device, opens it, and stores file descriptor
    16  // provided by image file pointer
    17  func (loop *Device) AttachFromFile(image *os.File, mode int, number *int) error {
    18  	return fmt.Errorf("unsupported on this platform")
    19  }
    20  
    21  // AttachFromPath finds a free loop device, opens it, and stores file descriptor
    22  // of opened image path
    23  func (loop *Device) AttachFromPath(image string, mode int, number *int) error {
    24  	return fmt.Errorf("unsupported on this platform")
    25  }
    26  
    27  // GetStatusFromFd gets info status about an opened loop device
    28  func GetStatusFromFd(fd uintptr) (*Info64, error) {
    29  	return nil, fmt.Errorf("unsupported on this platform")
    30  }
    31  
    32  // GetStatusFromPath gets info status about a loop device from path
    33  func GetStatusFromPath(path string) (*Info64, error) {
    34  	return nil, fmt.Errorf("unsupported on this platform")
    35  }