mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: Make use of latest go ceph library
The go-ceph version 0.4.0 is available now which got some important library changes required for ceph csi project. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
306d5b1da0
commit
58bf45a13e
18
vendor/github.com/ceph/go-ceph/rados/errors.go
generated
vendored
18
vendor/github.com/ceph/go-ceph/rados/errors.go
generated
vendored
@ -35,6 +35,16 @@ func getError(e C.int) error {
|
||||
return RadosError(e)
|
||||
}
|
||||
|
||||
// getErrorIfNegative converts a ceph return code to error if negative.
|
||||
// This is useful for functions that return a usable positive value on
|
||||
// success but a negative error number on error.
|
||||
func getErrorIfNegative(ret C.int) error {
|
||||
if ret >= 0 {
|
||||
return nil
|
||||
}
|
||||
return getError(ret)
|
||||
}
|
||||
|
||||
// Public go errors:
|
||||
|
||||
var (
|
||||
@ -61,3 +71,11 @@ const (
|
||||
// Deprecated: use ErrPermissionDenied instead
|
||||
RadosErrorPermissionDenied = ErrPermissionDenied
|
||||
)
|
||||
|
||||
// Private errors:
|
||||
|
||||
const (
|
||||
errNameTooLong = RadosError(-C.ENAMETOOLONG)
|
||||
|
||||
errRange = RadosError(-C.ERANGE)
|
||||
)
|
||||
|
Reference in New Issue
Block a user