From 7089081d49a8d4f993c9821fefef5a0354aad48e Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 5 Jul 2007 08:53:21 +0000 Subject: [PATCH] Fix a build breakage as result of disabling parts of I4B. Check for (temporary gone) kernel options to be defined before using them. Reported by: peter Approved by: re (rwatson) --- sys/i4b/layer4/i4b_i4bdrv.c | 10 +++++----- sys/i4b/layer4/i4b_l4.c | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c index 4a53c7014096..e00ac25fd044 100644 --- a/sys/i4b/layer4/i4b_i4bdrv.c +++ b/sys/i4b/layer4/i4b_i4bdrv.c @@ -423,19 +423,19 @@ i4bioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td switch(mdrsp->driver) { -#if NI4BIPR > 0 +#if defined(NI4BIPR) && (NI4BIPR > 0) case BDRV_IPR: dlt = ipr_ret_linktab(mdrsp->driver_unit); break; #endif -#if NI4BISPPP > 0 +#if defined(NI4BISPPP) && (NI4BISPPP > 0) case BDRV_ISPPP: dlt = i4bisppp_ret_linktab(mdrsp->driver_unit); break; #endif -#if NI4BTEL > 0 +#if defined(NI4BTEL) && (NI4BTEL > 0) case BDRV_TEL: dlt = tel_ret_linktab(mdrsp->driver_unit); break; @@ -447,7 +447,7 @@ i4bioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td break; #endif -#if NI4BING > 0 +#if defined(NI4BING) && (NI4BING > 0) case BDRV_ING: dlt = ing_ret_linktab(mdrsp->driver_unit); break; @@ -543,7 +543,7 @@ i4bioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td mui = (msg_updown_ind_t *)data; -#if NI4BIPR > 0 +#if defined(NI4BIPR) && (NI4BIPR > 0) if(mui->driver == BDRV_IPR) { drvr_link_t *dlt; diff --git a/sys/i4b/layer4/i4b_l4.c b/sys/i4b/layer4/i4b_l4.c index 9cdd3e1c5d32..4da56c35333d 100644 --- a/sys/i4b/layer4/i4b_l4.c +++ b/sys/i4b/layer4/i4b_l4.c @@ -63,7 +63,7 @@ static void i4b_l4_setup_timeout_fix_unit(call_desc_t *cd); static void i4b_l4_setup_timeout_var_unit(call_desc_t *cd); static time_t i4b_get_idletime(call_desc_t *cd); -#if NI4BISPPP > 0 +#if defined(NI4BISPPP) && (NI4BISPPP > 0) extern time_t i4bisppp_idletime(int); #endif @@ -621,25 +621,25 @@ i4b_link_bchandrvr(call_desc_t *cd) switch(cd->driver) { -#if NI4BRBCH > 0 +#if defined(NI4BRBCH) && (NI4BRBCH > 0) case BDRV_RBCH: cd->dlt = rbch_ret_linktab(cd->driver_unit); break; #endif -#if NI4BTEL > 0 +#if defined(NI4BTEL) && (NI4BTEL > 0) case BDRV_TEL: cd->dlt = tel_ret_linktab(cd->driver_unit); break; #endif -#if NI4BIPR > 0 +#if defined(NI4BIPR) && (NI4BIPR > 0) case BDRV_IPR: cd->dlt = ipr_ret_linktab(cd->driver_unit); break; #endif -#if NI4BISPPP > 0 +#if defined(NI4BISPPP) && (NI4BISPPP > 0) case BDRV_ISPPP: cd->dlt = i4bisppp_ret_linktab(cd->driver_unit); break; @@ -651,7 +651,7 @@ i4b_link_bchandrvr(call_desc_t *cd) break; #endif -#if NI4BING > 0 +#if defined(NI4BING) && (NI4BING > 0) case BDRV_ING: cd->dlt = ing_ret_linktab(cd->driver_unit); break; @@ -675,25 +675,25 @@ i4b_link_bchandrvr(call_desc_t *cd) switch(cd->driver) { -#if NI4BRBCH > 0 +#if defined(NI4BRBCH) && (NI4BRBCH > 0) case BDRV_RBCH: rbch_set_linktab(cd->driver_unit, cd->ilt); break; #endif -#if NI4BTEL > 0 +#if defined(NI4BTEL) && (NI4BTEL > 0) case BDRV_TEL: tel_set_linktab(cd->driver_unit, cd->ilt); break; #endif -#if NI4BIPR > 0 +#if defined(NI4BIPR) && (NI4BIPR > 0) case BDRV_IPR: ipr_set_linktab(cd->driver_unit, cd->ilt); break; #endif -#if NI4BISPPP > 0 +#if defined(NI4BISPPP) && (NI4BISPPP > 0) case BDRV_ISPPP: i4bisppp_set_linktab(cd->driver_unit, cd->ilt); break; @@ -705,7 +705,7 @@ i4b_link_bchandrvr(call_desc_t *cd) break; #endif -#if NI4BING > 0 +#if defined(NI4BING) && (NI4BING > 0) case BDRV_ING: ing_set_linktab(cd->driver_unit, cd->ilt); break; @@ -794,7 +794,7 @@ static time_t i4b_get_idletime(call_desc_t *cd) { switch (cd->driver) { -#if NI4BISPPP > 0 +#if defined(NI4BISPPP) && (NI4BISPPP > 0) case BDRV_ISPPP: return i4bisppp_idletime(cd->driver_unit); break;