mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update go-ceph to v0.5.0
as go-ceph is 0.5.0 is released updating the dependency to latest release. more info about release at https://github.com/ceph/go-ceph/releases/tag/v0.5.0 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
5f6fec5f0a
commit
2808d526bb
23
vendor/github.com/ceph/go-ceph/rbd/errors.go
generated
vendored
23
vendor/github.com/ceph/go-ceph/rbd/errors.go
generated
vendored
@ -7,24 +7,19 @@ import "C"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/ceph/go-ceph/internal/errutil"
|
||||
)
|
||||
|
||||
// revive:disable:exported Temporarily live with stuttering
|
||||
// rbdError represents an error condition returned from the librbd APIs.
|
||||
type rbdError int
|
||||
|
||||
// RBDError represents an error condition returned from the librbd APIs.
|
||||
type RBDError int
|
||||
func (e rbdError) Error() string {
|
||||
return errutil.FormatErrorCode("rbd", int(e))
|
||||
}
|
||||
|
||||
// revive:enable:exported
|
||||
|
||||
func (e RBDError) Error() string {
|
||||
errno, s := errutil.FormatErrno(int(e))
|
||||
if s == "" {
|
||||
return fmt.Sprintf("rbd: ret=%d", errno)
|
||||
}
|
||||
return fmt.Sprintf("rbd: ret=%d, %s", errno, s)
|
||||
func (e rbdError) ErrorCode() int {
|
||||
return int(e)
|
||||
}
|
||||
|
||||
func getError(err C.int) error {
|
||||
@ -32,7 +27,7 @@ func getError(err C.int) error {
|
||||
if err == -C.ENOENT {
|
||||
return ErrNotFound
|
||||
}
|
||||
return RBDError(err)
|
||||
return rbdError(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -79,5 +74,5 @@ var (
|
||||
// Private errors:
|
||||
|
||||
const (
|
||||
errRange = RBDError(-C.ERANGE)
|
||||
errRange = rbdError(-C.ERANGE)
|
||||
)
|
||||
|
Reference in New Issue
Block a user