summaryrefslogtreecommitdiffstats
path: root/back/cmd/authfs/sessdir.go
diff options
context:
space:
mode:
Diffstat (limited to 'back/cmd/authfs/sessdir.go')
-rw-r--r--back/cmd/authfs/sessdir.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/back/cmd/authfs/sessdir.go b/back/cmd/authfs/sessdir.go
index 186484f..eafc92f 100644
--- a/back/cmd/authfs/sessdir.go
+++ b/back/cmd/authfs/sessdir.go
@@ -3,6 +3,8 @@ package main
import (
"sync"
+ p9 "github.com/Harvey-OS/ninep/protocol"
+
"git.samanthony.xyz/buth/back/auth"
"git.samanthony.xyz/buth/back/qver"
)
@@ -58,3 +60,15 @@ func (dir *SessionsDir) Kill(id auth.SessId) {
dir.Version.Bump()
}
}
+
+func (dir *SessionsDir) Qid() (p9.QID, error) {
+ ver, err := dir.Version.Get()
+ if err != nil {
+ return p9.QID{}, err
+ }
+ return p9.QID{
+ Type: p9.QTDIR,
+ Version: ver,
+ Path: sessionsQidPath,
+ }, nil
+}