home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 May / pcp151c.iso / misc / src / install / modutils / util / sys_qm.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-06  |  1.7 KB  |  51 lines

  1. /* Functions for the Linux module syscall interface.
  2.    Copyright 1996, 1997 Linux International.
  3.    Contributed by Richard Henderson <rth@tamu.edu>
  4.  
  5.    This file is part of the Linux modutils.
  6.  
  7.    This program is free software; you can redistribute it and/or modify it
  8.    under the terms of the GNU General Public License as published by the
  9.    Free Software Foundation; either version 2 of the License, or (at your
  10.    option) any later version.
  11.  
  12.    This program is distributed in the hope that it will be useful, but
  13.    WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.    General Public License for more details.
  16.  
  17.    You should have received a copy of the GNU General Public License
  18.    along with this program; if not, write to the Free Software Foundation,
  19.    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
  20.  
  21. #ident "$Id: sys_qm.c,v 1.1.1.1 1998/01/06 20:51:08 ewt Exp $"
  22.  
  23. #include <stdlib.h>
  24. #include <errno.h>
  25.  
  26. #include "module.h"
  27.  
  28. /* Kernel headers before 2.1.mumble need this on the Alpha to get
  29.    _syscall* defined.  */
  30. #define __LIBRARY__
  31.  
  32. #include <asm/unistd.h>
  33.  
  34.  
  35. /*======================================================================*/
  36.  
  37. /* I am fucking tired of the "this doesn't build on 2.0.x" questions.
  38.    But if you ask, we still officially require 2.1.x to build.  */
  39. #if !defined(__NR_query_module)
  40. # if defined(__i386__)
  41. #  define __NR_query_module 167
  42. # elif defined(__alpha__)
  43. #  define __NR_query_module 347
  44. # elif defined(__sparc__)
  45. #  define __NR_query_module 184
  46. # endif
  47. #endif
  48.  
  49. _syscall5(int, query_module, const char *, name, int, which,
  50.       void *, buf, size_t, bufsize, size_t *, ret);
  51.