diff options
author | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-01-31 14:42:24 +0000 |
---|---|---|
committer | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-01-31 14:42:24 +0000 |
commit | c2eff5535605fd4f09fb64c1087d5cf35e3b26a0 (patch) | |
tree | 3ef2a4aed3bb1eb37bc4056af1e26ad8ea99e7f2 /usr.sbin/amd/fsinfo | |
parent | 6c7279425c20943c2f006f41f92d41c668f4a20b (diff) |
make amd 64bit ready for the alpha (from NetBSD/thorpej)
Diffstat (limited to 'usr.sbin/amd/fsinfo')
-rw-r--r-- | usr.sbin/amd/fsinfo/fsi_data.h | 4 | ||||
-rw-r--r-- | usr.sbin/amd/fsinfo/fsi_util.c | 8 | ||||
-rw-r--r-- | usr.sbin/amd/fsinfo/fsinfo.h | 8 |
3 files changed, 11 insertions, 9 deletions
diff --git a/usr.sbin/amd/fsinfo/fsi_data.h b/usr.sbin/amd/fsinfo/fsi_data.h index dc81d75ba26..5a25c3350bc 100644 --- a/usr.sbin/amd/fsinfo/fsi_data.h +++ b/usr.sbin/amd/fsinfo/fsi_data.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)fsi_data.h 8.1 (Berkeley) 6/6/93 - * $Id: fsi_data.h,v 1.1 1995/10/18 08:47:18 deraadt Exp $ + * $Id: fsi_data.h,v 1.2 1997/01/31 14:42:10 graichen Exp $ */ typedef struct auto_tree auto_tree; @@ -120,7 +120,7 @@ struct ether_if { #define EF_INADDR 0 struct in_addr e_inaddr; #define EF_NETMASK 1 - u_long e_netmask; + u_int32_t e_netmask; #define EF_HWADDR 2 char *e_hwaddr; }; diff --git a/usr.sbin/amd/fsinfo/fsi_util.c b/usr.sbin/amd/fsinfo/fsi_util.c index cf588c25ba3..88b0179955d 100644 --- a/usr.sbin/amd/fsinfo/fsi_util.c +++ b/usr.sbin/amd/fsinfo/fsi_util.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * from: @(#)fsi_util.c 8.1 (Berkeley) 6/6/93 - * $Id: fsi_util.c,v 1.1 1995/10/18 08:47:18 deraadt Exp $ + * $Id: fsi_util.c,v 1.2 1997/01/31 14:42:11 graichen Exp $ */ #include "../fsinfo/fsinfo.h" @@ -83,6 +83,7 @@ char *s, *s1, *s2, *s3, *s4; exit(1); } +#ifndef __NetBSD__ /* * Dup a string */ @@ -97,6 +98,7 @@ char *s; return sp; } +#endif /* __NetBSD__ */ /* * Debug log @@ -419,8 +421,8 @@ char *v; free(v); } break; case EF_NETMASK: { - u_long nm = 0; - if ((sscanf(v, "0x%lx", &nm) == 1 || sscanf(v, "%lx", &nm) == 1) && nm != 0) + u_int32_t nm = 0; + if ((sscanf(v, "0x%x", &nm) == 1 || sscanf(v, "%x", &nm) == 1) && nm != 0) ep->e_netmask = htonl(nm); else yyerror("malformed netmask: %s", v); diff --git a/usr.sbin/amd/fsinfo/fsinfo.h b/usr.sbin/amd/fsinfo/fsinfo.h index 63c885386eb..077d9f8145d 100644 --- a/usr.sbin/amd/fsinfo/fsinfo.h +++ b/usr.sbin/amd/fsinfo/fsinfo.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)fsinfo.h 8.1 (Berkeley) 6/6/93 - * $Id: fsinfo.h,v 1.1 1995/10/18 08:47:19 deraadt Exp $ + * $Id: fsinfo.h,v 1.2 1997/01/31 14:42:11 graichen Exp $ */ /* @@ -82,11 +82,11 @@ typedef char *voidp; #include <net/if.h> #include <netinet/if_ether.h> +#include <string.h> +#include <stdlib.h> + #include "fsi_data.h" -extern char* strchr P((Const char*, int)); /* C */ -extern char* strrchr P((Const char*, int)); /* C */ -extern char *strdup P((char*)); /* C */ extern void fatal(); extern void warning(); extern void error(); |