提交 bda00e67 编写于 作者: O openharmony_ci 提交者: Gitee

!655 TCB中使用的execFile字段改为execVnode

Merge pull request !655 from LeonChan/execfile
...@@ -434,7 +434,6 @@ int VnodeLookupAt(const char *path, struct Vnode **result, uint32_t flags, struc ...@@ -434,7 +434,6 @@ int VnodeLookupAt(const char *path, struct Vnode **result, uint32_t flags, struc
currentVnode->filePath[vnodePathLen] = 0; currentVnode->filePath[vnodePathLen] = 0;
} }
} }
return ret;
OUT_FREE_PATH: OUT_FREE_PATH:
if (normalizedPath) { if (normalizedPath) {
......
...@@ -121,7 +121,7 @@ typedef struct ProcessCB { ...@@ -121,7 +121,7 @@ typedef struct ProcessCB {
TimerIdMap timerIdMap; TimerIdMap timerIdMap;
#endif #endif
#ifdef LOSCFG_DRIVERS_TZDRIVER #ifdef LOSCFG_DRIVERS_TZDRIVER
struct file *execFile; /**< Exec bin of the process */ struct Vnode *execVnode; /**< Exec bin of the process */
#endif #endif
mode_t umask; mode_t umask;
#ifdef LOSCFG_KERNEL_CPUP #ifdef LOSCFG_KERNEL_CPUP
......
...@@ -225,12 +225,14 @@ STATIC INT32 OsReadEhdr(const CHAR *fileName, ELFInfo *elfInfo, BOOL isExecFile) ...@@ -225,12 +225,14 @@ STATIC INT32 OsReadEhdr(const CHAR *fileName, ELFInfo *elfInfo, BOOL isExecFile)
#ifdef LOSCFG_DRIVERS_TZDRIVER #ifdef LOSCFG_DRIVERS_TZDRIVER
if (isExecFile) { if (isExecFile) {
ret = fs_getfilep(GetAssociatedSystemFd(elfInfo->procfd), &OsCurrProcessGet()->execFile); struct file *filep;
ret = fs_getfilep(GetAssociatedSystemFd(elfInfo->procfd), &filep);
if (ret) { if (ret) {
PRINT_ERR("%s[%d], Failed to get struct file %s!\n", __FUNCTION__, __LINE__, fileName); PRINT_ERR("%s[%d], Failed to get struct file %s!\n", __FUNCTION__, __LINE__, fileName);
/* File will be closed by OsLoadELFFile */ /* File will be closed by OsLoadELFFile */
return ret; return ret;
} }
OsCurrProcessGet()->execVnode = filep->f_vnode;
} }
#endif #endif
ret = OsReadELFInfo(elfInfo->procfd, (UINT8 *)&elfInfo->elfEhdr, sizeof(LD_ELF_EHDR), 0); ret = OsReadELFInfo(elfInfo->procfd, (UINT8 *)&elfInfo->elfEhdr, sizeof(LD_ELF_EHDR), 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册