* [PATCH] xmon consistency clean up
@ 2007-07-25 2:57 Ishizaki Kou
2007-07-25 6:21 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 5+ messages in thread
From: Ishizaki Kou @ 2007-07-25 2:57 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
This patch cleans up xmon to keep consistency.
In xmon, we should use console I/O functions that are named the same
as user space stdio functions. But commit
4d404edce30f911004850d472e05a31efd751662 broke this consistency.
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
---
Index: linux-powerpc-git/arch/powerpc/xmon/nonstdio.c
===================================================================
--- linux-powerpc-git.orig/arch/powerpc/xmon/nonstdio.c
+++ linux-powerpc-git/arch/powerpc/xmon/nonstdio.c
@@ -133,7 +133,7 @@ void xmon_printf(const char *format, ...
xmon_write(xmon_outbuf, n);
}
-void xmon_puts(const char *str)
+void xmon_fputs(const char *str)
{
xmon_write(str, strlen(str));
}
Index: linux-powerpc-git/arch/powerpc/xmon/nonstdio.h
===================================================================
--- linux-powerpc-git.orig/arch/powerpc/xmon/nonstdio.h
+++ linux-powerpc-git/arch/powerpc/xmon/nonstdio.h
@@ -2,10 +2,11 @@
#define printf xmon_printf
#define putchar xmon_putchar
+#define fputs(str,stream) xmon_fputs(str) /* stream is ignored. */
extern int xmon_putchar(int c);
extern int xmon_getchar(void);
-extern void xmon_puts(const char *);
+extern void xmon_fputs(const char *);
extern char *xmon_gets(char *, int);
extern void xmon_printf(const char *, ...);
extern void xmon_map_scc(void);
Index: linux-powerpc-git/arch/powerpc/xmon/xmon.c
===================================================================
--- linux-powerpc-git.orig/arch/powerpc/xmon/xmon.c
+++ linux-powerpc-git/arch/powerpc/xmon/xmon.c
@@ -833,7 +833,7 @@ cmds(struct pt_regs *excp)
mdelay(2000);
return cmd;
case '?':
- xmon_puts(help_string);
+ fputs(help_string, stdout);
break;
case 'b':
bpt_cmds();
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xmon consistency clean up
2007-07-25 2:57 [PATCH] xmon consistency clean up Ishizaki Kou
@ 2007-07-25 6:21 ` Benjamin Herrenschmidt
2007-07-25 12:13 ` Michael Ellerman
0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2007-07-25 6:21 UTC (permalink / raw)
To: Ishizaki Kou; +Cc: linuxppc-dev, paulus
On Wed, 2007-07-25 at 11:57 +0900, Ishizaki Kou wrote:
> This patch cleans up xmon to keep consistency.
>
> In xmon, we should use console I/O functions that are named the same
> as user space stdio functions. But commit
> 4d404edce30f911004850d472e05a31efd751662 broke this consistency.
>
> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
> ---
>
> Index: linux-powerpc-git/arch/powerpc/xmon/nonstdio.c
> ===================================================================
> --- linux-powerpc-git.orig/arch/powerpc/xmon/nonstdio.c
> +++ linux-powerpc-git/arch/powerpc/xmon/nonstdio.c
> @@ -133,7 +133,7 @@ void xmon_printf(const char *format, ...
> xmon_write(xmon_outbuf, n);
> }
>
> -void xmon_puts(const char *str)
> +void xmon_fputs(const char *str)
> {
> xmon_write(str, strlen(str));
Nah, keep it xmon_puts, since it doesn't take a stream argument and
define a "puts" for use by xmon core.
Ben.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xmon consistency clean up
2007-07-25 6:21 ` Benjamin Herrenschmidt
@ 2007-07-25 12:13 ` Michael Ellerman
2007-07-25 14:25 ` Grant Likely
2007-07-27 6:11 ` Ishizaki Kou
0 siblings, 2 replies; 5+ messages in thread
From: Michael Ellerman @ 2007-07-25 12:13 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus
[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]
On Wed, 2007-07-25 at 16:21 +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2007-07-25 at 11:57 +0900, Ishizaki Kou wrote:
> > This patch cleans up xmon to keep consistency.
> >
> > In xmon, we should use console I/O functions that are named the same
> > as user space stdio functions. But commit
> > 4d404edce30f911004850d472e05a31efd751662 broke this consistency.
> >
> > Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
> > ---
> >
> > Index: linux-powerpc-git/arch/powerpc/xmon/nonstdio.c
> > ===================================================================
> > --- linux-powerpc-git.orig/arch/powerpc/xmon/nonstdio.c
> > +++ linux-powerpc-git/arch/powerpc/xmon/nonstdio.c
> > @@ -133,7 +133,7 @@ void xmon_printf(const char *format, ...
> > xmon_write(xmon_outbuf, n);
> > }
> >
> > -void xmon_puts(const char *str)
> > +void xmon_fputs(const char *str)
> > {
> > xmon_write(str, strlen(str));
>
> Nah, keep it xmon_puts, since it doesn't take a stream argument and
> define a "puts" for use by xmon core.
But then it needs to add a newline .. and we've gone around in a circle
again. Funny how the trivialest of patches gets the most review.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xmon consistency clean up
2007-07-25 12:13 ` Michael Ellerman
@ 2007-07-25 14:25 ` Grant Likely
2007-07-27 6:11 ` Ishizaki Kou
1 sibling, 0 replies; 5+ messages in thread
From: Grant Likely @ 2007-07-25 14:25 UTC (permalink / raw)
To: michael; +Cc: paulus, linuxppc-dev
On 7/25/07, Michael Ellerman <michael@ellerman.id.au> wrote:
> On Wed, 2007-07-25 at 16:21 +1000, Benjamin Herrenschmidt wrote:
> > Nah, keep it xmon_puts, since it doesn't take a stream argument and
> > define a "puts" for use by xmon core.
>
> But then it needs to add a newline .. and we've gone around in a circle
> again. Funny how the trivialest of patches gets the most review.
And the bike shed needs to be green.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#BIKESHED-PAINTING
:-)
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xmon consistency clean up
2007-07-25 12:13 ` Michael Ellerman
2007-07-25 14:25 ` Grant Likely
@ 2007-07-27 6:11 ` Ishizaki Kou
1 sibling, 0 replies; 5+ messages in thread
From: Ishizaki Kou @ 2007-07-27 6:11 UTC (permalink / raw)
To: benh, michael; +Cc: linuxppc-dev, paulus
Michael Ellerman <michael@ellerman.id.au> wrote:
> On Wed, 2007-07-25 at 16:21 +1000, Benjamin Herrenschmidt wrote:
> > On Wed, 2007-07-25 at 11:57 +0900, Ishizaki Kou wrote:
> > > This patch cleans up xmon to keep consistency.
> > >
> > > In xmon, we should use console I/O functions that are named the
same
> > > as user space stdio functions. But commit
> > > 4d404edce30f911004850d472e05a31efd751662 broke this consistency.
> > >
> > > Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
> > > ---
> > >
> > > Index: linux-powerpc-git/arch/powerpc/xmon/nonstdio.c
> > >
===================================================================
> > > --- linux-powerpc-git.orig/arch/powerpc/xmon/nonstdio.c
> > > +++ linux-powerpc-git/arch/powerpc/xmon/nonstdio.c
> > > @@ -133,7 +133,7 @@ void xmon_printf(const char *format, ...
> > > xmon_write(xmon_outbuf, n);
> > > }
> > >
> > > -void xmon_puts(const char *str)
> > > +void xmon_fputs(const char *str)
> > > {
> > > xmon_write(str, strlen(str));
> >
> > Nah, keep it xmon_puts, since it doesn't take a stream argument and
> > define a "puts" for use by xmon core.
>
> But then it needs to add a newline .. and we've gone around in a
circle
> again. Funny how the trivialest of patches gets the most review.
In my opinion, our goal is providing stdio functions like fputs to
xmon.c. So, xmon_fputs need not be compatible with fputs because
xmon.c doesn't use it directly.
Best regards,
Kou Ishizaki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-27 6:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 2:57 [PATCH] xmon consistency clean up Ishizaki Kou
2007-07-25 6:21 ` Benjamin Herrenschmidt
2007-07-25 12:13 ` Michael Ellerman
2007-07-25 14:25 ` Grant Likely
2007-07-27 6:11 ` Ishizaki Kou
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.