Example #1
0
func (me *HammerFs) GetAttr(*fuse.GetAttrIn, *fuse.AttrOut) fuse.Status {
	new_vop_getattr_args := new(sys.Vop_getattr_args)
	vop_getattr_args := new_vop_getattr_args
	new_vnode := new(sys.Vnode)
	vop_getattr_args.A_vp = new_vnode
	pointer := new(int)
	vop_getattr_args.A_vp.V_data = unsafe.Pointer(pointer)
	result := hammer.Hammer_vop_getattr(vop_getattr_args)
	//fmt.Println("vop_getattr_args ==", vop_getattr_args)
	//fmt.Println("result ==", result)
	temporary_translation_utilities.Use_vars_so_compiler_does_not_complain(result)
	//fmt.Println("fuse.ENOENT ==", fuse.ENOENT)
	return fuse.ENOENT
}
Example #2
0
//
//func (me *HammerFs) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status) {
//func (me *HammerFs) GetAttr(vop_getattr_args *sys.Vop_getattr_args) (*fuse.Attr, fuse.Status) {
func (me *HammerFs) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status) {
	var vop_getattr_args *sys.Vop_getattr_args
	result := hammer.Hammer_vop_getattr(vop_getattr_args)
	//	switch name {
	//	case "file.txt":
	//		return &fuse.Attr{
	//			Mode: fuse.S_IFREG | 0644, Size: uint64(len(name)),
	//		}, fuse.OK
	//	case "":
	//		return &fuse.Attr{
	//			Mode: fuse.S_IFDIR | 0755,
	//		}, fuse.OK
	//	}
	fmt.Println("vop_getattr_args ==", vop_getattr_args)
	fmt.Println("result ==", result)
	//	return nil, fuse.ENOENT
	return nil, fuse.ENOENT
}