Beispiel #1
0
func (*Ufs) Attach(req *srv.Req) {
	if req.Afid != nil {
		req.RespondError(srv.Enoauth)
		return
	}

	tc := req.Tc
	fid := new(Fid)
	if len(tc.Aname) == 0 {
		fid.path = *root
	} else {
		fid.path = tc.Aname
	}

	req.Fid.Aux = fid
	err := fid.stat()
	if err != nil {
		req.RespondError(err)
		return
	}

	qid := dir2Qid(fid.st)
	req.RespondRattach(qid)
}
Beispiel #2
0
func (n *Server) Attach(req *go9ps.Req) {
	fmt.Printf("Attach fid=%d\n", req.Tc.Fid)
	qids := newQids(req.Tc.Mode)
	req.RespondRattach(&qids[0])
}