예제 #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)
}
예제 #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)
}
예제 #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))
}
예제 #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))
}
예제 #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))
}
예제 #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
}