mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
hack/pin-dependency.sh golang.org/x/crypto latest hack/pin-dependency.sh golang.org/x/net latest hack/pin-dependency.sh golang.org/x/exp latest hack/pin-dependency.sh golang.org/x/sys latest hack/pin-dependency.sh golang.org/x/time latest hack/pin-dependency.sh golang.org/x/tools latest hack/lint-dependencies.sh hack/pin-dependency.sh dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037 hack/pin-dependency.sh golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f hack/pin-dependency.sh golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 hack/lint-dependencies.sh hack/update-internal-modules.sh hack/update-vendor.sh Co-authored-by: Stephen Augustus <foo@auggie.dev>
30 lines
850 B
Go
30 lines
850 B
Go
// Copyright 2020 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build zos && s390x
|
|
// +build zos,s390x
|
|
|
|
// Functions to access/create device major and minor numbers matching the
|
|
// encoding used by z/OS.
|
|
//
|
|
// The information below is extracted and adapted from <sys/stat.h> macros.
|
|
|
|
package unix
|
|
|
|
// Major returns the major component of a z/OS device number.
|
|
func Major(dev uint64) uint32 {
|
|
return uint32((dev >> 16) & 0x0000FFFF)
|
|
}
|
|
|
|
// Minor returns the minor component of a z/OS device number.
|
|
func Minor(dev uint64) uint32 {
|
|
return uint32(dev & 0x0000FFFF)
|
|
}
|
|
|
|
// Mkdev returns a z/OS device number generated from the given major and minor
|
|
// components.
|
|
func Mkdev(major, minor uint32) uint64 {
|
|
return (uint64(major) << 16) | uint64(minor)
|
|
}
|