rebase: update go-ceph to v0.8.0

Updating go-ceph to v0.8.0.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
This commit is contained in:
Mudit Agarwal
2021-02-10 09:08:18 +05:30
committed by mergify[bot]
parent e6098520d1
commit 32d78c4f7f
24 changed files with 1724 additions and 229 deletions

View File

@ -28,3 +28,12 @@ func CStructToTimespec(cts CTimespecPtr) Timespec {
Nsec: int64(t.tv_nsec),
}
}
// CopyToCStruct copies the time values from a Timespec to a previously
// allocated C `struct timespec`. Due to restrictions on Cgo the C pointer
// must be passed via the CTimespecPtr wrapper.
func CopyToCStruct(ts Timespec, cts CTimespecPtr) {
t := (*C.struct_timespec)(cts)
t.tv_sec = C.time_t(ts.Sec)
t.tv_nsec = C.long(ts.Nsec)
}