(bkt *bolt.Bucket)
| 610 | } |
| 611 | |
| 612 | func readActiveMount(bkt *bolt.Bucket) (mount.ActiveMount, error) { |
| 613 | var active mount.ActiveMount |
| 614 | active.Type = string(bkt.Get(bucketKeyType)) |
| 615 | active.MountPoint = string(bkt.Get(bucketKeyMountPoint)) |
| 616 | if v := bkt.Get(bucketKeyMountedAt); v != nil { |
| 617 | var mountedAt time.Time |
| 618 | if err := mountedAt.UnmarshalBinary(v); err != nil { |
| 619 | // TODO: Should this be skipped or otherwise logged and ignored? |
| 620 | return mount.ActiveMount{}, err |
| 621 | } |
| 622 | active.MountedAt = &mountedAt |
| 623 | } |
| 624 | |
| 625 | return active, nil |
| 626 | } |
| 627 | |
| 628 | func putSystemMount(bkt *bolt.Bucket, m mount.Mount) error { |
| 629 | if err := bkt.Put(bucketKeyType, []byte(m.Type)); err != nil { |
no test coverage detected
searching dependent graphs…