// GetWMInfo returns driver specific information about a window.
// (https://wiki.libsdl.org/SDL_GetWindowWMInfo)
426546
func (window *Window) GetWMInfo() (*SysWMInfo, error) {
	var info SysWMInfo
	VERSION(&info.Version)
	if C.SDL_GetWindowWMInfo(window.cptr(), info.cptr()) == 0 {
		return nil, GetError()
	}
	return &info, nil
}
966642
func (c *MempoolDataCache) GetFeeInfo() (uint32, dcrjson.FeeInfoMempool) {
	c.mtx.RLock()
	defer c.mtx.RUnlock()
	return c.height, c.ticketFeeInfo
}
395625
func (s *v1AlphaAPIServer) GetInfo(context.Context, *v1alpha.GetInfoRequest) (*v1alpha.GetInfoResponse, error) {
	return &v1alpha.GetInfoResponse{
		Info: &v1alpha.Info{
			RktVersion:  version.Version,
			AppcVersion: schema.AppContainerVersion.String(),
			ApiVersion:  supportedAPIVersion,
			GlobalFlags: &v1alpha.GlobalFlags{
				Dir:                getDataDir(),
				SystemConfigDir:    globalFlags.SystemConfigDir,
				LocalConfigDir:     globalFlags.LocalConfigDir,
				UserConfigDir:      globalFlags.UserConfigDir,
				InsecureFlags:      globalFlags.InsecureFlags.String(),
				TrustKeysFromHttps: globalFlags.TrustKeysFromHTTPS,
			},
		},
	}, nil
}
297864
func (md *metricsDu) getFsInfo(metrics *Metrics) error {
	available, capacity, _, inodes, inodesFree, _, err := fs.FsInfo(md.path)
	if err != nil {
		return NewFsInfoFailedError(err)
	}
	metrics.Available = resource.NewQuantity(available, resource.BinarySI)
	metrics.Capacity = resource.NewQuantity(capacity, resource.BinarySI)
	metrics.Inodes = resource.NewQuantity(inodes, resource.BinarySI)
	metrics.InodesFree = resource.NewQuantity(inodesFree, resource.BinarySI)
	return nil
}
823960
func GetInfo(path string) (info Info, err error) {
	s := syscall.Statfs_t{}
	err = syscall.Statfs(path, &s)
	if err != nil {
		return Info{}, err
	}
	reservedBlocks := uint64(s.F_bfree) - uint64(s.F_bavail)
	info = Info{
		Total:  uint64(s.F_bsize) * (uint64(s.F_blocks) - reservedBlocks),
		Free:   uint64(s.F_bsize) * uint64(s.F_bavail),
		Files:  uint64(s.F_files),
		Ffree:  uint64(s.F_ffree),
		FSType: getFSType(s.F_fstypename[:]),
	}
	return info, nil
}
1199853
func WmUserTimeWindowGet(xu *xgbutil.XUtil,
	win xproto.Window) (xproto.Window, error) {

	return xprop.PropValWindow(xprop.GetProperty(xu, win,
		"_NET_WM_USER_TIME_WINDOW"))
}
651943
func (window *Window) GetWindowOpacity() (opacity float32, err error) {
	return opacity, errorFromInt(int(
		C.SDL_GetWindowOpacity(window.cptr(), (*C.float)(unsafe.Pointer(&opacity)))))
}
605238
func WmHintsGet(xu *xgbutil.XUtil, win xproto.Window) (mh *Hints, err error) {
	lenExpect := 5
	hints, err := xprop.PropValNums(xprop.GetProperty(xu, win,
		"_MOTIF_WM_HINTS"))
	if err != nil {
		return nil, err
	}
	if len(hints) != lenExpect {
		return nil,
			fmt.Errorf("motif.WmHintsGet: There are %d fields in "+
				"_MOTIF_WM_HINTS, but xgbutil expects %d.",
				len(hints), lenExpect)
	}

	mh = &Hints{}
	mh.Flags = hints[0]
	mh.Function = hints[1]
	mh.Decoration = hints[2]
	mh.Input = hints[3]
	mh.Status = hints[4]

	return
}
357461
func MemInfo(field string) string {
	kon := Console{Command: "cat /proc/meminfo"}
	kon.Run()
	kon = Console{Command: fmt.Sprintf("grep %s", field), StdInput: kon.StdOutput}
	kon.Run()
	return strings.Fields(kon.StdOutput)[1]
}
1146630
func getFrameworkInfoByFrameworkID(frameworkID string, frameworks []frameworkInfo) *frameworkInfo {
	for _, framework := range frameworks {
		if framework.ID == frameworkID {
			return &framework
		}
	}
	return nil
}
1166052
func getMemBwInfo() (*MemBwInfo, error) {
	memBwInfo := &MemBwInfo{}

	rootPath, err := getIntelRdtRoot()
	if err != nil {
		return memBwInfo, err
	}

	path := filepath.Join(rootPath, "info", "MB")
	bandwidthGran, err := getIntelRdtParamUint(path, "bandwidth_gran")
	if err != nil {
		return memBwInfo, err
	}
	delayLinear, err := getIntelRdtParamUint(path, "delay_linear")
	if err != nil {
		return memBwInfo, err
	}
	minBandwidth, err := getIntelRdtParamUint(path, "min_bandwidth")
	if err != nil {
		return memBwInfo, err
	}
	numClosids, err := getIntelRdtParamUint(path, "num_closids")
	if err != nil {
		return memBwInfo, err
	}

	memBwInfo.BandwidthGran = bandwidthGran
	memBwInfo.DelayLinear = delayLinear
	memBwInfo.MinBandwidth = minBandwidth
	memBwInfo.NumClosids = numClosids

	return memBwInfo, nil
}
77717
func (t *Template) GetAWSSSMMaintenanceWindowWithName(name string) (*resources.AWSSSMMaintenanceWindow, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSSSMMaintenanceWindow:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSSSMMaintenanceWindow not found", name)
}
573377
func (m *MemInfo) Get() error {
	var sysinfo syscall.Sysinfo_t
	err := syscall.Sysinfo(&sysinfo)
	if err != nil {
		return err
	}
	m.Timestamp = time.Now().UTC().UnixNano()
	m.TotalRAM = sysinfo.Totalram
	m.FreeRAM = sysinfo.Freeram
	m.SharedRAM = sysinfo.Sharedram
	m.BufferRAM = sysinfo.Bufferram
	m.TotalSwap = sysinfo.Totalswap
	m.FreeSwap = sysinfo.Freeswap
	return nil
}
1278858
func getWindowsError(inputError error) error {
	if exiterr, ok := inputError.(*exec.ExitError); ok {
		if status, ok := exiterr.Sys().(syscall.WaitStatus); ok {
			if sysErr, ok := WinErrCode[status.ExitStatus()]; ok {
				return errors.New(fmt.Sprintf("\n %s: %s \n %s", sysErr.Title, sysErr.Description, sysErr.Action))
			}
		}
	}

	return inputError
}
533587
func (wc *WhisperClient) GetInfo(ctx *Context) (info *Info, _ error) {
	rawInfo, err := wc.client.Info(ctx.context)
	return &Info{&rawInfo}, err
}
1084125
func (m *MockSendAlgorithm) GetCongestionWindow() protocol.ByteCount {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetCongestionWindow")
	ret0, _ := ret[0].(protocol.ByteCount)
	return ret0
}
1190809
func (window *Window) GetDisplayIndex() (int, error) {
	i := int(C.SDL_GetWindowDisplayIndex(window.cptr()))
	return i, errorFromInt(i)
}