*_execsw static structures cannot be const due to the way they interact

with EXEC_SET, DECLARE_MODULE, and module_register.  Specifically,
    module_register.  We may eventually be able to make these const, but
    not now.
This commit is contained in:
Matthew Dillon 1999-01-29 22:59:43 +00:00
parent 82d6780c9e
commit 820ca326e1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43402
4 changed files with 8 additions and 8 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: imgact_aout.c,v 1.43 1998/10/16 03:55:00 peter Exp $
* $Id: imgact_aout.c,v 1.44 1999/01/01 14:41:51 bde Exp $
*/
#include <sys/param.h>
@ -300,5 +300,5 @@ aout_coredump(p)
* Since `const' objects end up in the text segment, TEXT_SET is the
* correct directive to use.
*/
static const struct execsw aout_execsw = { exec_aout_imgact, "a.out" };
static struct execsw aout_execsw = { exec_aout_imgact, "a.out" };
EXEC_SET(aout, aout_execsw);

View File

@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: imgact_elf.c,v 1.45 1999/01/26 02:38:10 julian Exp $
* $Id: imgact_elf.c,v 1.46 1999/01/27 21:49:55 dillon Exp $
*/
#include "opt_rlimit.h"
@ -984,5 +984,5 @@ elf_putnote(void *dst, size_t *off, const char *name, int type,
* Since `const' objects end up in the text segment, TEXT_SET is the
* correct directive to use.
*/
static const struct execsw elf_execsw = {exec_elf_imgact, "ELF"};
static struct execsw elf_execsw = {exec_elf_imgact, "ELF"};
EXEC_SET(elf, elf_execsw);

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id: imgact_gzip.c,v 1.34 1998/07/15 05:00:26 bde Exp $
* $Id: imgact_gzip.c,v 1.35 1998/10/16 03:55:00 peter Exp $
*
* This module handles execution of a.out files which have been run through
* "gzip". This saves diskspace, but wastes cpu-cycles and VM.
@ -374,5 +374,5 @@ Flush(void *vp, u_char * ptr, u_long siz)
* correct directive to use.
*/
static const struct execsw gzip_execsw = {exec_gzip_imgact, "gzip"};
static struct execsw gzip_execsw = {exec_gzip_imgact, "gzip"};
EXEC_SET(execgzip, gzip_execsw);

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: imgact_shell.c,v 1.16 1997/08/02 14:31:23 bde Exp $
* $Id: imgact_shell.c,v 1.17 1998/10/16 03:55:00 peter Exp $
*/
#include <sys/param.h>
@ -134,5 +134,5 @@ exec_shell_imgact(imgp)
* Since `const' objects end up in the text segment, TEXT_SET is the
* correct directive to use.
*/
static const struct execsw shell_execsw = { exec_shell_imgact, "#!" };
static struct execsw shell_execsw = { exec_shell_imgact, "#!" };
EXEC_SET(shell, shell_execsw);