github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/ios/dutils_darwin.go (about)

     1  // Package ios is a collection of interfaces to the local storage subsystem;
     2  // the package includes OS-dependent implementations for those interfaces.
     3  /*
     4   * Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
     5   */
     6  package ios
     7  
     8  import (
     9  	"github.com/lufia/iostat"
    10  )
    11  
    12  // TODO: NIY
    13  
    14  type LsBlk struct{}
    15  
    16  func lsblk(string, bool) *LsBlk { return nil }
    17  
    18  func fs2disks(*LsBlk, string, Label, int, bool) (FsDisks, error) {
    19  	driveStats, err := iostat.ReadDriveStats()
    20  	if err != nil || len(driveStats) == 0 {
    21  		return nil, err
    22  	}
    23  	drive := driveStats[0]
    24  	return FsDisks{drive.Name: drive.BlockSize}, nil
    25  }