platform/unix.c
changeset 677 c8e2615d6173
parent 657 dad3b5c307a9
child 678 73a2641375a0
equal deleted inserted replaced
676:be1460fff07f 677:c8e2615d6173
   168     int prefixLen = strlen(devPrefix);
   168     int prefixLen = strlen(devPrefix);
   169     mach_port_t masterPort = 0;
   169     mach_port_t masterPort = 0;
   170     struct statfs *mntbufp;
   170     struct statfs *mntbufp;
   171     int i, mounts;
   171     int i, mounts;
   172 
   172 
   173     retval[0] = NULL;
       
   174 
       
   175     if (IOMasterPort(MACH_PORT_NULL, &masterPort) != KERN_SUCCESS)
   173     if (IOMasterPort(MACH_PORT_NULL, &masterPort) != KERN_SUCCESS)
   176         return(retval);
   174         BAIL_MACRO(ERR_OS_ERROR, /*return void*/);
   177 
   175 
   178     mounts = getmntinfo(&mntbufp, MNT_WAIT);  /* NOT THREAD SAFE! */
   176     mounts = getmntinfo(&mntbufp, MNT_WAIT);  /* NOT THREAD SAFE! */
   179     for (i = 0; i < mounts; i++)
   177     for (i = 0; i < mounts; i++)
   180     {
   178     {
   181         char *dev = mntbufp[i].f_mntfromname;
   179         char *dev = mntbufp[i].f_mntfromname;