VirtualBox

Changeset 2703 in kBuild


Ignore:
Timestamp:
Nov 21, 2013 12:26:35 AM (11 years ago)
Author:
bird
Message:

NDEBUG and other adjustments.

Location:
trunk/src/lib/nt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/nt/nthlpcore.c

    r2702 r2703  
    3434#include <errno.h>
    3535#include "nthlp.h"
    36 #if 1
     36#ifndef NDEBUG
    3737# include <stdio.h>
    3838#endif
     
    223223            return EEXIST;
    224224        /* EXDEV            = 18 */
     225        case STATUS_NOT_SAME_DEVICE:
     226            return EXDEV;
    225227        /* ENODEV           = 19 */
    226228        /* ENOTDIR          = 20 */
     
    344346    }
    345347
    346 #if 1
     348#ifndef NDEBUG
    347349    __debugbreak();
    348350    fprintf(stderr, "rcNt=%#x (%d)\n", rcNt, rcNt);
     
    410412        case ERROR_TOO_MANY_LINKS:          errno = EMLINK; break;
    411413#endif
     414
     415        case ERROR_SHARING_VIOLATION:
     416            errno = ETXTBSY;
     417            break;
    412418    }
    413419
  • trunk/src/lib/nt/nthlpfs.c

    r2702 r2703  
    168168        case FILE_OVERWRITE_IF:     fW32Disp = CREATE_ALWAYS; break;
    169169        default:
     170# ifndef NDEBUG
    170171            __debugbreak();
     172# endif
    171173            return INVALID_HANDLE_VALUE;
    172174    }
     
    195197    birdSetErrnoFromWin32(dwErr);
    196198
    197 #else
     199#else  /* !BIRD_USE_WIN32 */
     200
    198201    /*
    199202     * Call the NT API directly.
     
    230233    }
    231234
    232 #endif
     235#endif /* !BIRD_USE_WIN32 */
    233236    return INVALID_HANDLE_VALUE;
    234237}
  • trunk/src/lib/nt/ntstat.c

    r2702 r2703  
    358358
    359359        /* On things like pagefile.sys we may get sharing violation. */
    360         if (GetLastError() == ERROR_SHARING_VIOLATION)
     360        if (errno == ETXTBSY)
    361361        {
    362362            /** @todo Fall back on the parent directory enum if we run into a sharing
     
    365365        rc = -1;
    366366    }
    367 
    368 #if 1
    369     if (strchr(pszPath, ';'))
    370         __debugbreak();
    371 #endif
    372367
    373368    return rc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette