You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2021/12/06 02:24:07 UTC
[incubator-nuttx] branch master updated: arch: Remove FILE dump code from _up_dumponexit
This is an automated email from the ASF dual-hosted git repository.
masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 19e5ee6 arch: Remove FILE dump code from _up_dumponexit
19e5ee6 is described below
commit 19e5ee6ce0462d961f96e4291abeb4a20c414ef4
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Oct 31 18:38:16 2021 +0800
arch: Remove FILE dump code from _up_dumponexit
since the kernel build can't access the userspace memory
inside other process directly
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
arch/arm/src/common/arm_exit.c | 25 -------------------------
arch/avr/src/common/up_exit.c | 25 -------------------------
arch/hc/src/common/up_exit.c | 25 -------------------------
arch/mips/src/common/mips_exit.c | 25 -------------------------
arch/misoc/src/lm32/lm32_exit.c | 25 -------------------------
arch/misoc/src/minerva/minerva_exit.c | 24 ------------------------
arch/or1k/src/common/up_exit.c | 25 -------------------------
arch/renesas/src/common/up_exit.c | 25 -------------------------
arch/risc-v/src/common/riscv_exit.c | 25 -------------------------
arch/x86/src/common/up_exit.c | 25 -------------------------
arch/x86_64/src/common/up_exit.c | 25 -------------------------
arch/xtensa/src/common/xtensa_exit.c | 25 -------------------------
arch/z16/src/common/z16_exit.c | 25 -------------------------
arch/z80/src/common/z80_exit.c | 25 -------------------------
14 files changed, 349 deletions(-)
diff --git a/arch/arm/src/common/arm_exit.c b/arch/arm/src/common/arm_exit.c
index 6f4c84d..dfe2f3f 100644
--- a/arch/arm/src/common/arm_exit.c
+++ b/arch/arm/src/common/arm_exit.c
@@ -65,9 +65,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -88,28 +85,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/avr/src/common/up_exit.c b/arch/avr/src/common/up_exit.c
index 201248d..7dd1e69 100644
--- a/arch/avr/src/common/up_exit.c
+++ b/arch/avr/src/common/up_exit.c
@@ -64,9 +64,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -87,28 +84,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/hc/src/common/up_exit.c b/arch/hc/src/common/up_exit.c
index b9abf90..6027f4f 100644
--- a/arch/hc/src/common/up_exit.c
+++ b/arch/hc/src/common/up_exit.c
@@ -64,9 +64,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -87,28 +84,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/mips/src/common/mips_exit.c b/arch/mips/src/common/mips_exit.c
index 4e6ae41..efa0d4f 100644
--- a/arch/mips/src/common/mips_exit.c
+++ b/arch/mips/src/common/mips_exit.c
@@ -66,9 +66,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -89,28 +86,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/misoc/src/lm32/lm32_exit.c b/arch/misoc/src/lm32/lm32_exit.c
index d9f2484..9cb1307 100644
--- a/arch/misoc/src/lm32/lm32_exit.c
+++ b/arch/misoc/src/lm32/lm32_exit.c
@@ -58,9 +58,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -81,28 +78,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/misoc/src/minerva/minerva_exit.c b/arch/misoc/src/minerva/minerva_exit.c
index 30e675c..d888bb9 100644
--- a/arch/misoc/src/minerva/minerva_exit.c
+++ b/arch/misoc/src/minerva/minerva_exit.c
@@ -58,9 +58,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -81,27 +78,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd, filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/or1k/src/common/up_exit.c b/arch/or1k/src/common/up_exit.c
index 2710c2b..a303c65 100644
--- a/arch/or1k/src/common/up_exit.c
+++ b/arch/or1k/src/common/up_exit.c
@@ -65,9 +65,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -88,28 +85,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/renesas/src/common/up_exit.c b/arch/renesas/src/common/up_exit.c
index 28c552f..dcdcde3 100644
--- a/arch/renesas/src/common/up_exit.c
+++ b/arch/renesas/src/common/up_exit.c
@@ -64,9 +64,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -87,28 +84,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/risc-v/src/common/riscv_exit.c b/arch/risc-v/src/common/riscv_exit.c
index 681d754..f8647be 100644
--- a/arch/risc-v/src/common/riscv_exit.c
+++ b/arch/risc-v/src/common/riscv_exit.c
@@ -66,9 +66,6 @@
static void _up_dumponexit(struct tcb_s *tcb, void *arg)
{
struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- struct file_struct *filep;
-#endif
int i;
int j;
@@ -89,28 +86,6 @@ static void _up_dumponexit(struct tcb_s *tcb, void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/x86/src/common/up_exit.c b/arch/x86/src/common/up_exit.c
index aab3c4c..4871346 100644
--- a/arch/x86/src/common/up_exit.c
+++ b/arch/x86/src/common/up_exit.c
@@ -64,9 +64,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -87,28 +84,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/x86_64/src/common/up_exit.c b/arch/x86_64/src/common/up_exit.c
index bfe57a6..80bee07 100644
--- a/arch/x86_64/src/common/up_exit.c
+++ b/arch/x86_64/src/common/up_exit.c
@@ -64,9 +64,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -87,28 +84,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/xtensa/src/common/xtensa_exit.c b/arch/xtensa/src/common/xtensa_exit.c
index f19698a..2f9ab49 100644
--- a/arch/xtensa/src/common/xtensa_exit.c
+++ b/arch/xtensa/src/common/xtensa_exit.c
@@ -66,9 +66,6 @@
static void _xtensa_dumponexit(struct tcb_s *tcb, void *arg)
{
struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- struct file_struct *filep;
-#endif
int i;
int j;
@@ -89,28 +86,6 @@ static void _xtensa_dumponexit(struct tcb_s *tcb, void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/z16/src/common/z16_exit.c b/arch/z16/src/common/z16_exit.c
index 98d5103..0936a8b 100644
--- a/arch/z16/src/common/z16_exit.c
+++ b/arch/z16/src/common/z16_exit.c
@@ -64,9 +64,6 @@
static void _z16_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -87,28 +84,6 @@ static void _z16_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif
diff --git a/arch/z80/src/common/z80_exit.c b/arch/z80/src/common/z80_exit.c
index ce11c04..bd7142c 100644
--- a/arch/z80/src/common/z80_exit.c
+++ b/arch/z80/src/common/z80_exit.c
@@ -66,9 +66,6 @@
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
FAR struct filelist *filelist;
-#ifdef CONFIG_FILE_STREAM
- FAR struct file_struct *filep;
-#endif
int i;
int j;
@@ -89,28 +86,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
}
}
}
-
-#ifdef CONFIG_FILE_STREAM
- filep = tcb->group->tg_streamlist->sl_head;
- for (; filep != NULL; filep = filep->fs_next)
- {
- if (filep->fs_fd >= 0)
- {
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
- if (filep->fs_bufstart != NULL)
- {
- sinfo(" fd=%d nbytes=%d\n",
- filep->fs_fd,
- filep->fs_bufpos - filep->fs_bufstart);
- }
- else
-#endif
- {
- sinfo(" fd=%d\n", filep->fs_fd);
- }
- }
- }
-#endif
}
#endif