From d772ef1541c4f5a98b47dae89ef4606f31d841f1 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 4 Jan 2003 11:04:39 +0000 Subject: [PATCH] Removed syscall. --- ChangeLog | 5 +++++ lib/access.c | 7 +------ lib/configure | 6 ------ lib/pci.h | 24 ++++++++++++----------- lib/syscalls.c | 53 -------------------------------------------------- 5 files changed, 19 insertions(+), 76 deletions(-) delete mode 100644 lib/syscalls.c diff --git a/ChangeLog b/ChangeLog index d7a2e4d..b2a1d2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-01-04 Martin Mares + + * lib: Removed partially implemented "syscall" access method which will + probably never be needed. + 2002-12-27 Martin Mares * lib/nbsd-libpci.c: Cleaned up and hopefully made it endian safe. diff --git a/lib/access.c b/lib/access.c index 6d992b6..5121a46 100644 --- a/lib/access.c +++ b/lib/access.c @@ -1,5 +1,5 @@ /* - * $Id: access.c,v 1.9 2002/12/26 19:28:33 mj Exp $ + * $Id: access.c,v 1.10 2003/01/04 11:04:39 mj Exp $ * * The PCI Library -- User Access * @@ -22,11 +22,6 @@ static struct pci_methods *pci_methods[PCI_ACCESS_MAX] = { #else NULL, #endif -#ifdef HAVE_PM_SYSCALLS - &pm_syscalls, -#else - NULL, -#endif #ifdef HAVE_PM_INTEL_CONF &pm_intel_conf1, &pm_intel_conf2, diff --git a/lib/configure b/lib/configure index f58c223..74284bb 100755 --- a/lib/configure +++ b/lib/configure @@ -46,15 +46,9 @@ case $sys in ok=1 ;; alpha|ia64) echo >>$c '#define HAVE_64BIT_ADDRESS' -# echo_n " syscalls" -# echo >>$c '#define HAVE_PM_SYSCALLS' -# ok=1 ;; sparc|sparc64) echo >>$c '#define HAVE_64BIT_ADDRESS' echo >>$c '#define HAVE_LONG_ADDRESS' -# echo_n " syscalls" -# echo >>$c '#define HAVE_PM_SYSCALLS' -# ok=1 ;; esac ;; diff --git a/lib/pci.h b/lib/pci.h index 560e720..0086792 100644 --- a/lib/pci.h +++ b/lib/pci.h @@ -1,5 +1,5 @@ /* - * $Id: pci.h,v 1.11 2002/12/26 20:24:32 mj Exp $ + * $Id: pci.h,v 1.12 2003/01/04 11:04:39 mj Exp $ * * The PCI Library * @@ -71,16 +71,18 @@ typedef unsigned long pciaddr_t; struct pci_methods; struct nl_entry; -#define PCI_ACCESS_AUTO 0 /* Autodetection (params: none) */ -#define PCI_ACCESS_PROC_BUS_PCI 1 /* Linux /proc/bus/pci (params: path) */ -#define PCI_ACCESS_SYSCALLS 2 /* pciconfig_read() syscalls (params: none) */ -#define PCI_ACCESS_I386_TYPE1 3 /* i386 ports, type 1 (params: none) */ -#define PCI_ACCESS_I386_TYPE2 4 /* i386 ports, type 2 (params: none) */ -#define PCI_ACCESS_FBSD_DEVICE 5 /* FreeBSD /dev/pci (params: path) */ -#define PCI_ACCESS_AIX_DEVICE 6 /* /dev/pci0, /dev/bus0, etc. */ -#define PCI_ACCESS_NBSD_LIBPCI 7 -#define PCI_ACCESS_DUMP 8 /* Dump file (params: filename) */ -#define PCI_ACCESS_MAX 9 +enum pci_access_type { + /* Known access methods, remember to update access.c as well */ + PCI_ACCESS_AUTO, /* Autodetection (params: none) */ + PCI_ACCESS_PROC_BUS_PCI, /* Linux /proc/bus/pci (params: path) */ + PCI_ACCESS_I386_TYPE1, /* i386 ports, type 1 (params: none) */ + PCI_ACCESS_I386_TYPE2, /* i386 ports, type 2 (params: none) */ + PCI_ACCESS_FBSD_DEVICE, /* FreeBSD /dev/pci (params: path) */ + PCI_ACCESS_AIX_DEVICE, /* /dev/pci0, /dev/bus0, etc. */ + PCI_ACCESS_NBSD_LIBPCI, /* NetBSD libpci */ + PCI_ACCESS_DUMP, /* Dump file (params: filename) */ + PCI_ACCESS_MAX +}; struct pci_access { /* Options you can change: */ diff --git a/lib/syscalls.c b/lib/syscalls.c deleted file mode 100644 index 3b3ef42..0000000 --- a/lib/syscalls.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * $Id: syscalls.c,v 1.2 2002/03/30 15:39:25 mj Exp $ - * - * The PCI Library -- Configuration Access via Syscalls - * - * Copyright (c) 1997--1999 Martin Mares - * - * Can be freely distributed and used under the terms of the GNU GPL. - */ - -#include "internal.h" - -static int -sysc_detect(struct pci_access *a) -{ - return 0; -} - -static void -sysc_init(struct pci_access *a) -{ -} - -static void -sysc_cleanup(struct pci_access *a) -{ -} - -static int -sysc_read(struct pci_dev *d, int pos, byte *buf, int len) -{ - return 0; -} - -static int -sysc_write(struct pci_dev *d, int pos, byte *buf, int len) -{ - return 0; -} - -struct pci_methods pm_syscalls = { - "syscalls", - NULL, /* config */ - sysc_detect, - sysc_init, - sysc_cleanup, - pci_generic_scan, - pci_generic_fill_info, - sysc_read, - sysc_write, - NULL, /* init_dev */ - NULL /* cleanup_dev */ -}; -- 2.39.2