summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-07-08 03:00:53 +0000
committerJeremy Katz <katzj@redhat.com>2003-07-08 03:00:53 +0000
commit459119c94529602d08de465b7ebfa4871d328081 (patch)
tree369a7eb643938d6d51ef6f2d0c46561e61dcc0ae /isys
parent390977d3ee0ebc010168ce04573f63ae15458718 (diff)
downloadanaconda-459119c94529602d08de465b7ebfa4871d328081.tar.gz
anaconda-459119c94529602d08de465b7ebfa4871d328081.tar.xz
anaconda-459119c94529602d08de465b7ebfa4871d328081.zip
massive merge from taroon branch. changes are all over the place, but a
summary of looking through the diff is * clean up warnings, we build with -Wall -Werror here too * product.img stuff * max logical partitions enforcement * 1 TB max fs size * ethtool stuff * autopart in kickstart * driver disk fixes * RHEL upgrade stuff * network driver disks * variant pkgorder/tree splitting
Diffstat (limited to 'isys')
-rw-r--r--isys/Makefile7
-rw-r--r--isys/dns.c1
-rw-r--r--isys/ethtool.c93
-rw-r--r--isys/gzlib/Makefile2
-rw-r--r--isys/gzlib/deflate.c4
-rw-r--r--isys/gzlib/gzip.c12
-rw-r--r--isys/gzlib/trees.c2
-rw-r--r--isys/imount.c5
-rw-r--r--isys/isys.c1
-rw-r--r--isys/isys.h3
-rw-r--r--isys/linkdetect.c20
-rw-r--r--isys/minifind.c2
-rw-r--r--isys/net.h38
-rw-r--r--isys/nfsmount.h318
-rw-r--r--isys/nfsmount_clnt.c107
-rw-r--r--isys/nfsmount_xdr.c455
-rw-r--r--isys/pdc.c7
-rw-r--r--isys/probe.c6
-rw-r--r--isys/probe.h1
-rw-r--r--isys/vio.c2
20 files changed, 520 insertions, 566 deletions
diff --git a/isys/Makefile b/isys/Makefile
index 123fde29c..d249770e2 100644
--- a/isys/Makefile
+++ b/isys/Makefile
@@ -1,10 +1,11 @@
include ../Makefile.inc
-CFLAGS = -ffunction-sections -I$(PYTHONINCLUDE) -I.. -Wall -Os -g -DHAVE_NFS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64
+CFLAGS = -ffunction-sections -I$(PYTHONINCLUDE) -I.. -Wall -Os -g -DHAVE_NFS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Werror
-OBJECTS = nfsmount.o nfsmount_clnt.o nfsmount_xdr.o imount.o getmacaddr.o\
+OBJECTS = nfsmount.o nfsmount_clnt.o nfsmount_xdr.o imount.o getmacaddr.o \
smp.o devnodes.o cpio.o probe.o uncpio.o \
- lang.o isofs.o dns.o linkdetect.o pdc.o hpt.o silraid.o vio.o
+ lang.o isofs.o dns.o linkdetect.o pdc.o hpt.o silraid.o vio.o \
+ ethtool.o
SOBJECTS = $(patsubst %.o,%.lo,$(OBJECTS))
SOURCES = $(patsubst %.o,%.c,$(OBJECTS)) isys.c
LOADLIBES = -lresolv -lpci -lpopt -lpump -lext2fs -lz -lbterm -lbogl -lwlite -lkudzu -lpci
diff --git a/isys/dns.c b/isys/dns.c
index c71e0df9c..06d127683 100644
--- a/isys/dns.c
+++ b/isys/dns.c
@@ -3,6 +3,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <resolv.h>
+#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <stdlib.h>
#include <string.h>
diff --git a/isys/ethtool.c b/isys/ethtool.c
new file mode 100644
index 000000000..cc7bdc704
--- /dev/null
+++ b/isys/ethtool.c
@@ -0,0 +1,93 @@
+/*
+ * ethtool.c - setting of basic ethtool options
+ *
+ * Copyright 2003 Red Hat, Inc.
+ *
+ * Jeremy Katz <katzj@redhat.com>
+ *
+ * This software may be freely redistributed under the terms of the GNU
+ * general public license.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <net/if.h>
+
+#ifdef DIET
+typedef void * caddr_t;
+#endif
+
+#include <linux/sockios.h>
+#include "net.h"
+#include "ethtool-copy.h"
+
+static int set_intf_up(struct ifreq ifr, int sock) {
+ if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0) {
+ return (-1);
+ }
+ ifr.ifr_flags |= (IFF_UP | IFF_RUNNING);
+ if (ioctl(sock, SIOCSIFFLAGS, &ifr) < 0) {
+ fprintf(stderr, "failed to bring up interface %s: %s", ifr.ifr_name,
+ strerror(errno));
+ return -1;
+ }
+ return (0);
+}
+
+int setEthtoolSettings(char * dev, ethtool_speed speed,
+ ethtool_duplex duplex) {
+ int sock, err;
+ struct ethtool_cmd ecmd;
+ struct ifreq ifr;
+
+ if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+ perror("Unable to create socket");
+ return -1;
+ }
+
+ /* Setup our control structures. */
+ memset(&ifr, 0, sizeof(ifr));
+ strcpy(ifr.ifr_name, dev);
+
+ if (set_intf_up(ifr, sock) == -1) {
+ fprintf(stderr, "unable to bring up interface %s: %s", dev,
+ strerror(errno));
+ return -1;
+ }
+
+ ecmd.cmd = ETHTOOL_GSET;
+ ifr.ifr_data = (caddr_t)&ecmd;
+ err = ioctl(sock, SIOCETHTOOL, &ifr);
+ if (err < 0) {
+ perror("Unable to get settings via ethtool. Not setting");
+ return -1;
+ }
+
+ if (speed != ETHTOOL_SPEED_UNSPEC)
+ ecmd.speed = speed;
+ if (duplex != ETHTOOL_DUPLEX_UNSPEC)
+ ecmd.duplex = duplex;
+ if ((duplex != ETHTOOL_DUPLEX_UNSPEC) || (speed != ETHTOOL_SPEED_UNSPEC))
+ ecmd.autoneg = AUTONEG_DISABLE;
+
+ ecmd.cmd = ETHTOOL_SSET;
+ ifr.ifr_data = (caddr_t)&ecmd;
+ err = ioctl(sock, SIOCETHTOOL, &ifr);
+ if (err < 0) {
+ // perror("Unable to set settings via ethtool. Not setting");
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/isys/gzlib/Makefile b/isys/gzlib/Makefile
index 231098874..d7eba42e2 100644
--- a/isys/gzlib/Makefile
+++ b/isys/gzlib/Makefile
@@ -1,6 +1,6 @@
include ../../Makefile.inc
-CFLAGS += -I . -Os -fPIC -g -Wall
+CFLAGS += -I . -Os -fPIC -g -Wall -Werror
SOURCES = bits.c gzip.c inflate.c lzw.c trees.c unzip.c util.c zip.c binding.c \
deflate.c zip.c
OBJS = $(patsubst %.c,%.o,$(SOURCES))
diff --git a/isys/gzlib/deflate.c b/isys/gzlib/deflate.c
index bd128206b..9bd5358e1 100644
--- a/isys/gzlib/deflate.c
+++ b/isys/gzlib/deflate.c
@@ -290,7 +290,7 @@ void lm_init (pack_level, flags)
{
register unsigned j;
- if (pack_level < 1 || pack_level > 9) warn("bad pack level");
+ if (pack_level < 1 || pack_level > 9) warning("bad pack level");
compr_level = pack_level;
/* Initialize the hash table. */
@@ -495,7 +495,7 @@ local void check_match(start, match, length)
fprintf(stderr,
" start %d, match %d, length %d\n",
start, match, length);
- warn("invalid match");
+ warning("invalid match");
}
if (verbose > 1) {
fprintf(stderr,"\\[%d,%d]", start-match, length);
diff --git a/isys/gzlib/gzip.c b/isys/gzlib/gzip.c
index 342db965c..77eb3f256 100644
--- a/isys/gzlib/gzip.c
+++ b/isys/gzlib/gzip.c
@@ -240,8 +240,10 @@ int (*work) OF((int infile, int outfile)) = zip;
#define strequ(s1, s2) (strcmp((s1),(s2)) == 0)
-local void progerror (string)
- char *string;
+local void progerror (char * string) __attribute__ ((unused));
+
+local void progerror (string)
+ char *string;
{
int e = errno;
fprintf(stderr, "%s: ", progname);
@@ -255,9 +257,9 @@ int gunzip_main (int do_decompress_arg)
{
int file_count; /* number of files to precess */
int proglen; /* length of progname */
- int optc; /* current option */
- int argc = 1;
- char *argv[] = { "gunzip ", NULL };
+ int optc __attribute__ ((unused)); /* current option */
+ int argc __attribute__ ((unused)) = 1;
+ char *argv[] __attribute__ ((unused)) = { "gunzip ", NULL };
EXPAND(argc, argv); /* wild card expansion if necessary */
diff --git a/isys/gzlib/trees.c b/isys/gzlib/trees.c
index 71659a5ac..704c3ab6d 100644
--- a/isys/gzlib/trees.c
+++ b/isys/gzlib/trees.c
@@ -895,7 +895,7 @@ off_t flush_block(buf, stored_len, eof)
if (stored_len <= opt_lenb && eof && compressed_len == 0L && seekable()) {
#endif
/* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */
- if (buf == (char*)0) error ("block vanished");
+ if (buf == (char*)0) gzerror ("block vanished");
copy_block(buf, (unsigned)stored_len, 0); /* without header */
compressed_len = stored_len << 3;
diff --git a/isys/imount.c b/isys/imount.c
index d6416b146..4f5725373 100644
--- a/isys/imount.c
+++ b/isys/imount.c
@@ -8,6 +8,7 @@
#include <unistd.h>
#include "imount.h"
+#include "sundries.h"
#define _(foo) foo
@@ -19,7 +20,7 @@ int doPwMount(char * dev, char * where, char * fs, int rdonly, int istty,
int isnfs = 0;
char * mount_opt = NULL;
long int flag;
- char * chptr;
+ char * chptr __attribute__ ((unused));
if (!strcmp(fs, "nfs")) isnfs = 1;
@@ -71,7 +72,7 @@ int doPwMount(char * dev, char * where, char * fs, int rdonly, int istty,
/*logMessage("calling nfsmount(%s, %s, &flags, &extra_opts, &mount_opt)",
buf, where);*/
- if (nfsmount(buf, where, &flags, &extra_opts, &mount_opt)) {
+ if (nfsmount(buf, where, &flags, &extra_opts, &mount_opt, 0)) {
/*logMessage("\tnfsmount returned non-zero");*/
/*fprintf(stderr, "nfs mount failed: %s\n",
nfs_error());*/
diff --git a/isys/isys.c b/isys/isys.c
index 05bb07514..1da28d90d 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -43,6 +43,7 @@
#include "md-int.h"
#include "imount.h"
#include "isys.h"
+#include "net.h"
#include "probe.h"
#include "smp.h"
#include "lang.h"
diff --git a/isys/isys.h b/isys/isys.h
index ccbf45703..8051b5a5b 100644
--- a/isys/isys.h
+++ b/isys/isys.h
@@ -16,9 +16,6 @@ int rmmod(char * modName);
/* returns 0 for true, !0 for false */
int fileIsIso(const char * file);
-/* returns 1 for link, 0 for no link, -1 for unknown */
-int get_link_status(char *ifname);
-
/* returns 1 if on an iSeries vio console, 0 otherwise */
int isVioConsole(void);
diff --git a/isys/linkdetect.c b/isys/linkdetect.c
index 10917db82..10849d303 100644
--- a/isys/linkdetect.c
+++ b/isys/linkdetect.c
@@ -29,30 +29,12 @@
#include <sys/types.h>
#include <net/if.h>
-/* type definitions so that the kernel-ish includes can be shared */
-#ifndef uint8_t
-# define uint8_t unsigned char
-#endif
-#ifndef uint16_t
-# define uint16_t unsigned short int
-#endif
-#ifndef uint32_t
-# define uint32_t unsigned int
-#endif
-#ifndef uint64_t
-# define uint64_t unsigned long long int
-#endif
-typedef uint64_t u64;
-typedef uint32_t u32;
-typedef uint16_t u16;
-typedef uint8_t u8;
-
#ifdef DIET
typedef void * caddr_t;
#endif
-
#include <linux/sockios.h>
+#include "net.h"
#include "mii.h"
#include "ethtool-copy.h"
diff --git a/isys/minifind.c b/isys/minifind.c
index 9da9f62ef..f483055b4 100644
--- a/isys/minifind.c
+++ b/isys/minifind.c
@@ -26,8 +26,6 @@ void insert_node(struct pathNode *n, char *path)
// return input strip less last character
char *stripLastChar(char *in)
{
- int i;
-
char *out = malloc(sizeof(char)*strlen(in));
snprintf(out, strlen(in) - 1, "%s", in);
return out;
diff --git a/isys/net.h b/isys/net.h
new file mode 100644
index 000000000..478c7888d
--- /dev/null
+++ b/isys/net.h
@@ -0,0 +1,38 @@
+#ifndef ISYSNET_H
+#define ISYSNET_H
+
+/* type definitions so that the kernel-ish includes can be shared */
+#ifndef uint8_t
+# define uint8_t unsigned char
+#endif
+#ifndef uint16_t
+# define uint16_t unsigned short int
+#endif
+#ifndef uint32_t
+# define uint32_t unsigned int
+#endif
+#ifndef uint64_t
+# define uint64_t unsigned long long int
+#endif
+typedef uint64_t u64;
+typedef uint32_t u32;
+typedef uint16_t u16;
+typedef uint8_t u8;
+
+#include "ethtool-copy.h"
+
+/* returns 1 for link, 0 for no link, -1 for unknown */
+int get_link_status(char *ifname);
+
+typedef enum ethtool_speed_t { ETHTOOL_SPEED_UNSPEC = -1,
+ ETHTOOL_SPEED_10 = SPEED_10,
+ ETHTOOL_SPEED_100 = SPEED_100,
+ ETHTOOL_SPEED_1000 = SPEED_1000 } ethtool_speed;
+typedef enum ethtool_duplex_t { ETHTOOL_DUPLEX_UNSPEC = -1,
+ ETHTOOL_DUPLEX_HALF = DUPLEX_HALF,
+ ETHTOOL_DUPLEX_FULL = DUPLEX_FULL } ethtool_duplex;
+
+/* set ethtool settings */
+int setEthtoolSettings(char * dev, ethtool_speed speed, ethtool_duplex duplex);
+
+#endif
diff --git a/isys/nfsmount.h b/isys/nfsmount.h
index 0324d2f69..7688f91c7 100644
--- a/isys/nfsmount.h
+++ b/isys/nfsmount.h
@@ -8,6 +8,11 @@
#include <rpc/rpc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -45,23 +50,16 @@
#ifndef _rpcsvc_mount_h
#define _rpcsvc_mount_h
#include <asm/types.h>
+#define MOUNTPORT 635
#define MNTPATHLEN 1024
#define MNTNAMLEN 255
#define FHSIZE 32
#define FHSIZE3 64
typedef char fhandle[FHSIZE];
-#ifdef __cplusplus
-extern "C" bool_t xdr_fhandle(XDR *, fhandle);
-#elif __STDC__
-extern bool_t xdr_fhandle(XDR *, fhandle);
-#else /* Old Style C */
-bool_t xdr_fhandle();
-#endif /* Old Style C */
#ifdef DIET
typedef unsigned int u_int;
-typedef unsigned char u_char;
typedef unsigned long u_long;
typedef void * caddr_t;
#endif
@@ -70,14 +68,6 @@ typedef struct {
u_int fhandle3_len;
char *fhandle3_val;
} fhandle3;
-#ifdef __cplusplus
-extern "C" bool_t xdr_fhandle3(XDR *, fhandle3*);
-#elif __STDC__
-extern bool_t xdr_fhandle3(XDR *, fhandle3*);
-#else /* Old Style C */
-bool_t xdr_fhandle3();
-#endif /* Old Style C */
-
enum mountstat3 {
MNT_OK = 0,
@@ -92,14 +82,6 @@ enum mountstat3 {
MNT3ERR_SERVERFAULT = 10006,
};
typedef enum mountstat3 mountstat3;
-#ifdef __cplusplus
-extern "C" bool_t xdr_mountstat3(XDR *, mountstat3*);
-#elif __STDC__
-extern bool_t xdr_mountstat3(XDR *, mountstat3*);
-#else /* Old Style C */
-bool_t xdr_mountstat3();
-#endif /* Old Style C */
-
struct fhstatus {
u_int fhs_status;
@@ -108,14 +90,6 @@ struct fhstatus {
} fhstatus_u;
};
typedef struct fhstatus fhstatus;
-#ifdef __cplusplus
-extern "C" bool_t xdr_fhstatus(XDR *, fhstatus*);
-#elif __STDC__
-extern bool_t xdr_fhstatus(XDR *, fhstatus*);
-#else /* Old Style C */
-bool_t xdr_fhstatus();
-#endif /* Old Style C */
-
struct mountres3_ok {
fhandle3 fhandle;
@@ -125,14 +99,6 @@ struct mountres3_ok {
} auth_flavours;
};
typedef struct mountres3_ok mountres3_ok;
-#ifdef __cplusplus
-extern "C" bool_t xdr_mountres3_ok(XDR *, mountres3_ok*);
-#elif __STDC__
-extern bool_t xdr_mountres3_ok(XDR *, mountres3_ok*);
-#else /* Old Style C */
-bool_t xdr_mountres3_ok();
-#endif /* Old Style C */
-
struct mountres3 {
mountstat3 fhs_status;
@@ -141,44 +107,12 @@ struct mountres3 {
} mountres3_u;
};
typedef struct mountres3 mountres3;
-#ifdef __cplusplus
-extern "C" bool_t xdr_mountres3(XDR *, mountres3*);
-#elif __STDC__
-extern bool_t xdr_mountres3(XDR *, mountres3*);
-#else /* Old Style C */
-bool_t xdr_mountres3();
-#endif /* Old Style C */
-
typedef char *dirpath;
-#ifdef __cplusplus
-extern "C" bool_t xdr_dirpath(XDR *, dirpath*);
-#elif __STDC__
-extern bool_t xdr_dirpath(XDR *, dirpath*);
-#else /* Old Style C */
-bool_t xdr_dirpath();
-#endif /* Old Style C */
-
typedef char *name;
-#ifdef __cplusplus
-extern "C" bool_t xdr_name(XDR *, name*);
-#elif __STDC__
-extern bool_t xdr_name(XDR *, name*);
-#else /* Old Style C */
-bool_t xdr_name();
-#endif /* Old Style C */
-
typedef struct mountbody *mountlist;
-#ifdef __cplusplus
-extern "C" bool_t xdr_mountlist(XDR *, mountlist*);
-#elif __STDC__
-extern bool_t xdr_mountlist(XDR *, mountlist*);
-#else /* Old Style C */
-bool_t xdr_mountlist();
-#endif /* Old Style C */
-
struct mountbody {
name ml_hostname;
@@ -186,48 +120,16 @@ struct mountbody {
mountlist ml_next;
};
typedef struct mountbody mountbody;
-#ifdef __cplusplus
-extern "C" bool_t xdr_mountbody(XDR *, mountbody*);
-#elif __STDC__
-extern bool_t xdr_mountbody(XDR *, mountbody*);
-#else /* Old Style C */
-bool_t xdr_mountbody();
-#endif /* Old Style C */
-
typedef struct groupnode *groups;
-#ifdef __cplusplus
-extern "C" bool_t xdr_groups(XDR *, groups*);
-#elif __STDC__
-extern bool_t xdr_groups(XDR *, groups*);
-#else /* Old Style C */
-bool_t xdr_groups();
-#endif /* Old Style C */
-
struct groupnode {
name gr_name;
groups gr_next;
};
typedef struct groupnode groupnode;
-#ifdef __cplusplus
-extern "C" bool_t xdr_groupnode(XDR *, groupnode*);
-#elif __STDC__
-extern bool_t xdr_groupnode(XDR *, groupnode*);
-#else /* Old Style C */
-bool_t xdr_groupnode();
-#endif /* Old Style C */
-
typedef struct exportnode *exports;
-#ifdef __cplusplus
-extern "C" bool_t xdr_exports(XDR *, exports*);
-#elif __STDC__
-extern bool_t xdr_exports(XDR *, exports*);
-#else /* Old Style C */
-bool_t xdr_exports();
-#endif /* Old Style C */
-
struct exportnode {
dirpath ex_dir;
@@ -235,14 +137,6 @@ struct exportnode {
exports ex_next;
};
typedef struct exportnode exportnode;
-#ifdef __cplusplus
-extern "C" bool_t xdr_exportnode(XDR *, exportnode*);
-#elif __STDC__
-extern bool_t xdr_exportnode(XDR *, exportnode*);
-#else /* Old Style C */
-bool_t xdr_exportnode();
-#endif /* Old Style C */
-
struct ppathcnf {
int pc_link_max;
@@ -256,110 +150,62 @@ struct ppathcnf {
short pc_mask[2];
};
typedef struct ppathcnf ppathcnf;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ppathcnf(XDR *, ppathcnf*);
-#elif __STDC__
-extern bool_t xdr_ppathcnf(XDR *, ppathcnf*);
-#else /* Old Style C */
-bool_t xdr_ppathcnf();
-#endif /* Old Style C */
-
#endif /*!_rpcsvc_mount_h*/
-#define MOUNTPROG ((u_long)100005)
-#define MOUNTVERS ((u_long)1)
+#define MOUNTPROG 100005
+#define MOUNTVERS 1
-#ifdef __cplusplus
-#define MOUNTPROC_NULL ((u_long)0)
-extern "C" void * mountproc_null_1(void *, CLIENT *);
-extern "C" void * mountproc_null_1_svc(void *, struct svc_req *);
-#define MOUNTPROC_MNT ((u_long)1)
-extern "C" fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
-extern "C" fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
-#define MOUNTPROC_DUMP ((u_long)2)
-extern "C" mountlist * mountproc_dump_1(void *, CLIENT *);
-extern "C" mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
-#define MOUNTPROC_UMNT ((u_long)3)
-extern "C" void * mountproc_umnt_1(dirpath *, CLIENT *);
-extern "C" void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
-#define MOUNTPROC_UMNTALL ((u_long)4)
-extern "C" void * mountproc_umntall_1(void *, CLIENT *);
-extern "C" void * mountproc_umntall_1_svc(void *, struct svc_req *);
-#define MOUNTPROC_EXPORT ((u_long)5)
-extern "C" exports * mountproc_export_1(void *, CLIENT *);
-extern "C" exports * mountproc_export_1_svc(void *, struct svc_req *);
-#define MOUNTPROC_EXPORTALL ((u_long)6)
-extern "C" exports * mountproc_exportall_1(void *, CLIENT *);
-extern "C" exports * mountproc_exportall_1_svc(void *, struct svc_req *);
-
-#elif __STDC__
-#define MOUNTPROC_NULL ((u_long)0)
+#if defined(__STDC__) || defined(__cplusplus)
+#define MOUNTPROC_NULL 0
extern void * mountproc_null_1(void *, CLIENT *);
extern void * mountproc_null_1_svc(void *, struct svc_req *);
-#define MOUNTPROC_MNT ((u_long)1)
+#define MOUNTPROC_MNT 1
extern fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
extern fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
-#define MOUNTPROC_DUMP ((u_long)2)
+#define MOUNTPROC_DUMP 2
extern mountlist * mountproc_dump_1(void *, CLIENT *);
extern mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
-#define MOUNTPROC_UMNT ((u_long)3)
+#define MOUNTPROC_UMNT 3
extern void * mountproc_umnt_1(dirpath *, CLIENT *);
extern void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
-#define MOUNTPROC_UMNTALL ((u_long)4)
+#define MOUNTPROC_UMNTALL 4
extern void * mountproc_umntall_1(void *, CLIENT *);
extern void * mountproc_umntall_1_svc(void *, struct svc_req *);
-#define MOUNTPROC_EXPORT ((u_long)5)
+#define MOUNTPROC_EXPORT 5
extern exports * mountproc_export_1(void *, CLIENT *);
extern exports * mountproc_export_1_svc(void *, struct svc_req *);
-#define MOUNTPROC_EXPORTALL ((u_long)6)
+#define MOUNTPROC_EXPORTALL 6
extern exports * mountproc_exportall_1(void *, CLIENT *);
extern exports * mountproc_exportall_1_svc(void *, struct svc_req *);
+extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-#else /* Old Style C */
-#define MOUNTPROC_NULL ((u_long)0)
+#else /* K&R C */
+#define MOUNTPROC_NULL 0
extern void * mountproc_null_1();
extern void * mountproc_null_1_svc();
-#define MOUNTPROC_MNT ((u_long)1)
+#define MOUNTPROC_MNT 1
extern fhstatus * mountproc_mnt_1();
extern fhstatus * mountproc_mnt_1_svc();
-#define MOUNTPROC_DUMP ((u_long)2)
+#define MOUNTPROC_DUMP 2
extern mountlist * mountproc_dump_1();
extern mountlist * mountproc_dump_1_svc();
-#define MOUNTPROC_UMNT ((u_long)3)
+#define MOUNTPROC_UMNT 3
extern void * mountproc_umnt_1();
extern void * mountproc_umnt_1_svc();
-#define MOUNTPROC_UMNTALL ((u_long)4)
+#define MOUNTPROC_UMNTALL 4
extern void * mountproc_umntall_1();
extern void * mountproc_umntall_1_svc();
-#define MOUNTPROC_EXPORT ((u_long)5)
+#define MOUNTPROC_EXPORT 5
extern exports * mountproc_export_1();
extern exports * mountproc_export_1_svc();
-#define MOUNTPROC_EXPORTALL ((u_long)6)
+#define MOUNTPROC_EXPORTALL 6
extern exports * mountproc_exportall_1();
extern exports * mountproc_exportall_1_svc();
-#endif /* Old Style C */
-#define MOUNTVERS_POSIX ((u_long)2)
+extern int mountprog_1_freeresult ();
+#endif /* K&R C */
+#define MOUNTVERS_POSIX 2
-#ifdef __cplusplus
-extern "C" void * mountproc_null_2(void *, CLIENT *);
-extern "C" void * mountproc_null_2_svc(void *, struct svc_req *);
-extern "C" fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);
-extern "C" fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *);
-extern "C" mountlist * mountproc_dump_2(void *, CLIENT *);
-extern "C" mountlist * mountproc_dump_2_svc(void *, struct svc_req *);
-extern "C" void * mountproc_umnt_2(dirpath *, CLIENT *);
-extern "C" void * mountproc_umnt_2_svc(dirpath *, struct svc_req *);
-extern "C" void * mountproc_umntall_2(void *, CLIENT *);
-extern "C" void * mountproc_umntall_2_svc(void *, struct svc_req *);
-extern "C" exports * mountproc_export_2(void *, CLIENT *);
-extern "C" exports * mountproc_export_2_svc(void *, struct svc_req *);
-extern "C" exports * mountproc_exportall_2(void *, CLIENT *);
-extern "C" exports * mountproc_exportall_2_svc(void *, struct svc_req *);
-#define MOUNTPROC_PATHCONF ((u_long)7)
-extern "C" ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);
-extern "C" ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);
-
-#elif __STDC__
+#if defined(__STDC__) || defined(__cplusplus)
extern void * mountproc_null_2(void *, CLIENT *);
extern void * mountproc_null_2_svc(void *, struct svc_req *);
extern fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);
@@ -374,11 +220,12 @@ extern exports * mountproc_export_2(void *, CLIENT *);
extern exports * mountproc_export_2_svc(void *, struct svc_req *);
extern exports * mountproc_exportall_2(void *, CLIENT *);
extern exports * mountproc_exportall_2_svc(void *, struct svc_req *);
-#define MOUNTPROC_PATHCONF ((u_long)7)
+#define MOUNTPROC_PATHCONF 7
extern ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);
extern ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);
+extern int mountprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-#else /* Old Style C */
+#else /* K&R C */
extern void * mountproc_null_2();
extern void * mountproc_null_2_svc();
extern fhstatus * mountproc_mnt_2();
@@ -393,71 +240,96 @@ extern exports * mountproc_export_2();
extern exports * mountproc_export_2_svc();
extern exports * mountproc_exportall_2();
extern exports * mountproc_exportall_2_svc();
-#define MOUNTPROC_PATHCONF ((u_long)7)
+#define MOUNTPROC_PATHCONF 7
extern ppathcnf * mountproc_pathconf_2();
extern ppathcnf * mountproc_pathconf_2_svc();
-#endif /* Old Style C */
-#define MOUNT_V3 ((u_long)3)
+extern int mountprog_2_freeresult ();
+#endif /* K&R C */
+#define MOUNT_V3 3
-#ifdef __cplusplus
-#define MOUNTPROC3_NULL ((u_long)0)
-extern "C" void * mountproc3_null_3(void *, CLIENT *);
-extern "C" void * mountproc3_null_3_svc(void *, struct svc_req *);
-#define MOUNTPROC3_MNT ((u_long)1)
-extern "C" mountres3 * mountproc3_mnt_3(dirpath *, CLIENT *);
-extern "C" mountres3 * mountproc3_mnt_3_svc(dirpath *, struct svc_req *);
-#define MOUNTPROC3_DUMP ((u_long)2)
-extern "C" mountlist * mountproc3_dump_3(void *, CLIENT *);
-extern "C" mountlist * mountproc3_dump_3_svc(void *, struct svc_req *);
-#define MOUNTPROC3_UMNT ((u_long)3)
-extern "C" void * mountproc3_umnt_3(dirpath *, CLIENT *);
-extern "C" void * mountproc3_umnt_3_svc(dirpath *, struct svc_req *);
-#define MOUNTPROC3_UMNTALL ((u_long)4)
-extern "C" void * mountproc3_umntall_3(void *, CLIENT *);
-extern "C" void * mountproc3_umntall_3_svc(void *, struct svc_req *);
-#define MOUNTPROC3_EXPORT ((u_long)5)
-extern "C" exports * mountproc3_export_3(void *, CLIENT *);
-extern "C" exports * mountproc3_export_3_svc(void *, struct svc_req *);
-
-#elif __STDC__
-#define MOUNTPROC3_NULL ((u_long)0)
+#if defined(__STDC__) || defined(__cplusplus)
+#define MOUNTPROC3_NULL 0
extern void * mountproc3_null_3(void *, CLIENT *);
extern void * mountproc3_null_3_svc(void *, struct svc_req *);
-#define MOUNTPROC3_MNT ((u_long)1)
+#define MOUNTPROC3_MNT 1
extern mountres3 * mountproc3_mnt_3(dirpath *, CLIENT *);
extern mountres3 * mountproc3_mnt_3_svc(dirpath *, struct svc_req *);
-#define MOUNTPROC3_DUMP ((u_long)2)
+#define MOUNTPROC3_DUMP 2
extern mountlist * mountproc3_dump_3(void *, CLIENT *);
extern mountlist * mountproc3_dump_3_svc(void *, struct svc_req *);
-#define MOUNTPROC3_UMNT ((u_long)3)
+#define MOUNTPROC3_UMNT 3
extern void * mountproc3_umnt_3(dirpath *, CLIENT *);
extern void * mountproc3_umnt_3_svc(dirpath *, struct svc_req *);
-#define MOUNTPROC3_UMNTALL ((u_long)4)
+#define MOUNTPROC3_UMNTALL 4
extern void * mountproc3_umntall_3(void *, CLIENT *);
extern void * mountproc3_umntall_3_svc(void *, struct svc_req *);
-#define MOUNTPROC3_EXPORT ((u_long)5)
+#define MOUNTPROC3_EXPORT 5
extern exports * mountproc3_export_3(void *, CLIENT *);
extern exports * mountproc3_export_3_svc(void *, struct svc_req *);
+extern int mountprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-#else /* Old Style C */
-#define MOUNTPROC3_NULL ((u_long)0)
+#else /* K&R C */
+#define MOUNTPROC3_NULL 0
extern void * mountproc3_null_3();
extern void * mountproc3_null_3_svc();
-#define MOUNTPROC3_MNT ((u_long)1)
+#define MOUNTPROC3_MNT 1
extern mountres3 * mountproc3_mnt_3();
extern mountres3 * mountproc3_mnt_3_svc();
-#define MOUNTPROC3_DUMP ((u_long)2)
+#define MOUNTPROC3_DUMP 2
extern mountlist * mountproc3_dump_3();
extern mountlist * mountproc3_dump_3_svc();
-#define MOUNTPROC3_UMNT ((u_long)3)
+#define MOUNTPROC3_UMNT 3
extern void * mountproc3_umnt_3();
extern void * mountproc3_umnt_3_svc();
-#define MOUNTPROC3_UMNTALL ((u_long)4)
+#define MOUNTPROC3_UMNTALL 4
extern void * mountproc3_umntall_3();
extern void * mountproc3_umntall_3_svc();
-#define MOUNTPROC3_EXPORT ((u_long)5)
+#define MOUNTPROC3_EXPORT 5
extern exports * mountproc3_export_3();
extern exports * mountproc3_export_3_svc();
-#endif /* Old Style C */
+extern int mountprog_3_freeresult ();
+#endif /* K&R C */
+
+/* the xdr functions */
+
+#if defined(__STDC__) || defined(__cplusplus)
+extern bool_t xdr_fhandle (XDR *, fhandle);
+extern bool_t xdr_fhandle3 (XDR *, fhandle3*);
+extern bool_t xdr_mountstat3 (XDR *, mountstat3*);
+extern bool_t xdr_fhstatus (XDR *, fhstatus*);
+extern bool_t xdr_mountres3_ok (XDR *, mountres3_ok*);
+extern bool_t xdr_mountres3 (XDR *, mountres3*);
+extern bool_t xdr_dirpath (XDR *, dirpath*);
+extern bool_t xdr_name (XDR *, name*);
+extern bool_t xdr_mountlist (XDR *, mountlist*);
+extern bool_t xdr_mountbody (XDR *, mountbody*);
+extern bool_t xdr_groups (XDR *, groups*);
+extern bool_t xdr_groupnode (XDR *, groupnode*);
+extern bool_t xdr_exports (XDR *, exports*);
+extern bool_t xdr_exportnode (XDR *, exportnode*);
+extern bool_t xdr_ppathcnf (XDR *, ppathcnf*);
+
+#else /* K&R C */
+extern bool_t xdr_fhandle ();
+extern bool_t xdr_fhandle3 ();
+extern bool_t xdr_mountstat3 ();
+extern bool_t xdr_fhstatus ();
+extern bool_t xdr_mountres3_ok ();
+extern bool_t xdr_mountres3 ();
+extern bool_t xdr_dirpath ();
+extern bool_t xdr_name ();
+extern bool_t xdr_mountlist ();
+extern bool_t xdr_mountbody ();
+extern bool_t xdr_groups ();
+extern bool_t xdr_groupnode ();
+extern bool_t xdr_exports ();
+extern bool_t xdr_exportnode ();
+extern bool_t xdr_ppathcnf ();
+
+#endif /* K&R C */
+
+#ifdef __cplusplus
+}
+#endif
#endif /* !_NFSMOUNT_H_RPCGEN */
diff --git a/isys/nfsmount_clnt.c b/isys/nfsmount_clnt.c
index d315ca4f1..b518f60b2 100644
--- a/isys/nfsmount_clnt.c
+++ b/isys/nfsmount_clnt.c
@@ -39,7 +39,7 @@
*/
/* from @(#)mount.x 1.3 91/03/11 TIRPC 1.0 */
-#include <string.h> /* for memset() */
+#include <string.h> /* for memset() */
#include <asm/types.h>
/* Default timeout can be changed using clnt_control() */
@@ -51,7 +51,10 @@ mountproc_null_1(void *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_NULL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_NULL,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -63,7 +66,10 @@ mountproc_mnt_1(dirpath *argp, CLIENT *clnt)
static fhstatus clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_MNT, xdr_dirpath, argp, xdr_fhstatus, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_MNT,
+ (xdrproc_t) xdr_dirpath, (caddr_t) argp,
+ (xdrproc_t) xdr_fhstatus, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -75,7 +81,10 @@ mountproc_dump_1(void *argp, CLIENT *clnt)
static mountlist clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_DUMP, xdr_void, argp, xdr_mountlist, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_DUMP,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_mountlist, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -87,7 +96,10 @@ mountproc_umnt_1(dirpath *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_UMNT, xdr_dirpath, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_UMNT,
+ (xdrproc_t) xdr_dirpath, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -99,7 +111,10 @@ mountproc_umntall_1(void *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_UMNTALL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_UMNTALL,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -111,7 +126,10 @@ mountproc_export_1(void *argp, CLIENT *clnt)
static exports clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_EXPORT, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_EXPORT,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_exports, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -123,7 +141,10 @@ mountproc_exportall_1(void *argp, CLIENT *clnt)
static exports clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_EXPORTALL, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_EXPORTALL,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_exports, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -135,7 +156,10 @@ mountproc_null_2(void *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_NULL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_NULL,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -147,7 +171,10 @@ mountproc_mnt_2(dirpath *argp, CLIENT *clnt)
static fhstatus clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_MNT, xdr_dirpath, argp, xdr_fhstatus, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_MNT,
+ (xdrproc_t) xdr_dirpath, (caddr_t) argp,
+ (xdrproc_t) xdr_fhstatus, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -159,7 +186,10 @@ mountproc_dump_2(void *argp, CLIENT *clnt)
static mountlist clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_DUMP, xdr_void, argp, xdr_mountlist, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_DUMP,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_mountlist, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -171,7 +201,10 @@ mountproc_umnt_2(dirpath *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_UMNT, xdr_dirpath, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_UMNT,
+ (xdrproc_t) xdr_dirpath, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -183,7 +216,10 @@ mountproc_umntall_2(void *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_UMNTALL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_UMNTALL,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -195,7 +231,10 @@ mountproc_export_2(void *argp, CLIENT *clnt)
static exports clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_EXPORT, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_EXPORT,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_exports, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -207,7 +246,10 @@ mountproc_exportall_2(void *argp, CLIENT *clnt)
static exports clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_EXPORTALL, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_EXPORTALL,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_exports, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -219,7 +261,10 @@ mountproc_pathconf_2(dirpath *argp, CLIENT *clnt)
static ppathcnf clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC_PATHCONF, xdr_dirpath, argp, xdr_ppathcnf, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC_PATHCONF,
+ (xdrproc_t) xdr_dirpath, (caddr_t) argp,
+ (xdrproc_t) xdr_ppathcnf, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -231,7 +276,10 @@ mountproc3_null_3(void *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC3_NULL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC3_NULL,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -243,7 +291,10 @@ mountproc3_mnt_3(dirpath *argp, CLIENT *clnt)
static mountres3 clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC3_MNT, xdr_dirpath, argp, xdr_mountres3, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC3_MNT,
+ (xdrproc_t) xdr_dirpath, (caddr_t) argp,
+ (xdrproc_t) xdr_mountres3, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -255,7 +306,10 @@ mountproc3_dump_3(void *argp, CLIENT *clnt)
static mountlist clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC3_DUMP, xdr_void, argp, xdr_mountlist, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC3_DUMP,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_mountlist, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
@@ -267,7 +321,10 @@ mountproc3_umnt_3(dirpath *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC3_UMNT, xdr_dirpath, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC3_UMNT,
+ (xdrproc_t) xdr_dirpath, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -279,7 +336,10 @@ mountproc3_umntall_3(void *argp, CLIENT *clnt)
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC3_UMNTALL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC3_UMNTALL,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
@@ -291,7 +351,10 @@ mountproc3_export_3(void *argp, CLIENT *clnt)
static exports clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
- if (clnt_call(clnt, MOUNTPROC3_EXPORT, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
+ if (clnt_call (clnt, MOUNTPROC3_EXPORT,
+ (xdrproc_t) xdr_void, (caddr_t) argp,
+ (xdrproc_t) xdr_exports, (caddr_t) &clnt_res,
+ TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
diff --git a/isys/nfsmount_xdr.c b/isys/nfsmount_xdr.c
index daca321cc..33bde321f 100644
--- a/isys/nfsmount_xdr.c
+++ b/isys/nfsmount_xdr.c
@@ -3,9 +3,6 @@
* It was generated using rpcgen.
*/
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-
#include "nfsmount.h"
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -44,352 +41,262 @@
#include <asm/types.h>
bool_t
-xdr_fhandle(XDR *xdrs, fhandle objp)
+xdr_fhandle (XDR *xdrs, fhandle objp)
{
-
- register long *buf;
-
- if (!xdr_opaque(xdrs, objp, FHSIZE)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_opaque (xdrs, objp, FHSIZE))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_fhandle3(XDR *xdrs, fhandle3 *objp)
+xdr_fhandle3 (XDR *xdrs, fhandle3 *objp)
{
-
- register long *buf;
-
- if (!xdr_bytes(xdrs, (char **)&objp->fhandle3_val, (u_int *)&objp->fhandle3_len, FHSIZE3)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_bytes (xdrs, (char **)&objp->fhandle3_val, (u_int *) &objp->fhandle3_len, FHSIZE3))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_mountstat3(XDR *xdrs, mountstat3 *objp)
+xdr_mountstat3 (XDR *xdrs, mountstat3 *objp)
{
-
- register long *buf;
-
- if (!xdr_enum(xdrs, (enum_t *)objp)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_enum (xdrs, (enum_t *) objp))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_fhstatus(XDR *xdrs, fhstatus *objp)
+xdr_fhstatus (XDR *xdrs, fhstatus *objp)
{
-
- register long *buf;
-
- if (!xdr_u_int(xdrs, &objp->fhs_status)) {
- return (FALSE);
- }
+ if (!xdr_u_int (xdrs, &objp->fhs_status))
+ return FALSE;
switch (objp->fhs_status) {
case 0:
- if (!xdr_fhandle(xdrs, objp->fhstatus_u.fhs_fhandle)) {
- return (FALSE);
- }
+ if (!xdr_fhandle (xdrs, objp->fhstatus_u.fhs_fhandle))
+ return FALSE;
break;
default:
break;
}
- return (TRUE);
+ return TRUE;
}
bool_t
-xdr_mountres3_ok(XDR *xdrs, mountres3_ok *objp)
+xdr_mountres3_ok (XDR *xdrs, mountres3_ok *objp)
{
-
- register long *buf;
-
- if (!xdr_fhandle3(xdrs, &objp->fhandle)) {
- return (FALSE);
- }
- if (!xdr_array(xdrs, (char **)&objp->auth_flavours.auth_flavours_val, (u_int *)&objp->auth_flavours.auth_flavours_len, ~0, sizeof(int), (xdrproc_t)xdr_int)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_fhandle3 (xdrs, &objp->fhandle))
+ return FALSE;
+ if (!xdr_array (xdrs, (char **)&objp->auth_flavours.auth_flavours_val, (u_int *) &objp->auth_flavours.auth_flavours_len, ~0,
+ sizeof (int), (xdrproc_t) xdr_int))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_mountres3(XDR *xdrs, mountres3 *objp)
+xdr_mountres3 (XDR *xdrs, mountres3 *objp)
{
-
- register long *buf;
-
- if (!xdr_mountstat3(xdrs, &objp->fhs_status)) {
- return (FALSE);
- }
+ if (!xdr_mountstat3 (xdrs, &objp->fhs_status))
+ return FALSE;
switch (objp->fhs_status) {
case MNT_OK:
- if (!xdr_mountres3_ok(xdrs, &objp->mountres3_u.mountinfo)) {
- return (FALSE);
- }
+ if (!xdr_mountres3_ok (xdrs, &objp->mountres3_u.mountinfo))
+ return FALSE;
break;
default:
break;
}
- return (TRUE);
+ return TRUE;
}
bool_t
-xdr_dirpath(XDR *xdrs, dirpath *objp)
+xdr_dirpath (XDR *xdrs, dirpath *objp)
{
-
- register long *buf;
-
- if (!xdr_string(xdrs, objp, MNTPATHLEN)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_string (xdrs, objp, MNTPATHLEN))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_name(XDR *xdrs, name *objp)
+xdr_name (XDR *xdrs, name *objp)
{
-
- register long *buf;
-
- if (!xdr_string(xdrs, objp, MNTNAMLEN)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_string (xdrs, objp, MNTNAMLEN))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_mountlist(XDR *xdrs, mountlist *objp)
+xdr_mountlist (XDR *xdrs, mountlist *objp)
{
-
- register long *buf;
-
- if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct mountbody), (xdrproc_t)xdr_mountbody)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_pointer (xdrs, (char **)objp, sizeof (struct mountbody), (xdrproc_t) xdr_mountbody))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_mountbody(XDR *xdrs, mountbody *objp)
+xdr_mountbody (XDR *xdrs, mountbody *objp)
{
- register long *buf;
-
- if (!xdr_name(xdrs, &objp->ml_hostname)) {
- return (FALSE);
- }
- if (!xdr_dirpath(xdrs, &objp->ml_directory)) {
- return (FALSE);
- }
- if (!xdr_mountlist(xdrs, &objp->ml_next)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_name (xdrs, &objp->ml_hostname))
+ return FALSE;
+ if (!xdr_dirpath (xdrs, &objp->ml_directory))
+ return FALSE;
+ if (!xdr_mountlist (xdrs, &objp->ml_next))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_groups(XDR *xdrs, groups *objp)
+xdr_groups (XDR *xdrs, groups *objp)
{
-
- register long *buf;
-
- if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct groupnode), (xdrproc_t)xdr_groupnode)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_pointer (xdrs, (char **)objp, sizeof (struct groupnode), (xdrproc_t) xdr_groupnode))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_groupnode(XDR *xdrs, groupnode *objp)
+xdr_groupnode (XDR *xdrs, groupnode *objp)
{
-
- register long *buf;
-
- if (!xdr_name(xdrs, &objp->gr_name)) {
- return (FALSE);
- }
- if (!xdr_groups(xdrs, &objp->gr_next)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_name (xdrs, &objp->gr_name))
+ return FALSE;
+ if (!xdr_groups (xdrs, &objp->gr_next))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_exports(XDR *xdrs, exports *objp)
+xdr_exports (XDR *xdrs, exports *objp)
{
-
- register long *buf;
-
- if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct exportnode), (xdrproc_t)xdr_exportnode)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_pointer (xdrs, (char **)objp, sizeof (struct exportnode), (xdrproc_t) xdr_exportnode))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_exportnode(XDR *xdrs, exportnode *objp)
+xdr_exportnode (XDR *xdrs, exportnode *objp)
{
-
- register long *buf;
-
- if (!xdr_dirpath(xdrs, &objp->ex_dir)) {
- return (FALSE);
- }
- if (!xdr_groups(xdrs, &objp->ex_groups)) {
- return (FALSE);
- }
- if (!xdr_exports(xdrs, &objp->ex_next)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_dirpath (xdrs, &objp->ex_dir))
+ return FALSE;
+ if (!xdr_groups (xdrs, &objp->ex_groups))
+ return FALSE;
+ if (!xdr_exports (xdrs, &objp->ex_next))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ppathcnf(XDR *xdrs, ppathcnf *objp)
+xdr_ppathcnf (XDR *xdrs, ppathcnf *objp)
{
+ register int32_t *buf;
- register long *buf;
-
- int i;
-
- if (xdrs->x_op == XDR_ENCODE) {
- buf = XDR_INLINE(xdrs,6 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int(xdrs, &objp->pc_link_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_max_canon)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_max_input)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_name_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_path_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_pipe_buf)) {
- return (FALSE);
- }
+ int i;
- }
- else {
- IXDR_PUT_LONG(buf,objp->pc_link_max);
- IXDR_PUT_SHORT(buf,objp->pc_max_canon);
- IXDR_PUT_SHORT(buf,objp->pc_max_input);
- IXDR_PUT_SHORT(buf,objp->pc_name_max);
- IXDR_PUT_SHORT(buf,objp->pc_path_max);
- IXDR_PUT_SHORT(buf,objp->pc_pipe_buf);
- }
- if (!xdr_u_char(xdrs, &objp->pc_vdisable)) {
- return (FALSE);
- }
- if (!xdr_char(xdrs, &objp->pc_xxx)) {
- return (FALSE);
- }
- buf = XDR_INLINE(xdrs, 2 * BYTES_PER_XDR_UNIT);
+ if (xdrs->x_op == XDR_ENCODE) {
+ buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
- if (!xdr_vector(xdrs, (char *)objp->pc_mask, 2, sizeof(short), (xdrproc_t)xdr_short)) {
- return (FALSE);
- }
-
- }
- else {
- { register short *genp;
- for ( i = 0,genp=objp->pc_mask;
- i < 2; i++){
- IXDR_PUT_SHORT(buf,*genp++);
- }
- };
- }
-
- return (TRUE);
+ if (!xdr_int (xdrs, &objp->pc_link_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_max_canon))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_max_input))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_name_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_path_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_pipe_buf))
+ return FALSE;
+
+ } else {
+ IXDR_PUT_LONG(buf, objp->pc_link_max);
+ IXDR_PUT_SHORT(buf, objp->pc_max_canon);
+ IXDR_PUT_SHORT(buf, objp->pc_max_input);
+ IXDR_PUT_SHORT(buf, objp->pc_name_max);
+ IXDR_PUT_SHORT(buf, objp->pc_path_max);
+ IXDR_PUT_SHORT(buf, objp->pc_pipe_buf);
+ }
+ if (!xdr_u_char (xdrs, &objp->pc_vdisable))
+ return FALSE;
+ if (!xdr_char (xdrs, &objp->pc_xxx))
+ return FALSE;
+ buf = XDR_INLINE (xdrs, ( 2 ) * BYTES_PER_XDR_UNIT);
+ if (buf == NULL) {
+ if (!xdr_vector (xdrs, (char *)objp->pc_mask, 2,
+ sizeof (short), (xdrproc_t) xdr_short))
+ return FALSE;
+ } else {
+ {
+ register short *genp;
+
+ for (i = 0, genp = objp->pc_mask;
+ i < 2; ++i) {
+ IXDR_PUT_SHORT(buf, *genp++);
+ }
+ }
+ }
+ return TRUE;
} else if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE(xdrs,6 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int(xdrs, &objp->pc_link_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_max_canon)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_max_input)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_name_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_path_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_pipe_buf)) {
- return (FALSE);
- }
-
- }
- else {
- objp->pc_link_max = IXDR_GET_LONG(buf);
- objp->pc_max_canon = IXDR_GET_SHORT(buf);
- objp->pc_max_input = IXDR_GET_SHORT(buf);
- objp->pc_name_max = IXDR_GET_SHORT(buf);
- objp->pc_path_max = IXDR_GET_SHORT(buf);
- objp->pc_pipe_buf = IXDR_GET_SHORT(buf);
- }
- if (!xdr_u_char(xdrs, &objp->pc_vdisable)) {
- return (FALSE);
- }
- if (!xdr_char(xdrs, &objp->pc_xxx)) {
- return (FALSE);
- }
- buf = XDR_INLINE(xdrs, 2 * BYTES_PER_XDR_UNIT);
+ buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
- if (!xdr_vector(xdrs, (char *)objp->pc_mask, 2, sizeof(short), (xdrproc_t)xdr_short)) {
- return (FALSE);
- }
-
- }
- else {
- { register short *genp;
- for ( i = 0,genp=objp->pc_mask;
- i < 2; i++){
- *genp++ = IXDR_GET_SHORT(buf);
- }
- };
- }
- return(TRUE);
+ if (!xdr_int (xdrs, &objp->pc_link_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_max_canon))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_max_input))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_name_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_path_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_pipe_buf))
+ return FALSE;
+
+ } else {
+ objp->pc_link_max = IXDR_GET_LONG(buf);
+ objp->pc_max_canon = IXDR_GET_SHORT(buf);
+ objp->pc_max_input = IXDR_GET_SHORT(buf);
+ objp->pc_name_max = IXDR_GET_SHORT(buf);
+ objp->pc_path_max = IXDR_GET_SHORT(buf);
+ objp->pc_pipe_buf = IXDR_GET_SHORT(buf);
+ }
+ if (!xdr_u_char (xdrs, &objp->pc_vdisable))
+ return FALSE;
+ if (!xdr_char (xdrs, &objp->pc_xxx))
+ return FALSE;
+ buf = XDR_INLINE (xdrs, ( 2 ) * BYTES_PER_XDR_UNIT);
+ if (buf == NULL) {
+ if (!xdr_vector (xdrs, (char *)objp->pc_mask, 2,
+ sizeof (short), (xdrproc_t) xdr_short))
+ return FALSE;
+ } else {
+ {
+ register short *genp;
+
+ for (i = 0, genp = objp->pc_mask;
+ i < 2; ++i) {
+ *genp++ = IXDR_GET_SHORT(buf);
+ }
+ }
+ }
+ return TRUE;
}
- if (!xdr_int(xdrs, &objp->pc_link_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_max_canon)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_max_input)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_name_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_path_max)) {
- return (FALSE);
- }
- if (!xdr_short(xdrs, &objp->pc_pipe_buf)) {
- return (FALSE);
- }
- if (!xdr_u_char(xdrs, &objp->pc_vdisable)) {
- return (FALSE);
- }
- if (!xdr_char(xdrs, &objp->pc_xxx)) {
- return (FALSE);
- }
- if (!xdr_vector(xdrs, (char *)objp->pc_mask, 2, sizeof(short), (xdrproc_t)xdr_short)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_int (xdrs, &objp->pc_link_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_max_canon))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_max_input))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_name_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_path_max))
+ return FALSE;
+ if (!xdr_short (xdrs, &objp->pc_pipe_buf))
+ return FALSE;
+ if (!xdr_u_char (xdrs, &objp->pc_vdisable))
+ return FALSE;
+ if (!xdr_char (xdrs, &objp->pc_xxx))
+ return FALSE;
+ if (!xdr_vector (xdrs, (char *)objp->pc_mask, 2,
+ sizeof (short), (xdrproc_t) xdr_short))
+ return FALSE;
+ return TRUE;
}
diff --git a/isys/pdc.c b/isys/pdc.c
index c0ef3e41e..6d5364040 100644
--- a/isys/pdc.c
+++ b/isys/pdc.c
@@ -121,7 +121,6 @@ static unsigned long long calc_pdcblock_offset (int fd) {
static int read_disk_sb (int fd, unsigned char *buffer,int bufsize)
{
int ret = -1;
- char bh[4096];
unsigned long long sb_offset;
/*
@@ -152,14 +151,8 @@ static unsigned int calc_sb_csum (unsigned int* ptr)
return sum;
}
-static int check_disk_sb (void)
-{
- return 0;
-}
-
int pdc_dev_running_raid(int fd)
{
- int i;
struct promise_raid_conf *prom;
unsigned char block[4096];
diff --git a/isys/probe.c b/isys/probe.c
index 5ad013d13..ad7d3a42c 100644
--- a/isys/probe.c
+++ b/isys/probe.c
@@ -20,7 +20,9 @@
static int dac960GetDevices(struct knownDevices * devices);
static int CompaqSmartArrayGetDevices(struct knownDevices * devices);
static int CompaqSmartArray5300GetDevices(struct knownDevices * devices);
+#ifdef WITH_ATARAID
static int ataraidGetDevices(struct knownDevices * devices);
+#endif
static int viodGetDevices(struct knownDevices * devices);
/* Added support for I2O Block devices: Boji Kannanthanam
<boji.t.Kannanthanam@intel.com> */
@@ -568,7 +570,7 @@ int kdFindScsiList(struct knownDevices * devices, int code) {
CompaqSmartArray5300GetDevices(devices);
viodGetDevices(devices);
/* we can't really sanely do ataraid devs yet (#82848) */
-#if 0
+#if WITH_ATARAID
ataraidGetDevices(devices);
#endif
@@ -766,6 +768,7 @@ static int ProcPartitionsGetDevices(struct knownDevices * devices) {
return 0;
}
+#ifdef WITH_ATARAID
static int ataraidGetDevices(struct knownDevices * devices) {
struct kddevice newDevice;
int fd, i;
@@ -856,6 +859,7 @@ static int ataraidGetDevices(struct knownDevices * devices) {
free (buf);
return 0;
}
+#endif
static int CompaqSmartArray5300GetDevices(struct knownDevices * devices) {
diff --git a/isys/probe.h b/isys/probe.h
index 2bbaa3c27..a4f42eb94 100644
--- a/isys/probe.h
+++ b/isys/probe.h
@@ -1,6 +1,7 @@
#ifndef H_PROBE
#define H_PROBE
+#include <sys/types.h>
#include "kudzu/kudzu.h"
#define DASD_IOCTL_LETTER 'D'
diff --git a/isys/vio.c b/isys/vio.c
index be4062315..8917c455f 100644
--- a/isys/vio.c
+++ b/isys/vio.c
@@ -200,7 +200,7 @@ int isVioConsole(void) {
isviocons = 0;
start = buf;
while (start && *start) {
- if (sscanf(start, "%s %s", &driver, &device) == 2) {
+ if (sscanf(start, "%s %s", (char *) &driver, (char *) &device) == 2) {
if (!strcmp(driver, "vioconsole") && !strcmp(device, "/dev/tty")) {
isviocons = 1;
break;