|
@@ -29,10 +29,11 @@ func (e AMNTFSErrNo) Message() string {
|
|
|
var _ error = (*AMNTFSError)(nil)
|
|
|
|
|
|
type AMNTFSError struct {
|
|
|
- etype AMNTFSErrNo
|
|
|
- fstype string
|
|
|
- mountid int64
|
|
|
- rawErr error
|
|
|
+ etype AMNTFSErrNo
|
|
|
+ fstype string
|
|
|
+ mountid int64
|
|
|
+ mountPoint string
|
|
|
+ rawErr error
|
|
|
}
|
|
|
|
|
|
func (e AMNTFSError) Error() string {
|
|
@@ -62,25 +63,31 @@ func (e AMNTFSError) GetMountId() int64 {
|
|
|
return e.mountid
|
|
|
}
|
|
|
|
|
|
+func (e AMNTFSError) GetMountPoint() string {
|
|
|
+ return e.mountPoint
|
|
|
+}
|
|
|
+
|
|
|
func (e AMNTFSError) GetFsDescription() string {
|
|
|
- return fmt.Sprintf("%s (mid=0x%08X)", e.fstype, e.mountid)
|
|
|
+ return fmt.Sprintf("%s (mid=0x%08X, mnt='%s')", e.fstype, e.mountid, e.mountPoint)
|
|
|
}
|
|
|
|
|
|
func NewAMNTFSError(emsg AMNTFSErrNo, rawErr error) *AMNTFSError {
|
|
|
return &AMNTFSError{
|
|
|
- etype: emsg,
|
|
|
- rawErr: rawErr,
|
|
|
- fstype: "",
|
|
|
- mountid: 0,
|
|
|
+ etype: emsg,
|
|
|
+ rawErr: rawErr,
|
|
|
+ fstype: "",
|
|
|
+ mountPoint: "",
|
|
|
+ mountid: 0,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
func NewAMNTFSChildFsError(fsent *MountNode, rawErr error) *AMNTFSError {
|
|
|
return &AMNTFSError{
|
|
|
- etype: ErrChildFsError,
|
|
|
- rawErr: rawErr,
|
|
|
- fstype: fsent.FsType(),
|
|
|
- mountid: fsent.MountId(),
|
|
|
+ etype: ErrChildFsError,
|
|
|
+ rawErr: rawErr,
|
|
|
+ fstype: fsent.FsType(),
|
|
|
+ mountid: fsent.MountId(),
|
|
|
+ mountPoint: fsent.mountPoint,
|
|
|
}
|
|
|
}
|
|
|
|