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

VxWorks

开发平台:

C/C++

  1. /* usrNtPassFs.c - VxSim pass-through filesystem initialization */
  2. /* Copyright 2001-2002 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01b,05apr02,hbh  Completed fix for SPR# 30368.
  7. 01a,07sep01,hbh  written based on usrPassFs.c file. Fixed SPR 30368.   
  8. */
  9. /*
  10. DESCRIPTION
  11. User configurable pass-thorough filesystem intialization for VxSim.
  12. */
  13. /******************************************************************************
  14. *
  15. * usrNtPassFsInit - initialize pass-through filesystem
  16. */ 
  17. STATUS usrNtPassFsInit (void)
  18.     {
  19.     IMPORT STATUS ntPassFsInit ();
  20.     IMPORT void * ntPassFsDevInit ();
  21.     IMPORT char fullExePath[];
  22.     char passName [MAX_FILENAME_LENGTH];
  23.     char * defPathEnd;
  24.     if (ntPassFsInit (1) != OK)
  25. return (ERROR);
  26.     if (ntPassFsDevInit ("host:") == NULL)
  27. {
  28. printf ("ntPassFsDevInit failedn");
  29. return (ERROR);
  30. }
  31.     sprintf (passName, "host:%s", fullExePath);
  32.     /* Remove bootFile name at the end of the string */
  33.     defPathEnd = strrchr (passName, '/');
  34.     if (defPathEnd != NULL)
  35.      *defPathEnd = '';
  36.     ioDefPathSet (passName);
  37.     return (OK);
  38.     }