summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-08-03 09:08:29 +0000
committerjhb <jhb@FreeBSD.org>2000-08-03 09:08:29 +0000
commit04f2dc8e0bc028215d67716bd57720b48e9867ff (patch)
tree5027dd91afd5ed090350e7ef3103dc38d8f9a1ca /lib
parentea5b5bab77fc7b8bea8fa349155989859d483300 (diff)
downloadFreeBSD-src-04f2dc8e0bc028215d67716bd57720b48e9867ff.zip
FreeBSD-src-04f2dc8e0bc028215d67716bd57720b48e9867ff.tar.gz
Cleanup warnings by adding missint prototypes, removing unneeded duplicate
prototypes, and adding in several 'const's. Also, add some missing $FreeBSD$'s. Found by: BDECFLAGS
Diffstat (limited to 'lib')
-rw-r--r--lib/libstand/environment.c6
-rw-r--r--lib/libstand/net.h5
-rw-r--r--lib/libstand/netif.h4
-rw-r--r--lib/libstand/stand.h17
4 files changed, 20 insertions, 12 deletions
diff --git a/lib/libstand/environment.c b/lib/libstand/environment.c
index f2ca120..158e845 100644
--- a/lib/libstand/environment.c
+++ b/lib/libstand/environment.c
@@ -64,8 +64,8 @@ env_getenv(const char *name)
* If (value) is NULL, the variable is set but has no value.
*/
int
-env_setenv(const char *name, int flags, void *value, ev_sethook_t sethook,
- ev_unsethook_t unsethook)
+env_setenv(const char *name, int flags, const void *value,
+ ev_sethook_t sethook, ev_unsethook_t unsethook)
{
struct env_var *ev, *curr, *last;
@@ -150,7 +150,7 @@ getenv(const char *name)
}
int
-setenv(const char *name, char *value, int overwrite)
+setenv(const char *name, const char *value, int overwrite)
{
/* No guarantees about state, always assume volatile */
if (overwrite || (env_getenv(name) == NULL))
diff --git a/lib/libstand/net.h b/lib/libstand/net.h
index 6f6d443..47ff0a0 100644
--- a/lib/libstand/net.h
+++ b/lib/libstand/net.h
@@ -36,6 +36,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#define NETIF_DEBUG 1
@@ -111,6 +113,9 @@ ssize_t sendrecv(struct iodesc *,
ssize_t (*)(struct iodesc *, void *, size_t, time_t),
void *, size_t);
+/* bootp/DHCP */
+void bootp(int);
+
/* Utilities: */
char *ether_sprintf(u_char *);
int in_cksum(void *, int);
diff --git a/lib/libstand/netif.h b/lib/libstand/netif.h
index 0609310..dac2851 100644
--- a/lib/libstand/netif.h
+++ b/lib/libstand/netif.h
@@ -1,5 +1,7 @@
/* $NetBSD: netif.h,v 1.4 1995/09/14 23:45:30 pk Exp $ */
+/* $FreeBSD$ */
+
#ifndef __SYS_LIBNETBOOT_NETIF_H
#define __SYS_LIBNETBOOT_NETIF_H
#include "iodesc.h"
@@ -7,7 +9,7 @@
#define NENTS(x) sizeof(x)/sizeof(x[0])
struct netif_driver {
- char *netif_bname;
+ const char *netif_bname;
int (*netif_match)(struct netif *, void *);
int (*netif_probe)(struct netif *, void *);
void (*netif_init)(struct iodesc *, void *);
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h
index 5fd209d..aa8e65f 100644
--- a/lib/libstand/stand.h
+++ b/lib/libstand/stand.h
@@ -66,6 +66,7 @@
#include <sys/cdefs.h>
#include <sys/stat.h>
#include <sys/dirent.h>
+#include <string.h>
#define CHK(fmt, args...) printf("%s(%d): " fmt "\n", __FUNCTION__, __LINE__ , ##args)
#define PCHK(fmt, args...) {printf("%s(%d): " fmt "\n", __FUNCTION__, __LINE__ , ##args); getchar();}
@@ -136,12 +137,13 @@ struct devsw {
const char dv_name[8];
int dv_type; /* opaque type constant, arch-dependant */
int (*dv_init)(void); /* early probe call */
- int (*dv_strategy)(void *devdata, int rw, daddr_t blk, size_t size, void *buf, size_t *rsize);
+ int (*dv_strategy)(void *devdata, int rw, daddr_t blk, size_t size,
+ char *buf, size_t *rsize);
int (*dv_open)(struct open_file *f, ...);
int (*dv_close)(struct open_file *f);
int (*dv_ioctl)(struct open_file *f, u_long cmd, void *data);
void (*dv_print)(int verbose); /* print device information */
- void (*dv_cleanup)();
+ void (*dv_cleanup)(void);
};
/*
@@ -227,8 +229,6 @@ extern int close(int);
extern void closeall(void);
extern ssize_t read(int, void *, size_t);
extern ssize_t write(int, void *, size_t);
-extern off_t lseek(int, off_t, int);
-extern int stat(const char *, struct stat *);
extern struct dirent *readdirfd(int);
extern void srandom(u_long seed);
@@ -236,7 +236,6 @@ extern u_long random(void);
/* imports from stdlib, locally modified */
extern long strtol(const char *, char **, int);
-extern char * strerror(int err);
extern char *optarg; /* getopt(3) external variables */
extern int optind, opterr, optopt, optreset;
extern int getopt(int, char * const [], const char *);
@@ -273,10 +272,12 @@ struct env_var
extern struct env_var *environ;
extern struct env_var *env_getenv(const char *name);
-extern int env_setenv(const char *name, int flags, void *value,
- ev_sethook_t sethook, ev_unsethook_t unsethook);
+extern int env_setenv(const char *name, int flags,
+ const void *value, ev_sethook_t sethook,
+ ev_unsethook_t unsethook);
extern char *getenv(const char *name);
-extern int setenv(const char *name, char *value, int overwrite);
+extern int setenv(const char *name, const char *value,
+ int overwrite);
extern int putenv(const char *string);
extern int unsetenv(const char *name);
OpenPOWER on IntegriCloud