VirtualBox

Changeset 16807 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Feb 17, 2009 1:28:22 AM (16 years ago)
Author:
vboxsync
Message:

RTErrConvertToErrno: VERR_PATH_NOT_FOUND -> ENOTDIR like RTErrConvertFromErrno does, not ENOENT. Iff this was done intentionally, then let me know!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/err/RTErrConvertToErrno.cpp

    r14262 r16807  
    5555     * Process error codes.
    5656     *
    57      * Try to reverse the behaviour of RTErrConvertFromErrno as far
    58      * as possible.
     57     * (Use a switch and not a table since the numbers vary among compilers
     58     * and OSes. So we let the compiler switch optimizer handle speed issues.)
    5959     *
    60      * @note I am very impressed by the length of some of these
    61      *       error codes - we have obviously learnt something from
    62      *       Unix's failings :)
     60     * This switch is arranged like the Linux i386 errno.h! It also mirrors the
     61     * conversions performed by RTErrConvertFromErrno with a few extra case since
     62     * there are far more IPRT status codes than Unix ones.
    6363     */
    6464    switch (iErr)
     
    9292#endif
    9393#ifdef ECHILD
    94         //case VERR_PROCESS_NOT_FOUND:                return ECHILD;
     94        case VERR_PROCESS_NOT_FOUND:                return ECHILD;
    9595#endif
    9696#ifdef EAGAIN
     
    122122#endif
    123123#ifdef ENOTDIR
    124         case VERR_PATH_NOT_FOUND:                   return ENOENT;
     124        case VERR_NOT_A_DIRECTORY:
     125        case VERR_PATH_NOT_FOUND:                   return ENOTDIR;
    125126#endif
    126127#ifdef EISDIR
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