Changeset 18046


Ignore:
Timestamp:
Nov 29, 2001, 2:38:51 PM (23 years ago)
Author:
sandervl
Message:

disk fix

Location:
tags/trunk/src/kernel32
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/kernel32/HandleManager.cpp

    r18033 r18046  
    1 /* $Id: HandleManager.cpp,v 1.80 2001-11-29 00:20:45 phaller Exp $ */
     1/* $Id: HandleManager.cpp,v 1.81 2001-11-29 13:38:49 sandervl Exp $ */
    22
    33/*
     
    11021102  if (rc != NO_ERROR)     /* oops, creation failed within the device handler */
    11031103  {
    1104     TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
    1105    
     1104    TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE; 
    11061105   
    11071106    // Note:
     
    11201119           sizeof(HMHANDLEDATA));
    11211120  }
    1122 
    1123 
    1124 #ifdef DEBUG_LOCAL
    1125   dprintf(("KERNEL32/HandleManager: CreateFile(%s)=%08xh\n",
    1126            lpFileName,
    1127            iIndexNew));
    1128 #endif
    11291121
    11301122  return (HFILE)iIndexNew;                             /* return valid handle */
  • TabularUnified tags/trunk/src/kernel32/hmcomm.cpp

    r18033 r18046  
    1 /* $Id: hmcomm.cpp,v 1.20 2001-11-29 00:20:47 phaller Exp $ */
     1/* $Id: hmcomm.cpp,v 1.21 2001-11-29 13:38:50 sandervl Exp $ */
    22
    33/*
     
    221221    {
    222222      delete pHMHandleData->lpHandlerData;
    223       return error2WinError(rc);
     223      return rc;
    224224    }
    225225    rc = SetBaud(pHMHandleData,9600);
     
    13411341                             0,0,0,
    13421342                             0,0,0);
     1343      dprintf(("SETXOFF: rc = %d", rc));
    13431344      break;
    13441345    case SETXON:
     
    13481349                             0,0,0,
    13491350                             0,0,0);
     1351      dprintf(("SETXON: rc = %d", rc));
    13501352      break;
    13511353    default:
  • TabularUnified tags/trunk/src/kernel32/hmdisk.cpp

    r18031 r18046  
    1 /* $Id: hmdisk.cpp,v 1.30 2001-11-28 23:33:36 phaller Exp $ */
     1/* $Id: hmdisk.cpp,v 1.31 2001-11-29 13:38:51 sandervl Exp $ */
    22
    33/*
     
    6767BOOL HMDeviceDiskClass::FindDevice(LPCSTR lpClassDevName, LPCSTR lpDeviceName, int namelength)
    6868{
    69   // @@@PH
    70   // this is broken:
    71   // "\\.\C:" and "C:" is a LOGICAL drive
    72   // \\.\PHYSICALDRIVEx is a PHYSICAL drive!
    73  
    7469    //\\.\x:                -> length 6
    7570    //\\.\PHYSICALDRIVEn    -> length 18
     
    114109        return ERROR_INVALID_PARAMETER;
    115110    }
     111    if(strncmp(lpFileName,       // "support" for local unc names
     112             "\\\\.\\",
     113             4) == 0)
     114    {
     115        lpFileName+=4;
     116    }
    116117
    117118    //Disable error popus. NT allows an app to open a cdrom/dvd drive without a disk inside
     
    205206    filename[2] = 0;
    206207
    207     //Disable error popups. NT allows an app to open a cdrom/dvd drive without a disk inside
     208    //Disable error popus. NT allows an app to open a cdrom/dvd drive without a disk inside
    208209    //OS/2 fails in that case with error ERROR_NOT_READY
    209210    ULONG oldmode = SetErrorMode(SEM_FAILCRITICALERRORS);
  • TabularUnified tags/trunk/src/kernel32/hmmailslot.cpp

    r18031 r18046  
    1 /* $Id: hmmailslot.cpp,v 1.4 2001-11-28 23:33:36 phaller Exp $
     1/* $Id: hmmailslot.cpp,v 1.5 2001-11-29 13:38:51 sandervl Exp $
    22 *
    33 * Win32 mailslot APIs
     
    190190
    191191  char *pipename = (char *)alloca(strlen(lpFileName)+16);
    192   if(pipename == NULL)
    193   {
    194     DebugInt3();
    195     return ERROR_NOT_ENOUGH_MEMORY;
     192  if(pipename == NULL) {
     193      DebugInt3();
     194      SetLastError(ERROR_NOT_ENOUGH_MEMORY);
     195      return FALSE;
    196196  }
    197197  strcpy(pipename, "\\\\.\\pipe\\");
     
    215215  //todo: lookup name and fail if exists
    216216  mailslot = new HMMailSlotInfo(lpFileName, hPipe, -1, 0, FALSE, (LPSECURITY_ATTRIBUTES)lpSecurityAttributes);
    217   if(mailslot == NULL)
    218   {
    219     DebugInt3();
    220     return ERROR_NOT_ENOUGH_MEMORY;
     217  if(mailslot == NULL) {
     218      DebugInt3();
     219      return ERROR_NOT_ENOUGH_MEMORY;
    221220  }
    222221  pHMHandleData->dwUserData = (DWORD)mailslot;
  • TabularUnified tags/trunk/src/kernel32/hmnpipe.cpp

    r18031 r18046  
    1 /* $Id: hmnpipe.cpp,v 1.5 2001-11-28 23:33:37 phaller Exp $ */
     1/* $Id: hmnpipe.cpp,v 1.6 2001-11-29 13:38:51 sandervl Exp $ */
    22/*
    33 * Project Odin Software License can be found in LICENSE.TXT
     
    140140                                               pHMHandleData->dwCreation,
    141141                                               pHMHandleData->dwFlags);
    142   if(pHMHandleData->hHMHandle == -1)
    143   {
    144     return GetLastError();
    145   }
    146   return ERROR_SUCCESS;
     142   if(pHMHandleData->hHMHandle == -1) {
     143      return GetLastError();
     144   }
     145   return ERROR_SUCCESS;
    147146}
    148147
  • TabularUnified tags/trunk/src/kernel32/oslibdos.cpp

    r18039 r18046  
    1 /* $Id: oslibdos.cpp,v 1.87 2001-11-29 10:53:28 phaller Exp $ */
     1/* $Id: oslibdos.cpp,v 1.88 2001-11-29 13:38:51 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    26842684    DosFreeMem(pTiledData);
    26852685 
    2686   SetLastError(error2WinError(rc, ERROR_INVALID_HANDLE));
     2686  rc = error2WinError(rc, ERROR_INVALID_HANDLE);
     2687  SetLastError(rc);
    26872688  return (DWORD)rc;
    26882689}
Note: See TracChangeset for help on using the changeset viewer.