mirror of
https://github.com/vbatts/tar-split.git
synced 2024-09-27 12:44:01 +00:00
Vincent Batts
ec6b1ae20e
There is a discrepancy of behavior of `github.com/urfave/cli` between using go1.12 and go1.15, when the dependency is not present as vendored source. Now this builds fine with go1.12 There are users of tar-split as a package. It is the hope that by adding this vendored source it does not impact them depending on tar-split itself. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
27 lines
745 B
Go
27 lines
745 B
Go
// Copyright 2018 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.
|
|
|
|
// +build aix
|
|
// +build ppc
|
|
|
|
// Functions to access/create device major and minor numbers matching the
|
|
// encoding used by AIX.
|
|
|
|
package unix
|
|
|
|
// Major returns the major component of a Linux device number.
|
|
func Major(dev uint64) uint32 {
|
|
return uint32((dev >> 16) & 0xffff)
|
|
}
|
|
|
|
// Minor returns the minor component of a Linux device number.
|
|
func Minor(dev uint64) uint32 {
|
|
return uint32(dev & 0xffff)
|
|
}
|
|
|
|
// Mkdev returns a Linux device number generated from the given major and minor
|
|
// components.
|
|
func Mkdev(major, minor uint32) uint64 {
|
|
return uint64(((major) << 16) | (minor))
|
|
}
|