Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst message const poisoning, and conversio...
details: https://anonhg.NetBSD.org/src/rev/9e15243db72d
branches: trunk
changeset: 474380:9e15243db72d
user: cgd <cgd%NetBSD.org@localhost>
date: Sun Jul 04 21:32:48 1999 +0000
description:
message const poisoning, and conversion from integers to an opaque
message type.
diffstat:
distrib/utils/sysinst/defs.h | 16 +++++++++-------
distrib/utils/sysinst/label.c | 8 ++++----
distrib/utils/sysinst/run.c | 8 ++++----
distrib/utils/sysinst/util.c | 6 +++---
4 files changed, 20 insertions(+), 18 deletions(-)
diffs (150 lines):
diff -r 970ea071039a -r 9e15243db72d distrib/utils/sysinst/defs.h
--- a/distrib/utils/sysinst/defs.h Sun Jul 04 21:30:14 1999 +0000
+++ b/distrib/utils/sysinst/defs.h Sun Jul 04 21:32:48 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.45 1999/06/22 06:57:00 cgd Exp $ */
+/* $NetBSD: defs.h,v 1.46 1999/07/04 21:32:48 cgd Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -43,6 +43,8 @@
#define FSTYPENAMES
#include <sys/disklabel.h>
+#include "msg_defs.h"
+
/* Define for external varible use */
#ifdef MAIN
#define EXTERN
@@ -95,8 +97,8 @@
EXTERN pid_t ttysig_forward;
EXTERN int layoutkind;
EXTERN int sizemult INIT(1);
-EXTERN char *multname;
-EXTERN char *doingwhat;
+EXTERN const char *multname;
+EXTERN const char *doingwhat;
/* loging variables */
@@ -248,8 +250,8 @@
int incorelabel __P((const char *dkname, partinfo *lp));
int edit_and_check_label __P((partinfo *lp, int nparts,
int rawpart, int bsdpart));
-int getpartoff __P((int msg_no, int partstart));
-int getpartsize __P((int msg_no, int partstart, int defpartsize));
+int getpartoff __P((msg msg_no, int partstart));
+int getpartsize __P((msg msg_no, int partstart, int defpartsize));
/* from install.c */
void do_install __P((void));
@@ -272,7 +274,7 @@
/* From run.c */
int collect __P((int kind, char **buffer, const char *name, ...));
-int run_prog __P((int, int, char *, char *, ...));
+int run_prog __P((int, int, const char *, const char *, ...));
void do_logging __P((void));
int do_system __P((const char *));
@@ -298,7 +300,7 @@
void show_cur_distsets __P((void));
void make_ramdisk_dir __P((const char *path));
void ask_verbose_dist __P((void));
-int get_and_unpack_sets(int success_msg, int failure_msg);
+int get_and_unpack_sets(msg success_msg, msg failure_msg);
int sanity_check __P((void));
/* from target.c */
diff -r 970ea071039a -r 9e15243db72d distrib/utils/sysinst/label.c
--- a/distrib/utils/sysinst/label.c Sun Jul 04 21:30:14 1999 +0000
+++ b/distrib/utils/sysinst/label.c Sun Jul 04 21:32:48 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: label.c,v 1.12 1999/06/20 06:08:14 cgd Exp $ */
+/* $NetBSD: label.c,v 1.13 1999/07/04 21:32:48 cgd Exp $ */
/*
* Copyright 1997 Jonathan Stone
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: label.c,v 1.12 1999/06/20 06:08:14 cgd Exp $");
+__RCSID("$NetBSD: label.c,v 1.13 1999/07/04 21:32:48 cgd Exp $");
#endif
#include <sys/types.h>
@@ -351,7 +351,7 @@
/* Ask for a partition offser, check bounds and does the needed roudups */
int
getpartoff(msg_no, defpartstart)
- int msg_no;
+ msg msg_no;
int defpartstart;
{
char isize[20];
@@ -384,7 +384,7 @@
/* Ask for a partition size, check bounds and does the needed roudups */
int
getpartsize(msg_no, partstart, defpartsize)
- int msg_no;
+ msg msg_no;
int partstart;
int defpartsize;
{
diff -r 970ea071039a -r 9e15243db72d distrib/utils/sysinst/run.c
--- a/distrib/utils/sysinst/run.c Sun Jul 04 21:30:14 1999 +0000
+++ b/distrib/utils/sysinst/run.c Sun Jul 04 21:32:48 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: run.c,v 1.21 1999/06/22 00:43:57 cgd Exp $ */
+/* $NetBSD: run.c,v 1.22 1999/07/04 21:32:48 cgd Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -72,7 +72,7 @@
/*
* local prototypes
*/
-char* va_prog_cmdstr __P((char *cmd, va_list ap));
+char* va_prog_cmdstr __P((const char *cmd, va_list ap));
int launch_subwin __P((WINDOW *actionwin, char **args, struct winsize win, int display));
int log_flip __P((void));
int script_flip __P((void));
@@ -237,7 +237,7 @@
* XXX return result is in a static buffer.
*/
char *
-va_prog_cmdstr(char *cmd, va_list ap)
+va_prog_cmdstr(const char *cmd, va_list ap)
{
static char command[STRSIZE];
@@ -419,7 +419,7 @@
*/
int
-run_prog(int fatal, int display, char *errmsg, char *cmd, ...)
+run_prog(int fatal, int display, const char *errmsg, const char *cmd, ...)
{
va_list ap;
struct winsize win;
diff -r 970ea071039a -r 9e15243db72d distrib/utils/sysinst/util.c
--- a/distrib/utils/sysinst/util.c Sun Jul 04 21:30:14 1999 +0000
+++ b/distrib/utils/sysinst/util.c Sun Jul 04 21:32:48 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.46 1999/06/22 18:47:07 cgd Exp $ */
+/* $NetBSD: util.c,v 1.47 1999/07/04 21:32:49 cgd Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -718,8 +718,8 @@
*/
int
get_and_unpack_sets(success_msg, failure_msg)
- int success_msg;
- int failure_msg;
+ msg success_msg;
+ msg failure_msg;
{
/* Ensure mountpoint for distribution files exists in current root. */
Home |
Main Index |
Thread Index |
Old Index