Path: blob/main/vendor/golang.org/x/sys/unix/dev_zos.go
2880 views
// Copyright 2020 The Go Authors. All rights reserved.1// Use of this source code is governed by a BSD-style2// license that can be found in the LICENSE file.34//go:build zos && s390x56// Functions to access/create device major and minor numbers matching the7// encoding used by z/OS.8//9// The information below is extracted and adapted from <sys/stat.h> macros.1011package unix1213// Major returns the major component of a z/OS device number.14func Major(dev uint64) uint32 {15return uint32((dev >> 16) & 0x0000FFFF)16}1718// Minor returns the minor component of a z/OS device number.19func Minor(dev uint64) uint32 {20return uint32(dev & 0x0000FFFF)21}2223// Mkdev returns a z/OS device number generated from the given major and minor24// components.25func Mkdev(major, minor uint32) uint64 {26return (uint64(major) << 16) | uint64(minor)27}282930