Forráskód Böngészése

just replace "ngvfs" to "openngvfs".

ZRY 2 hónapja
szülő
commit
4e26d6dbdd

+ 6 - 6
openngvfs/hieda_adapter.go

@@ -14,14 +14,14 @@ type LoggerHiedaLogAdapter struct {
 }
 
 func (e LoggerHiedaLogAdapter) FsInitWasm(name string) {
-	e.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+	e.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 		"type": "will_init_by_wasm",
 		"wasm": name,
 	})
 }
 
 func (e LoggerHiedaLogAdapter) ChildFsError(mid int64, fstype, mountpoint, path, action string, rawErr error) {
-	e.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+	e.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 		"type":    "child_fs_error",
 		"path":    path,
 		"fstype":  fstype,
@@ -33,7 +33,7 @@ func (e LoggerHiedaLogAdapter) ChildFsError(mid int64, fstype, mountpoint, path,
 }
 
 func (e LoggerHiedaLogAdapter) NoAvailableMountPointForThisPath(path string, action string) {
-	e.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+	e.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 		"type":   "no_mnt_point_error",
 		"path":   path,
 		"action": action,
@@ -41,14 +41,14 @@ func (e LoggerHiedaLogAdapter) NoAvailableMountPointForThisPath(path string, act
 }
 
 func (e LoggerHiedaLogAdapter) InitError(err error) {
-	e.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
-		"type":    "ngvfs_init_error",
+	e.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
+		"type":    "openngvfs_init_error",
 		"raw_err": err.Error(),
 	})
 }
 
 func (e LoggerHiedaLogAdapter) UnknownError(path string, action string, err error) {
-	e.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+	e.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 		"type":    "unknown_error",
 		"path":    path,
 		"action":  action,

+ 4 - 4
openngvfs/ngvfs.go

@@ -39,7 +39,7 @@ func (n *OpenNagaeVFS) errorProcess(path, action string, err error) error {
 		}
 		switch aErr.GetErrNo() {
 		case amntfs.ErrChildFsError:
-			n.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			n.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type":    "child_fs_error",
 				"path":    path,
 				"fstype":  aErr.GetFsType(),
@@ -50,14 +50,14 @@ func (n *OpenNagaeVFS) errorProcess(path, action string, err error) error {
 			})
 			return rawErr
 		case amntfs.ErrNoAvailableMountPointForThisPath:
-			n.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			n.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type":   "no_mnt_point_error",
 				"path":   path,
 				"action": action,
 			})
 			return fmt.Errorf("no available mount point for path '%s'", path)
 		default:
-			n.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			n.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type":    "unknown_error",
 				"path":    path,
 				"action":  action,
@@ -72,7 +72,7 @@ func (n *OpenNagaeVFS) errorProcess(path, action string, err error) error {
 		} else {
 			xerrStr = ""
 		}
-		n.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+		n.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 			"type":    "unknown_error",
 			"path":    path,
 			"action":  action,

+ 6 - 6
openngvfs/wa_init_api.go

