RS: Make PCI code optional

This commit is contained in:
Arun Thomas 2012-08-16 23:32:33 +02:00
parent a57a591f25
commit c78b56a9e5
3 changed files with 12 additions and 2 deletions

View file

@ -1,7 +1,13 @@
.include <bsd.own.mk>
# 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

View file

@ -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);

View file

@ -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