* janitor job: CL_SIZE
@ 2007-10-11 12:53 walter harms
2007-10-11 12:58 ` Robert P. J. Day
0 siblings, 1 reply; 2+ messages in thread
From: walter harms @ 2007-10-11 12:53 UTC (permalink / raw)
To: kernel-janitors
hi list,
i looked into COMMAND_LINE_SIZE usage and found
./include/asm-mips/bootinfo.h:#define CL_SIZE COMMAND_LINE_SIZE
./include/asm-m68k/setup.h:#define CL_SIZE COMMAND_LINE_SIZE
CL_SIZE is used in:
./arch/ppc/amiga/bootinfo.c:extern char cmd_line[CL_SIZE];
./arch/m68k/mac/config.c:extern char m68k_command_line[CL_SIZE];
./arch/m68k/kernel/setup.c:static char m68k_command_line[CL_SIZE];
./arch/m68k/kernel/setup.c: memcpy(boot_command_line, *cmdline_p, CL_SIZE);
./arch/mips/lasat/prom.c: strncpy(arcs_cmdline, argv[0], CL_SIZE-1);
./arch/mips/lasat/prom.c: arcs_cmdline[CL_SIZE-1] = '\0';
./arch/mips/kernel/setup.c:static char command_line[CL_SIZE];
./arch/mips/kernel/setup.c: char arcs_cmdline[CL_SIZE]=CONFIG_CMDLINE;
./arch/mips/sibyte/cfe/setup.c: if (cfe_getenv("LINUX_CMDLINE", arcs_cmdline, CL_SIZE) < 0) {
./arch/mips/sibyte/cfe/setup.c: arcs_cmdline[CL_SIZE-1] = 0;
./arch/mips/mips-boards/generic/memory.c: char cmdline[CL_SIZE], *ptr;
is there any good reason to do it this way ?
otherwise s/CL_SIZE/COMMAND_LINE_SIZE/ can be used ?
re,
wh
_______________________________________________
REMINDER: this mailing list moved to vger.kernel.org and current one will be discontinued soon.
To resubscribe, send email to majordomo@vger.kernel.org with
"subscribe kernel-janitors" in message body and follow instructions.
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: janitor job: CL_SIZE
2007-10-11 12:53 janitor job: CL_SIZE walter harms
@ 2007-10-11 12:58 ` Robert P. J. Day
0 siblings, 0 replies; 2+ messages in thread
From: Robert P. J. Day @ 2007-10-11 12:58 UTC (permalink / raw)
To: kernel-janitors
On Thu, 11 Oct 2007, walter harms wrote:
> hi list,
> i looked into COMMAND_LINE_SIZE usage and found
>
> ./include/asm-mips/bootinfo.h:#define CL_SIZE COMMAND_LINE_SIZE
> ./include/asm-m68k/setup.h:#define CL_SIZE COMMAND_LINE_SIZE
>
> CL_SIZE is used in:
>
> ./arch/ppc/amiga/bootinfo.c:extern char cmd_line[CL_SIZE];
> ./arch/m68k/mac/config.c:extern char m68k_command_line[CL_SIZE];
> ./arch/m68k/kernel/setup.c:static char m68k_command_line[CL_SIZE];
> ./arch/m68k/kernel/setup.c: memcpy(boot_command_line, *cmdline_p, CL_SIZE);
> ./arch/mips/lasat/prom.c: strncpy(arcs_cmdline, argv[0], CL_SIZE-1);
> ./arch/mips/lasat/prom.c: arcs_cmdline[CL_SIZE-1] = '\0';
> ./arch/mips/kernel/setup.c:static char command_line[CL_SIZE];
> ./arch/mips/kernel/setup.c: char arcs_cmdline[CL_SIZE]=CONFIG_CMDLINE;
> ./arch/mips/sibyte/cfe/setup.c: if (cfe_getenv("LINUX_CMDLINE", arcs_cmdline, CL_SIZE) < 0) {
> ./arch/mips/sibyte/cfe/setup.c: arcs_cmdline[CL_SIZE-1] = 0;
> ./arch/mips/mips-boards/generic/memory.c: char cmdline[CL_SIZE], *ptr;
>
> is there any good reason to do it this way ?
> otherwise s/CL_SIZE/COMMAND_LINE_SIZE/ can be used ?
i'm a bit curious about that single usage in the ppc arch directory,
since CL_SIZE doesn't seem to be defined for ppc. where is it picking
up that macro definition from?
the first part of arch/ppc/amiga/bootinfo.c reads:
/*
* Extracted from arch/m68k/kernel/setup.c.
* Should be properly generalized and put somewhere else.
* Jesper
*/
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/init.h>
#include <asm/setup.h>
#include <asm/bootinfo.h>
extern char cmd_line[CL_SIZE];
...
so we can see how that macro ended up there. but how can it
possibly be defined?
rday
--
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
====================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-11 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-11 12:53 janitor job: CL_SIZE walter harms
2007-10-11 12:58 ` Robert P. J. Day
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.