Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2015 06:40:20 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r280492 - projects/lua-bootloader/sys/boot/common
Message-ID:  <201503250640.t2P6eKTo072231@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rpaulo
Date: Wed Mar 25 06:40:19 2015
New Revision: 280492
URL: https://svnweb.freebsd.org/changeset/base/280492

Log:
  interp_parse: make the parse string a const argument.

Modified:
  projects/lua-bootloader/sys/boot/common/bootstrap.h
  projects/lua-bootloader/sys/boot/common/interp_parse.c

Modified: projects/lua-bootloader/sys/boot/common/bootstrap.h
==============================================================================
--- projects/lua-bootloader/sys/boot/common/bootstrap.h	Wed Mar 25 06:34:01 2015	(r280491)
+++ projects/lua-bootloader/sys/boot/common/bootstrap.h	Wed Mar 25 06:40:19 2015	(r280492)
@@ -34,11 +34,11 @@
 #include <sys/linker_set.h>
 
 /*
- * Generic device specifier; architecture-dependant 
+ * Generic device specifier; architecture-dependant
  * versions may be larger, but should be allowed to
  * overlap.
  */
-struct devdesc 
+struct devdesc
 {
     struct devsw	*d_dev;
     int			d_type;
@@ -53,7 +53,7 @@ struct devdesc 
 
 /* Commands and return values; nonzero return sets command_errmsg != NULL */
 typedef int	(bootblk_cmd_t)(int argc, char *argv[]);
-extern char	*command_errmsg;	
+extern char	*command_errmsg;
 extern char	command_errbuf[];	/* XXX blah, length */
 #define CMD_OK		0
 #define CMD_ERROR	1
@@ -66,7 +66,7 @@ int	include(const char *filename);
 char	*backslash(char *str);
 
 /* interp_parse.c */
-int	parse(int *argc, char ***argv, char *str);
+int	parse(int *argc, char ***argv, const char *str);
 
 /* interp_forth.c */
 void	bf_init(const char *rc);
@@ -104,7 +104,7 @@ struct bcache_devdata
 /*
  * Modular console support.
  */
-struct console 
+struct console
 {
     const char	*c_name;
     const char	*c_desc;
@@ -125,7 +125,7 @@ void		cons_probe(void);
 /*
  * Plug-and-play enumerator/configurator interface.
  */
-struct pnphandler 
+struct pnphandler
 {
     const char	*pp_name;		/* handler/bus name */
     void	(* pp_enumerate)(void);	/* enumerate PnP devices, add to chain */
@@ -174,7 +174,7 @@ extern int			isapnp_readport;
  * Metadata are allocated on our heap, and copied into kernel space
  * before executing the kernel.
  */
-struct file_metadata 
+struct file_metadata
 {
     size_t			md_size;
     u_int16_t			md_type;
@@ -264,9 +264,9 @@ int __elfN(load_modmetadata)(struct prel
 #endif
 
 /*
- * Support for commands 
+ * Support for commands
  */
-struct bootblk_command 
+struct bootblk_command
 {
     const char		*c_name;
     const char		*c_desc;
@@ -280,7 +280,7 @@ struct bootblk_command 
 
 SET_DECLARE(Xcommand_set, struct bootblk_command);
 
-/* 
+/*
  * The intention of the architecture switch is to provide a convenient
  * encapsulation of the interface between the bootstrap MI and MD code.
  * MD code may selectively populate the switch at runtime based on the

Modified: projects/lua-bootloader/sys/boot/common/interp_parse.c
==============================================================================
--- projects/lua-bootloader/sys/boot/common/interp_parse.c	Wed Mar 25 06:34:01 2015	(r280491)
+++ projects/lua-bootloader/sys/boot/common/interp_parse.c	Wed Mar 25 06:40:19 2015	(r280492)
@@ -7,7 +7,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * Jordan K. Hubbard
  * 29 August 1998
  *
@@ -76,7 +76,7 @@ isquote(int ch)
 }
 
 int
-parse(int *argc, char ***argv, char *str)
+parse(int *argc, char ***argv, const char *str)
 {
     int ac;
     char *val, *p, *q, *copy = NULL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503250640.t2P6eKTo072231>