@@ -191,7 +191,7 @@ func (a *InitWAVMHostModuleAdapter) efnVfsMount(_ context.Context, mod wa_api.Mo
 				rawErrStr = ""
 			}
 			if aErr.GetErrNo() == amntfs.ErrMountPointAlreadyMounted {
-				a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+				a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 					"type":          "mount_error",
 					"sub-type":      "mount_point_already_mounted",
 					"mnt-point":     string(mntPath),
@@ -202,7 +202,7 @@ func (a *InitWAVMHostModuleAdapter) efnVfsMount(_ context.Context, mod wa_api.Mo
 				stack[0] = uint64(neg3)
 				return
 			} else {
-				a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+				a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 					"type":          "mount_error",
 					"sub-type":      "internal_error",
 					"mnt-point":     string(mntPath),
@@ -215,7 +215,7 @@ func (a *InitWAVMHostModuleAdapter) efnVfsMount(_ context.Context, mod wa_api.Mo
 				return
 			}
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type":          "mount_error",
 				"sub-type":      "internal_error",
 				"mnt-point":     string(mntPath),
@@ -228,7 +228,7 @@ func (a *InitWAVMHostModuleAdapter) efnVfsMount(_ context.Context, mod wa_api.Mo
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs", hiedalog.DLN_VERBOSE, map[string]string{
+	a.logger.LogComplex("openngvfs", hiedalog.DLN_VERBOSE, map[string]string{
 		"type":          "mount_ok",
 		"mnt-point":     string(mntPath),
 		"afs-name":      objAfs.Fs.Name(),
@@ -250,7 +250,7 @@ func (a *InitWAVMHostModuleAdapter) efnVfsMkdir(_ context.Context, mod wa_api.Mo
 	}
 	err := a.api.Root.MkdirAll(string(dirPath), os.FileMode(perm))
 	if err != nil {
-		a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+		a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 			"type":     "vfs_mkdir_error",
 			"dir-path": string(dirPath),
 			"perm":     fmt.Sprintf("%04o", perm),
@@ -260,7 +260,7 @@ func (a *InitWAVMHostModuleAdapter) efnVfsMkdir(_ context.Context, mod wa_api.Mo
 		stack[0] = uint64(ecode)
 		return
 	}
-	a.logger.LogComplex("ngvfs", hiedalog.DLN_VERBOSE, map[string]string{
+	a.logger.LogComplex("openngvfs", hiedalog.DLN_VERBOSE, map[string]string{
 		"type": "vfs_mkdir_ok",
 		"path": string(dirPath),
 	})

+ 33 - 33
openngvfs/wa_init_api_afs.go

@@ -58,7 +58,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsFree(_ context.Context, _ wa_api.Modul
 	}
 	_, ok := a.api.AferoFsInstancesMgr.Release(hAfs)
 	if !ok {
-		a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+		a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 			"type":   "afs_release_error",
 			"handle": fmt.Sprintf("%d", hAfs),
 		})
@@ -66,7 +66,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsFree(_ context.Context, _ wa_api.Modul
 		stack[0] = uint64(neg1)
 		return
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":   "afs_free_ok",
 		"handle": fmt.Sprintf("%d", hAfs),
 	})
@@ -98,7 +98,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsMkdir(_ context.Context, mod wa_api.Mo
 	}
 	err := objAfs.Fs.MkdirAll(string(dirPath), os.FileMode(perm))
 	if err != nil {
-		a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+		a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 			"type":     "afs_mkdir_error",
 			"dir-path": string(dirPath),
 			"afs":      fmt.Sprintf("%d", hAfs),
@@ -109,7 +109,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsMkdir(_ context.Context, mod wa_api.Mo
 		stack[0] = uint64(ecode)
 		return
 	}
-	a.logger.LogComplex("ngvfs", hiedalog.DLN_VERBOSE, map[string]string{
+	a.logger.LogComplex("openngvfs", hiedalog.DLN_VERBOSE, map[string]string{
 		"type": "afs_mkdir_ok",
 		"afs":  fmt.Sprintf("%d", hAfs),
 		"path": string(dirPath),
@@ -127,7 +127,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateOsFs(_ context.Context, _ wa_api
 	h, err := a.api.AferoFsInstancesMgr.AllocateAndPut(afsObj)
 	if err != nil {
 		if err == go_int32_handle.ErrHandleExceedMax {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  "handle exceed max",
 			})
@@ -135,7 +135,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateOsFs(_ context.Context, _ wa_api
 			stack[0] = uint64(ecode)
 			return
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  err.Error(),
 			})
@@ -144,7 +144,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateOsFs(_ context.Context, _ wa_api
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":   "afs_create_osfs_ok",
 		"handle": fmt.Sprintf("%d", h),
 	})
@@ -160,7 +160,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateMemFs(_ context.Context, _ wa_ap
 	h, err := a.api.AferoFsInstancesMgr.AllocateAndPut(afsObj)
 	if err != nil {
 		if err == go_int32_handle.ErrHandleExceedMax {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  "handle exceed max",
 			})
@@ -168,7 +168,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateMemFs(_ context.Context, _ wa_ap
 			stack[0] = uint64(ecode)
 			return
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  err.Error(),
 			})
@@ -177,7 +177,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateMemFs(_ context.Context, _ wa_ap
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":   "afs_create_memfs_ok",
 		"handle": fmt.Sprintf("%d", h),
 	})
@@ -214,7 +214,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBpFs(_ context.Context, mod wa_a
 	h, err := a.api.AferoFsInstancesMgr.AllocateAndPut(afsObj)
 	if err != nil {
 		if err == go_int32_handle.ErrHandleExceedMax {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  "handle exceed max",
 			})
@@ -222,7 +222,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBpFs(_ context.Context, mod wa_a
 			stack[0] = uint64(ecode)
 			return
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  err.Error(),
 			})
@@ -231,7 +231,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBpFs(_ context.Context, mod wa_a
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":      "afs_create_bpfs_ok",
 		"handle":    fmt.Sprintf("%d", h),
 		"base-afs":  fmt.Sprintf("%d", hBaseAfs),
@@ -264,7 +264,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateRegFs(_ context.Context, mod wa_
 	}
 	cpdRegExp, err := regexp.Compile(string(strRegExp))
 	if err != nil {
-		a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+		a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 			"type": "afs_regfs_regexp_compile_error",
 			"msg":  err.Error(),
 		})
@@ -280,7 +280,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateRegFs(_ context.Context, mod wa_
 	h, err := a.api.AferoFsInstancesMgr.AllocateAndPut(afsObj)
 	if err != nil {
 		if err == go_int32_handle.ErrHandleExceedMax {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  "handle exceed max",
 			})
@@ -288,7 +288,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateRegFs(_ context.Context, mod wa_
 			stack[0] = uint64(ecode)
 			return
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  err.Error(),
 			})
@@ -297,7 +297,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateRegFs(_ context.Context, mod wa_
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":     "afs_create_regfs_ok",
 		"handle":   fmt.Sprintf("%d", h),
 		"base-afs": fmt.Sprintf("%d", hBaseAfs),
@@ -328,7 +328,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateRoFs(_ context.Context, _ wa_api
 	h, err := a.api.AferoFsInstancesMgr.AllocateAndPut(afsObj)
 	if err != nil {
 		if err == go_int32_handle.ErrHandleExceedMax {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  "handle exceed max",
 			})
@@ -336,7 +336,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateRoFs(_ context.Context, _ wa_api
 			stack[0] = uint64(ecode)
 			return
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  err.Error(),
 			})
@@ -345,7 +345,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateRoFs(_ context.Context, _ wa_api
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":     "afs_create_rofs_ok",
 		"handle":   fmt.Sprintf("%d", h),
 		"base-afs": fmt.Sprintf("%d", hBaseAfs),
@@ -386,7 +386,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateCowFs(_ context.Context, _ wa_ap
 	h, err := a.api.AferoFsInstancesMgr.AllocateAndPut(afsObj)
 	if err != nil {
 		if err == go_int32_handle.ErrHandleExceedMax {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  "handle exceed max",
 			})
@@ -394,7 +394,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateCowFs(_ context.Context, _ wa_ap
 			stack[0] = uint64(ecode)
 			return
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  err.Error(),
 			})
@@ -403,7 +403,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateCowFs(_ context.Context, _ wa_ap
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":        "afs_create_cowfs_ok",
 		"handle":      fmt.Sprintf("%d", h),
 		"base-ro-afs": fmt.Sprintf("%d", hRoAfs),
@@ -452,7 +452,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateCorFs(_ context.Context, _ wa_ap
 	h, err := a.api.AferoFsInstancesMgr.AllocateAndPut(afsObj)
 	if err != nil {
 		if err == go_int32_handle.ErrHandleExceedMax {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  "handle exceed max",
 			})
@@ -460,7 +460,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateCorFs(_ context.Context, _ wa_ap
 			stack[0] = uint64(ecode)
 			return
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  err.Error(),
 			})
@@ -469,7 +469,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateCorFs(_ context.Context, _ wa_ap
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":        "afs_create_corfs_ok",
 		"handle":      fmt.Sprintf("%d", h),
 		"base-ro-afs": fmt.Sprintf("%d", hRoAfs),
@@ -501,7 +501,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBepOvFs(_ context.Context, mod w
 			return
 		}
 		if len(b) != 4 {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type":     "afs_create_bep_ovfs_error",
 				"sub-type": "read_fs_layer_array_error",
 				"msg":      "the length of the array element is not 4",
@@ -518,7 +518,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBepOvFs(_ context.Context, mod w
 	afsObjArray := make([]afero.Fs, lenAfsArray)
 	for i, v := range sliceAfsHandleArray {
 		if v <= 0 {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type":     "afs_create_bep_ovfs_error",
 				"sub-type": "read_fs_layer_invalid_handle",
 				"msg":      "the value of this element is a invalid handle",
@@ -531,7 +531,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBepOvFs(_ context.Context, mod w
 		}
 		objV, ok := a.api.AferoFsInstancesMgr.Get(v)
 		if !ok {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type":     "afs_create_bep_ovfs_error",
 				"sub-type": "read_fs_layer_invalid_handle",
 				"msg":      "the value of this element is a invalid handle",
@@ -542,7 +542,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBepOvFs(_ context.Context, mod w
 			stack[0] = uint64(ecode)
 			return
 		}
-		a.logger.LogComplex("ngvfs", hiedalog.DLN_DEBUG, map[string]string{
+		a.logger.LogComplex("openngvfs", hiedalog.DLN_DEBUG, map[string]string{
 			"type":     "afs_create_bep_ovfs_debug",
 			"sub-type": "get_valid_fs_layer",
 			"i":        fmt.Sprintf("%d", i),
@@ -565,7 +565,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBepOvFs(_ context.Context, mod w
 	h, err := a.api.AferoFsInstancesMgr.AllocateAndPut(afsObj)
 	if err != nil {
 		if err == go_int32_handle.ErrHandleExceedMax {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  "handle exceed max",
 			})
@@ -573,7 +573,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBepOvFs(_ context.Context, mod w
 			stack[0] = uint64(ecode)
 			return
 		} else {
-			a.logger.LogComplex("ngvfs", hiedalog.DLN_ERROR, map[string]string{
+			a.logger.LogComplex("openngvfs", hiedalog.DLN_ERROR, map[string]string{
 				"type": "afs_handle_alloc_error",
 				"msg":  err.Error(),
 			})
@@ -582,7 +582,7 @@ func (a *InitWAVMHostModuleAdapter) efnAfsCreateBepOvFs(_ context.Context, mod w
 			return
 		}
 	}
-	a.logger.LogComplex("ngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
+	a.logger.LogComplex("openngvfs-debug", hiedalog.DLN_DEBUG, map[string]string{
 		"type":   "afs_create_bep_ovfs_ok",
 		"handle": fmt.Sprintf("%d", h),
 	})

+ 14 - 14
openngvfs/wa_init_vm.go

@@ -35,7 +35,7 @@ func NewInitWAVM(ctx context.Context, api *InitWAVMHostAPI, ngRoot string, appNa
 	if !ok {
 		return nil, fmt.Errorf("NAGAE_ROV_ROOT '%s' not exists", ngRoot)
 	}
-	pcache := path.Join(ngRoot, "cache", "wasm", "ngvfs", "app", appName)
+	pcache := path.Join(ngRoot, "cache", "wasm", "openngvfs", "app", appName)
 	err = pathutils.MkDirIfNotExist(pcache, 0755)
 	if !ok {
 		return nil, fmt.Errorf("failed create dir '%s' for wasm cache: %w", pcache, err)
@@ -45,7 +45,7 @@ func NewInitWAVM(ctx context.Context, api *InitWAVMHostAPI, ngRoot string, appNa
 	if !ok {
 		return nil, fmt.Errorf("failed create dir '%s' for wasm common osfs: %w", pcache, err)
 	}
-	fscfgRoot := path.Join(ngRoot, "syscfg", "ngvfs")
+	fscfgRoot := path.Join(ngRoot, "syscfg", "openngvfs")
 	fstabPath := path.Join(fscfgRoot, "fstab.toml")
 	waRoot := path.Join(fscfgRoot, "wasm")
 	fsTab, err := loadFsTab(fstabPath)
@@ -68,8 +68,8 @@ func NewInitWAVM(ctx context.Context, api *InitWAVMHostAPI, ngRoot string, appNa
 	}
 	wafscfg := wazero.NewFSConfig().
 		WithReadOnlyDirMount(pwar, "/osfs")
-	pStdout := NewIOWriterAdapter(logger, "ngvfs-vm-stdio", hiedalog.DLN_INFO)
-	pStderr := NewIOWriterAdapter(logger, "ngvfs-vm-stdio", hiedalog.DLN_WARN)
+	pStdout := NewIOWriterAdapter(logger, "openngvfs-vm-stdio", hiedalog.DLN_INFO)
+	pStderr := NewIOWriterAdapter(logger, "openngvfs-vm-stdio", hiedalog.DLN_WARN)
 	mcfg := wazero.NewModuleConfig().
 		WithFSConfig(wafscfg).
 		WithStderr(pStderr).
@@ -77,7 +77,7 @@ func NewInitWAVM(ctx context.Context, api *InitWAVMHostAPI, ngRoot string, appNa
 		WithEnv("NAGAE_ROV_ROOT", ngRoot).
 		WithEnv("NAGAE_APP_NAME", appName)
 	mainModCompiled, err := rt.CompileModule(ctx, wasmBin)
-	hostModuleBuilder := rt.NewHostModuleBuilder("ngvfs_init")
+	hostModuleBuilder := rt.NewHostModuleBuilder("openngvfs_init")
 	apiAdapter := NewInitWAVMHostModuleAdapter(hostModuleBuilder, api, fsTab, logger, appName)
 	if err != nil {
 		return nil, fmt.Errorf("failed compile wasm code: %w", err)
@@ -106,14 +106,14 @@ func (vm *InitWAVM) Init() error {
 	}
 	go func() {
 		vm.pStdout.Run()
-		vm.logger.LogComplex("ngvfs-vm", hiedalog.DLN_INFO, map[string]string{
+		vm.logger.LogComplex("openngvfs-vm", hiedalog.DLN_INFO, map[string]string{
 			"type": "stdio_routine_end",
 			"msg":  "stdout routine end",
 		})
 	}()
 	go func() {
 		vm.pStderr.Run()
-		vm.logger.LogComplex("ngvfs-vm", hiedalog.DLN_INFO, map[string]string{
+		vm.logger.LogComplex("openngvfs-vm", hiedalog.DLN_INFO, map[string]string{
 			"type": "stdio_routine_end",
 			"msg":  "stderr routine end",
 		})
@@ -148,13 +148,13 @@ func (vm *InitWAVM) AutoMount() error {
 	}
 	retval := ret[0]
 	if retval != 0 {
-		vm.logger.LogComplex("ngvfs-vm", hiedalog.DLN_ERROR, map[string]string{
+		vm.logger.LogComplex("openngvfs-vm", hiedalog.DLN_ERROR, map[string]string{
 			"type": "auto_mount_fail",
 			"msg":  fmt.Sprintf("auto mount returned %d", ret[0]),
 		})
 		return fmt.Errorf("error when calling `auto_mount`: returned non-zero vaule: %d", retval)
 	}
-	vm.logger.LogComplex("ngvfs-vm", hiedalog.DLN_INFO, map[string]string{
+	vm.logger.LogComplex("openngvfs-vm", hiedalog.DLN_INFO, map[string]string{
 		"type": "auto_mount_ok",
 		"msg":  fmt.Sprintf("auto mount ok"),
 	})
@@ -163,14 +163,14 @@ func (vm *InitWAVM) AutoMount() error {
 
 func (vm *InitWAVM) DeInit() error {
 	if vm.pStdout == nil {
-		vm.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+		vm.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 			"type": "deinit_warn",
 			"msg":  "stdout is not initialized",
 		})
 	} else {
 		err := vm.pStdout.Close()
 		if err != nil {
-			vm.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			vm.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "deinit_warn",
 				"msg":  "close stdout error",
 				"err":  err.Error(),
@@ -178,14 +178,14 @@ func (vm *InitWAVM) DeInit() error {
 		}
 	}
 	if vm.pStderr == nil {
-		vm.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+		vm.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 			"type": "deinit_warn",
 			"msg":  "stderr is not initialized",
 		})
 	} else {
 		err := vm.pStderr.Close()
 		if err != nil {
-			vm.logger.LogComplex("ngvfs", hiedalog.DLN_WARN, map[string]string{
+			vm.logger.LogComplex("openngvfs", hiedalog.DLN_WARN, map[string]string{
 				"type": "deinit_warn",
 				"msg":  "close stderr error",
 				"err":  err.Error(),
@@ -203,7 +203,7 @@ func getWasmFromFstab(waRoot string, fstab *RawFsTab, appName string, logger *hi
 		waName = fstab.Wasm.Default
 	}
 	waFileName := path.Join(waRoot, waName+".wasm")
-	logger.LogComplex("ngvfs", hiedalog.DLN_INFO, map[string]string{
+	logger.LogComplex("openngvfs", hiedalog.DLN_INFO, map[string]string{
 		"type":      "will_init_by_wasm",
 		"wasm_name": waName,
 		"wasm_file": waFileName,