Ejemplo n.º 1
0
func bridgeLookup(fsId int, ino int64, name string, handler replyHandler) {
	req := newReq(handler, fsId)
	defer freeReq(req)
	cstr := C.CString(name)
	defer C.free(unsafe.Pointer(cstr))
	C.bridge_lookup(req, C.fuse_ino_t(ino), cstr)
}
Ejemplo n.º 2
0
func (e *Entry) toCEntry(o *C.struct_fuse_entry_param) {
	o.ino = C.fuse_ino_t(e.Ino)
	o.generation = C.ulong(e.Generation)
	e.Attr.toCStat(&o.attr, nil)
	o.attr_timeout = C.double(e.AttrTimeout)
	o.entry_timeout = C.double(e.EntryTimeout)
}
Ejemplo n.º 3
0
func bridgeStatFs(fsId int, ino int64, handler replyHandler) {
	req := newReq(handler, fsId)
	defer freeReq(req)
	C.bridge_statfs(req, C.fuse_ino_t(ino))
}
Ejemplo n.º 4
0
func bridgeGetAttr(fsId int, ino int64, handler replyHandler) {
	req := newReq(handler, fsId)
	defer freeReq(req)
	C.bridge_getattr(req, C.fuse_ino_t(ino), (*C.struct_fuse_file_info)(nil))
}
Ejemplo n.º 5
0
func bridgeForget(fsId int, ino int64, n int64, handler replyHandler) {
	req := newReq(handler, fsId)
	defer freeReq(req)
	C.bridge_forget(req, C.fuse_ino_t(ino), C.ulong(n))
}
Ejemplo n.º 6
0
func (d *dirBuf) Add(name string, ino int64, mode int, next int64) bool {
	cstr := C.CString(name)
	res := C.DirBufAdd(d.db, cstr, C.fuse_ino_t(ino), C.int(mode), C.off_t(next))
	C.free(unsafe.Pointer(cstr))
	return res == 0
}