usrNfsd.c
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:1k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* usrNfsd.c - Support for NFS server */
  2. /* Copyright 2001-2002 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01b,20dec01,vvv  allow client and server to be built together 
  7. 01a,06nov01,vvv  written
  8. */
  9. /*
  10. DESCRIPTION
  11. This file is used to include support for the NFS server. The contents of this
  12. file are included in the project configuration file when the component
  13. INCLUDE_NFS_SERVER is defined. This file initializes the variable nfsMaxPath
  14. which uses the configuration parameter NFS_MAXPATH to set the maximum file
  15. path length handled by the server. It also initializes the server by calling
  16. the init routine.
  17. NOMANUAL
  18. */
  19. #ifndef INCLUDE_NFS
  20. const int nfsMaxPath = NFS_MAXPATH + 1;
  21. #endif
  22. /******************************************************************************
  23. *
  24. * usrNfsdInit - initialize NFS server
  25. *
  26. * This routine initializes the NFS server.
  27. *
  28. * RETURNS: OK or ERROR
  29. *
  30. * NOMANUAL
  31. */
  32. STATUS usrNfsdInit (void)
  33.    {
  34.    if (nfsMaxPath < 1)
  35.        {
  36.        printf ("Error initializing NFS server, invalid NFS_MAXPATHn");
  37.        return (ERROR);
  38.        }
  39.    if (nfsdInit (0, 0, 0, 0, 0, 0) == ERROR)
  40.        {
  41.        printf ("Error initializing NFS servern");
  42.        return (ERROR);
  43.        }
  44.    return (OK);
  45.    }