From 71f385dc30da7b18d12f88f6c4b0ec67af153d20 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 5 Dec 2006 23:31:57 +0000 Subject: [PATCH] Local variables that were improperly named 'errno' must be renamed so as not to conflict with libc's errno, when building a virtual kernel. --- sys/dev/disk/aic7xxx/aic79xx.c | 6 +++--- sys/dev/disk/vpo/vpo.c | 20 +++++++++--------- sys/kern/uipc_socket.c | 4 ++-- sys/kern/uipc_usrreq.c | 6 +++--- sys/netinet/in_pcb.c | 8 +++---- sys/netinet/sctp_usrreq.c | 16 +++++++------- sys/netinet/tcp_subr.c | 16 +++++++------- sys/netinet6/in6_pcb.c | 4 ++-- sys/netproto/atm/atm_aal5.c | 38 +++++++++++++++++----------------- sys/netproto/ipx/ipx_pcb.c | 8 +++---- sys/netproto/ns/spp_usrreq.c | 6 +++--- sys/platform/pc32/apm/apm.c | 10 ++++----- 12 files changed, 71 insertions(+), 71 deletions(-) diff --git a/sys/dev/disk/aic7xxx/aic79xx.c b/sys/dev/disk/aic7xxx/aic79xx.c index 54766054f4..0af9f1652d 100644 --- a/sys/dev/disk/aic7xxx/aic79xx.c +++ b/sys/dev/disk/aic7xxx/aic79xx.c @@ -40,7 +40,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#198 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.3.2.5 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.c,v 1.9 2006/09/05 03:48:09 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.c,v 1.10 2006/12/05 23:31:54 dillon Exp $ */ #include "aic79xx_osm.h" @@ -64,7 +64,7 @@ static const u_int num_chip_names = NUM_ELEMENTS(ahd_chip_names); * Hardware error codes. */ struct ahd_hard_error_entry { - uint8_t errno; + uint8_t error; char *errmesg; }; @@ -503,7 +503,7 @@ ahd_handle_hwerrint(struct ahd_softc *ahd) error = ahd_inb(ahd, ERROR); for (i = 0; i < num_errors; i++) { - if ((error & ahd_hard_errors[i].errno) != 0) + if ((error & ahd_hard_errors[i].error) != 0) printf("%s: hwerrint, %s\n", ahd_name(ahd), ahd_hard_errors[i].errmesg); } diff --git a/sys/dev/disk/vpo/vpo.c b/sys/dev/disk/vpo/vpo.c index 5f0efa71fc..a1e1368089 100644 --- a/sys/dev/disk/vpo/vpo.c +++ b/sys/dev/disk/vpo/vpo.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/vpo.c,v 1.20.2.1 2000/05/07 21:08:18 n_hibma Exp $ - * $DragonFly: src/sys/dev/disk/vpo/vpo.c,v 1.7 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/vpo/vpo.c,v 1.8 2006/12/05 23:31:56 dillon Exp $ */ #include @@ -207,7 +207,7 @@ vpo_cam_rescan(struct vpo_data *vpo) static void vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) { - int errno; /* error in errno.h */ + int error; #ifdef VP0_DEBUG int i; #endif @@ -215,13 +215,13 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) crit_enter(); if (vpo->vpo_isplus) { - errno = imm_do_scsi(&vpo->vpo_io, VP0_INITIATOR, + error = imm_do_scsi(&vpo->vpo_io, VP0_INITIATOR, csio->ccb_h.target_id, (char *)&csio->cdb_io.cdb_bytes, csio->cdb_len, (char *)csio->data_ptr, csio->dxfer_len, &vpo->vpo_stat, &vpo->vpo_count, &vpo->vpo_error); } else { - errno = vpoio_do_scsi(&vpo->vpo_io, VP0_INITIATOR, + error = vpoio_do_scsi(&vpo->vpo_io, VP0_INITIATOR, csio->ccb_h.target_id, (char *)&csio->cdb_io.cdb_bytes, csio->cdb_len, (char *)csio->data_ptr, csio->dxfer_len, @@ -230,7 +230,7 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) #ifdef VP0_DEBUG printf("vpo_do_scsi = %d, status = 0x%x, count = %d, vpo_error = %d\n", - errno, vpo->vpo_stat, vpo->vpo_count, vpo->vpo_error); + error, vpo->vpo_stat, vpo->vpo_count, vpo->vpo_error); /* dump of command */ for (i=0; icdb_len; i++) @@ -239,7 +239,7 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) printf("\n"); #endif - if (errno) { + if (error) { /* connection to ppbus interrupted */ csio->ccb_h.status = CAM_CMD_TIMEOUT; goto error; @@ -267,7 +267,7 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) vpo->vpo_sense.cmd.control = 0; if (vpo->vpo_isplus) { - errno = imm_do_scsi(&vpo->vpo_io, VP0_INITIATOR, + error = imm_do_scsi(&vpo->vpo_io, VP0_INITIATOR, csio->ccb_h.target_id, (char *)&vpo->vpo_sense.cmd, sizeof(vpo->vpo_sense.cmd), @@ -275,7 +275,7 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) &vpo->vpo_sense.stat, &vpo->vpo_sense.count, &vpo->vpo_error); } else { - errno = vpoio_do_scsi(&vpo->vpo_io, VP0_INITIATOR, + error = vpoio_do_scsi(&vpo->vpo_io, VP0_INITIATOR, csio->ccb_h.target_id, (char *)&vpo->vpo_sense.cmd, sizeof(vpo->vpo_sense.cmd), @@ -287,11 +287,11 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) #ifdef VP0_DEBUG printf("(sense) vpo_do_scsi = %d, status = 0x%x, count = %d, vpo_error = %d\n", - errno, vpo->vpo_sense.stat, vpo->vpo_sense.count, vpo->vpo_error); + error, vpo->vpo_sense.stat, vpo->vpo_sense.count, vpo->vpo_error); #endif /* check sense return status */ - if (errno == 0 && vpo->vpo_sense.stat == SCSI_STATUS_OK) { + if (error == 0 && vpo->vpo_sense.stat == SCSI_STATUS_OK) { /* sense ok */ csio->ccb_h.status = CAM_AUTOSNS_VALID | CAM_SCSI_STATUS_ERROR; csio->sense_resid = csio->sense_len - vpo->vpo_sense.count; diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 5093c5a26f..fa283dd241 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -82,7 +82,7 @@ * * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 * $FreeBSD: src/sys/kern/uipc_socket.c,v 1.68.2.24 2003/11/11 17:18:18 silby Exp $ - * $DragonFly: src/sys/kern/uipc_socket.c,v 1.38 2006/06/13 08:12:03 dillon Exp $ + * $DragonFly: src/sys/kern/uipc_socket.c,v 1.39 2006/12/05 23:31:56 dillon Exp $ */ #include "opt_inet.h" @@ -539,7 +539,7 @@ sosend(struct socket *so, struct sockaddr *addr, struct uio *uio, td->td_proc->p_stats->p_ru.ru_msgsnd++; if (control) clen = control->m_len; -#define gotoerr(errno) { error = errno; crit_exit(); goto release; } +#define gotoerr(errcode) { error = errcode; crit_exit(); goto release; } restart: error = sblock(&so->so_snd, SBLOCKWAIT(flags)); diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 4744c5ef58..7c9c256391 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -32,7 +32,7 @@ * * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94 * $FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.54.2.10 2003/03/04 17:28:09 nectar Exp $ - * $DragonFly: src/sys/kern/uipc_usrreq.c,v 1.30 2006/10/27 04:56:31 dillon Exp $ + * $DragonFly: src/sys/kern/uipc_usrreq.c,v 1.31 2006/12/05 23:31:56 dillon Exp $ */ #include @@ -879,11 +879,11 @@ unp_shutdown(struct unpcb *unp) } static void -unp_drop(struct unpcb *unp, int errno) +unp_drop(struct unpcb *unp, int err) { struct socket *so = unp->unp_socket; - so->so_error = errno; + so->so_error = err; unp_disconnect(unp); } diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 23014f11f3..dc50457483 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -82,7 +82,7 @@ * * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95 * $FreeBSD: src/sys/netinet/in_pcb.c,v 1.59.2.27 2004/01/02 04:06:42 ambrisko Exp $ - * $DragonFly: src/sys/netinet/in_pcb.c,v 1.39 2006/09/05 00:55:48 dillon Exp $ + * $DragonFly: src/sys/netinet/in_pcb.c,v 1.40 2006/12/05 23:31:57 dillon Exp $ */ #include "opt_ipsec.h" @@ -701,7 +701,7 @@ in_setpeeraddr(struct socket *so, struct sockaddr **nam) } void -in_pcbnotifyall(struct inpcbhead *head, struct in_addr faddr, int errno, +in_pcbnotifyall(struct inpcbhead *head, struct in_addr faddr, int err, void (*notify)(struct inpcb *, int)) { struct inpcb *inp, *ninp; @@ -721,7 +721,7 @@ in_pcbnotifyall(struct inpcbhead *head, struct in_addr faddr, int errno, if (inp->inp_faddr.s_addr != faddr.s_addr || inp->inp_socket == NULL) continue; - (*notify)(inp, errno); /* can remove inp from list! */ + (*notify)(inp, err); /* can remove inp from list! */ } crit_exit(); } @@ -798,7 +798,7 @@ in_losing(struct inpcb *inp) * and allocate a (hopefully) better one. */ void -in_rtchange(struct inpcb *inp, int errno) +in_rtchange(struct inpcb *inp, int err) { if (inp->inp_route.ro_rt) { rtfree(inp->inp_route.ro_rt); diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 1c7e64bdfe..4b89a8ab33 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -1,5 +1,5 @@ /* $KAME: sctp_usrreq.c,v 1.47 2005/03/06 16:04:18 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_usrreq.c,v 1.8 2006/06/23 17:20:14 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_usrreq.c,v 1.9 2006/12/05 23:31:57 dillon Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -375,7 +375,7 @@ sctp_notify_mbuf(struct sctp_inpcb *inp, void sctp_notify(struct sctp_inpcb *inp, - int errno, + int error, struct sctphdr *sh, struct sockaddr *to, struct sctp_tcb *stcb, @@ -398,10 +398,10 @@ sctp_notify(struct sctp_inpcb *inp, /* FIX ME FIX ME PROTOPT i.e. no SCTP should ALWAYS be an ABORT */ - if ((errno == EHOSTUNREACH) || /* Host is not reachable */ - (errno == EHOSTDOWN) || /* Host is down */ - (errno == ECONNREFUSED) || /* Host refused the connection, (not an abort?) */ - (errno == ENOPROTOOPT) /* SCTP is not present on host */ + if ((error == EHOSTUNREACH) || /* Host is not reachable */ + (error == EHOSTDOWN) || /* Host is down */ + (error == ECONNREFUSED) || /* Host refused the connection, (not an abort?) */ + (error == ENOPROTOOPT) /* SCTP is not present on host */ ) { /* * Hmm reachablity problems we must examine closely. @@ -409,7 +409,7 @@ sctp_notify(struct sctp_inpcb *inp, * Or if there is NO protocol at the other end named SCTP. * well we consider it a OOTB abort. */ - if ((errno == EHOSTUNREACH) || (errno == EHOSTDOWN)) { + if ((error == EHOSTUNREACH) || (error == EHOSTDOWN)) { if (net->dest_state & SCTP_ADDR_REACHABLE) { /* Ok that destination is NOT reachable */ net->dest_state &= ~SCTP_ADDR_REACHABLE; @@ -437,7 +437,7 @@ sctp_notify(struct sctp_inpcb *inp, /* Send all others to the app */ if (inp->sctp_socket) { SOCK_LOCK(inp->sctp_socket); - inp->sctp_socket->so_error = errno; + inp->sctp_socket->so_error = error; sctp_sowwakeup(inp, inp->sctp_socket); SOCK_UNLOCK(inp->sctp_socket); } diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index eb5818035b..4282475294 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -82,7 +82,7 @@ * * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.73.2.31 2003/01/24 05:11:34 sam Exp $ - * $DragonFly: src/sys/netinet/tcp_subr.c,v 1.53 2006/09/05 03:48:12 dillon Exp $ + * $DragonFly: src/sys/netinet/tcp_subr.c,v 1.54 2006/12/05 23:31:57 dillon Exp $ */ #include "opt_compat.h" @@ -718,7 +718,7 @@ tcp_newtcpcb(struct inpcb *inp) * If connection is synchronized, then send a RST to peer. */ struct tcpcb * -tcp_drop(struct tcpcb *tp, int errno) +tcp_drop(struct tcpcb *tp, int error) { struct socket *so = tp->t_inpcb->inp_socket; @@ -728,9 +728,9 @@ tcp_drop(struct tcpcb *tp, int errno) tcpstat.tcps_drops++; } else tcpstat.tcps_conndrops++; - if (errno == ETIMEDOUT && tp->t_softerror) - errno = tp->t_softerror; - so->so_error = errno; + if (error == ETIMEDOUT && tp->t_softerror) + error = tp->t_softerror; + so->so_error = error; return (tcp_close(tp)); } @@ -1528,7 +1528,7 @@ tcp_new_isn(struct tcpcb *tp) * to one segment. We will gradually open it again as we proceed. */ void -tcp_quench(struct inpcb *inp, int errno) +tcp_quench(struct inpcb *inp, int error) { struct tcpcb *tp = intotcpcb(inp); @@ -1544,12 +1544,12 @@ tcp_quench(struct inpcb *inp, int errno) * is controlled by the icmp_may_rst sysctl. */ void -tcp_drop_syn_sent(struct inpcb *inp, int errno) +tcp_drop_syn_sent(struct inpcb *inp, int error) { struct tcpcb *tp = intotcpcb(inp); if ((tp != NULL) && (tp->t_state == TCPS_SYN_SENT)) - tcp_drop(tp, errno); + tcp_drop(tp, error); } /* diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 224b9fbc0b..737b7a379a 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_pcb.c,v 1.10.2.9 2003/01/24 05:11:35 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_pcb.c,v 1.31 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_pcb.c,v 1.32 2006/12/05 23:31:57 dillon Exp $ */ /* $KAME: in6_pcb.c,v 1.31 2001/05/21 05:45:10 jinmei Exp $ */ /* @@ -962,7 +962,7 @@ in6_losing(struct inpcb *in6p) * and allocate a (hopefully) better one. */ void -in6_rtchange(struct inpcb *inp, int errno) +in6_rtchange(struct inpcb *inp, int error) { if (inp->in6p_route.ro_rt) { rtfree(inp->in6p_route.ro_rt); diff --git a/sys/netproto/atm/atm_aal5.c b/sys/netproto/atm/atm_aal5.c index 6b24ce171b..12695cd0a6 100644 --- a/sys/netproto/atm/atm_aal5.c +++ b/sys/netproto/atm/atm_aal5.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/atm_aal5.c,v 1.6 1999/10/09 23:24:59 green Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/atm_aal5.c,v 1.10 2006/01/14 13:36:39 swildner Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/atm_aal5.c,v 1.11 2006/12/05 23:31:57 dillon Exp $ */ /* @@ -202,8 +202,8 @@ static Atm_attributes atm_aal5_defattr = { return (err); \ ; -#define ATM_RETERR(errno) { \ - err = errno; \ +#define ATM_RETERR(error) { \ + err = error; \ goto out; \ } @@ -218,7 +218,7 @@ static Atm_attributes atm_aal5_defattr = { * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -261,7 +261,7 @@ out: * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -285,7 +285,7 @@ atm_aal5_detach(struct socket *so) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -308,7 +308,7 @@ atm_aal5_bind(struct socket *so, struct sockaddr *addr, struct thread *td) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -332,7 +332,7 @@ atm_aal5_listen(struct socket *so, struct thread *td) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -378,7 +378,7 @@ atm_aal5_connect(struct socket *so, struct sockaddr *addr, thread_t td) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -404,7 +404,7 @@ atm_aal5_accept(struct socket *so, struct sockaddr **addr) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -426,7 +426,7 @@ atm_aal5_disconnect(struct socket *so) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -453,7 +453,7 @@ atm_aal5_shutdown(struct socket *so) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -517,7 +517,7 @@ out: * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -544,7 +544,7 @@ atm_aal5_abort(struct socket *so) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -575,7 +575,7 @@ atm_aal5_control( * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -601,7 +601,7 @@ atm_aal5_sense(struct socket *so, struct stat *st) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -624,7 +624,7 @@ atm_aal5_sockaddr(struct socket *so, struct sockaddr **addr) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ static int @@ -659,7 +659,7 @@ atm_aal5_peeraddr(struct socket *so, struct sockaddr **addr) * * Returns: * 0 call is accepted - * errno call rejected - reason indicated + * error call rejected - reason indicated * */ static int @@ -750,7 +750,7 @@ atm_aal5_cpcs_data(void *tok, KBuffer *m) * * Returns: * 0 request processed - * errno error processing request - reason indicated + * error error processing request - reason indicated * */ int diff --git a/sys/netproto/ipx/ipx_pcb.c b/sys/netproto/ipx/ipx_pcb.c index e4d7d11a85..e5c65f266a 100644 --- a/sys/netproto/ipx/ipx_pcb.c +++ b/sys/netproto/ipx/ipx_pcb.c @@ -34,7 +34,7 @@ * @(#)ipx_pcb.c * * $FreeBSD: src/sys/netipx/ipx_pcb.c,v 1.18.2.1 2001/02/22 09:44:18 bp Exp $ - * $DragonFly: src/sys/netproto/ipx/ipx_pcb.c,v 1.12 2006/01/14 13:36:40 swildner Exp $ + * $DragonFly: src/sys/netproto/ipx/ipx_pcb.c,v 1.13 2006/12/05 23:31:57 dillon Exp $ */ #include @@ -302,7 +302,7 @@ ipx_setpeeraddr(struct ipxpcb *ipxp, struct sockaddr **nam) * be a parameter list!) */ void -ipx_pcbnotify(struct ipx_addr *dst, int errno, +ipx_pcbnotify(struct ipx_addr *dst, int error, void (*notify)(struct ipxpcb *), long param) { struct ipxpcb *ipxp, *oinp; @@ -317,8 +317,8 @@ ipx_pcbnotify(struct ipx_addr *dst, int errno, } if (ipxp->ipxp_socket == 0) goto next; - if (errno) - ipxp->ipxp_socket->so_error = errno; + if (error) + ipxp->ipxp_socket->so_error = error; oinp = ipxp; ipxp = ipxp->ipxp_next; oinp->ipxp_notify_param = param; diff --git a/sys/netproto/ns/spp_usrreq.c b/sys/netproto/ns/spp_usrreq.c index 28040470ac..5ce83f4a69 100644 --- a/sys/netproto/ns/spp_usrreq.c +++ b/sys/netproto/ns/spp_usrreq.c @@ -32,7 +32,7 @@ * * @(#)spp_usrreq.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netns/spp_usrreq.c,v 1.11 1999/08/28 00:49:53 peter Exp $ - * $DragonFly: src/sys/netproto/ns/spp_usrreq.c,v 1.18 2006/09/05 00:55:49 dillon Exp $ + * $DragonFly: src/sys/netproto/ns/spp_usrreq.c,v 1.19 2006/12/05 23:31:57 dillon Exp $ */ #include @@ -1719,7 +1719,7 @@ spp_disconnect(struct sppcb *cb) * the specified error. */ struct sppcb * -spp_drop(struct sppcb *cb, int errno) +spp_drop(struct sppcb *cb, int error) { struct socket *so = cb->s_nspcb->nsp_socket; @@ -1734,7 +1734,7 @@ spp_drop(struct sppcb *cb, int errno) /*tcp_output(cb);*/ } else sppstat.spps_conndrops++; - so->so_error = errno; + so->so_error = error; return (spp_close(cb)); } diff --git a/sys/platform/pc32/apm/apm.c b/sys/platform/pc32/apm/apm.c index 9532dbd297..c8629b81cd 100644 --- a/sys/platform/pc32/apm/apm.c +++ b/sys/platform/pc32/apm/apm.c @@ -16,7 +16,7 @@ * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * * $FreeBSD: src/sys/i386/apm/apm.c,v 1.114.2.5 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/apm/apm.c,v 1.19 2006/11/07 06:43:24 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/apm/apm.c,v 1.20 2006/12/05 23:31:57 dillon Exp $ */ #include @@ -117,7 +117,7 @@ static int apm_bioscall(void) { struct apm_softc *sc = &apm_softc; - int errno = 0; + int error = 0; u_int apm_func = sc->bios.r.eax & 0xff; if (!apm_check_function_supported(sc->intversion, apm_func)) { @@ -130,13 +130,13 @@ apm_bioscall(void) if (sc->connectmode == APM_PROT32CONNECT) { set_bios_selectors(&sc->bios.seg, BIOSCODE_FLAG | BIOSDATA_FLAG); - errno = bios32(&sc->bios.r, + error = bios32(&sc->bios.r, sc->bios.entry, GSEL(GBIOSCODE32_SEL, SEL_KPL)); } else { - errno = bios16(&sc->bios, NULL); + error = bios16(&sc->bios, NULL); } sc->bios_busy = 0; - return (errno); + return (error); } /* check whether APM function is supported (1) or not (0). */ -- 2.41.0