From: Arun Thomas Date: Thu, 16 Aug 2012 21:32:33 +0000 (+0200) Subject: RS: Make PCI code optional X-Git-Tag: v3.2.1~366 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.named-checkzone.html?a=commitdiff_plain;h=c78b56a9e58488a00d69d2cadb499769723b310f;p=minix.git RS: Make PCI code optional --- diff --git a/servers/rs/Makefile b/servers/rs/Makefile index c26da0887..7c41b2ee3 100644 --- a/servers/rs/Makefile +++ b/servers/rs/Makefile @@ -1,7 +1,13 @@ +.include + # Makefile for Reincarnation Server (RS) PROG= rs SRCS= exec.c main.c request.c manager.c table.c utility.c memory.c error.c +.if ${USE_PCI} != "no" +CPPFLAGS+= -DUSE_PCI +.endif + DPADD+= ${LIBSYS} ${LIBEXEC} LDADD+= -lsys -lexec diff --git a/servers/rs/manager.c b/servers/rs/manager.c index 13ebb4b41..c6ca0f9bd 100644 --- a/servers/rs/manager.c +++ b/servers/rs/manager.c @@ -681,6 +681,7 @@ struct rproc *rp; /* pointer to service slot */ } } +#if USE_PCI /* If PCI properties are set, inform the PCI driver about the new service. */ if(rpub->pci_acl.rsp_nr_device || rpub->pci_acl.rsp_nr_class) { pci_acl = rpub->pci_acl; @@ -692,6 +693,7 @@ struct rproc *rp; /* pointer to service slot */ return kill_service(rp, "pci_set_acl call failed", r); } } +#endif /* USE_PCI */ if (rpub->devman_id != 0) { r = ds_retrieve_label_endpt("devman",&ep); @@ -739,6 +741,7 @@ struct rproc *rp; /* pointer to service slot */ /* No need to inform VFS and VM, cleanup is done on exit automatically. */ +#if USE_PCI /* If PCI properties are set, inform the PCI driver. */ if(rpub->pci_acl.rsp_nr_device || rpub->pci_acl.rsp_nr_class) { r = pci_del_acl(rpub->endpoint); @@ -747,6 +750,7 @@ struct rproc *rp; /* pointer to service slot */ result = r; } } +#endif /* USE_PCI */ if (rpub->devman_id != 0) { r = ds_retrieve_label_endpt("devman",&ep); diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 1f41fc73c..f03fb1f0a 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -749,7 +749,7 @@ _MKVARS.yes= \ #MINIX-specific vars _MKVARS.yes+= \ MKWATCHDOG MKACPI MKAPIC MKMCONTEXT MKDEBUGREG MKSYSDEBUG \ - MKLIVEUPDATE MKSTATECTL MKTRACE MKINSTALLBOOT + MKLIVEUPDATE MKSTATECTL MKTRACE MKINSTALLBOOT MKPCI .for var in ${_MKVARS.yes} ${var}?= yes .endfor @@ -882,7 +882,7 @@ ${var}?= no # .for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP \ USE_WATCHDOG USE_ACPI USE_APIC USE_MCONTEXT USE_DEBUGREG USE_SYSDEBUG \ -USE_LIVEUPDATE USE_STATECTL USE_TRACE +USE_LIVEUPDATE USE_STATECTL USE_TRACE USE_PCI .if (${${var:S/USE_/MK/}} == "no") ${var}:= no .else