[PATCH 04/12] shell: Rename "IO" typedef for better Doxygen

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Dec 1 08:10:05 UTC 2020


An automatic link from every place in the documentation which mentions
"IO" to this dd command internal "IO" typedef is not really nice.
---
 cpukit/libmisc/shell/dd.h        | 4 ++--
 cpukit/libmisc/shell/extern-dd.h | 4 ++--
 cpukit/libmisc/shell/main_dd.c   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cpukit/libmisc/shell/dd.h b/cpukit/libmisc/shell/dd.h
index dc80765d48..75012e707e 100644
--- a/cpukit/libmisc/shell/dd.h
+++ b/cpukit/libmisc/shell/dd.h
@@ -61,7 +61,7 @@ typedef struct {
 	const char	*name;		/* name */
 	int		fd;		/* file descriptor */
 	off_t		offset;		/* # of blocks to skip */
-} IO;
+} rtems_shell_dd_IO;
 
 typedef struct {
 	uintmax_t	in_full;	/* # of full input blocks */
@@ -72,7 +72,7 @@ typedef struct {
 	uintmax_t	swab;		/* # of odd-length swab blocks */
 	uintmax_t	bytes;		/* # of bytes written */
 	double		start;		/* start time of dd */
-} STAT;
+} rtems_shell_dd_STAT;
 
 /* Flags (in ddflags). */
 #define	C_ASCII		0x00001
diff --git a/cpukit/libmisc/shell/extern-dd.h b/cpukit/libmisc/shell/extern-dd.h
index 405d460ef3..6dc2db0180 100644
--- a/cpukit/libmisc/shell/extern-dd.h
+++ b/cpukit/libmisc/shell/extern-dd.h
@@ -40,8 +40,8 @@
 #include <setjmp.h>
 
 typedef struct rtems_shell_dd_globals_t {
-  IO	in, out;		/* input/output state */
-  STAT	st;			/* statistics */
+  rtems_shell_dd_IO	in, out;		/* input/output state */
+  rtems_shell_dd_STAT	st;			/* statistics */
   void	(*cfunc)(struct rtems_shell_dd_globals_t* globals);		/* conversion function */
   uintmax_t cpy_cnt;		/* # of blocks to copy */
   u_int	ddflags;		/* conversion options */
diff --git a/cpukit/libmisc/shell/main_dd.c b/cpukit/libmisc/shell/main_dd.c
index 35cd826711..93cd4cc8f5 100644
--- a/cpukit/libmisc/shell/main_dd.c
+++ b/cpukit/libmisc/shell/main_dd.c
@@ -86,7 +86,7 @@ __FBSDID("$FreeBSD: src/bin/dd/dd.c,v 1.43 2004/08/15 19:10:05 rwatson Exp $");
 
 static void dd_close(rtems_shell_dd_globals* globals);
 static void dd_in(rtems_shell_dd_globals* globals);
-static void getfdtype(rtems_shell_dd_globals* globals, IO *);
+static void getfdtype(rtems_shell_dd_globals* globals, rtems_shell_dd_IO *);
 static void setup(rtems_shell_dd_globals* globals);
 
 #if RTEMS_REMOVED
@@ -299,7 +299,7 @@ setup(rtems_shell_dd_globals* globals)
 }
 
 static void
-getfdtype(rtems_shell_dd_globals* globals, IO *io)
+getfdtype(rtems_shell_dd_globals* globals, rtems_shell_dd_IO *io)
 {
 	struct stat sb;
 #if RTEMS_REMOVED
-- 
2.26.2



More information about the devel mailing list