VirtualBox

Changeset 76430 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Dec 23, 2018 10:43:51 PM (6 years ago)
Author:
vboxsync
Message:

VBox/shflsvc.h: Use errcore.h rather than err.h. bugref:9344

Location:
trunk/src/VBox/Additions/WINNT/SharedFolders/driver
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/info.c

    r76428 r76430  
    2222#include <iprt/err.h>
    2323
     24
    2425/** Macro for copying a SHFLSTRING file name into a FILE_DIRECTORY_INFORMATION structure. */
    2526#define INIT_FILE_NAME(obj, str) \
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/path.c

    r69500 r76430  
    11/* $Id$ */
    22/** @file
    3  *
    4  * VirtualBox Windows Guest Shared Folders
    5  *
    6  * File System Driver path related routines
     3 * VirtualBox Windows Guest Shared Folders - Path related routines.
    74 */
    85
     
    2017
    2118#include "vbsf.h"
    22 
    23 static UNICODE_STRING UnicodeBackslash = { 2, 4, L"\\" };
     19#include <iprt/err.h>
     20
     21
     22static UNICODE_STRING g_UnicodeBackslash = { 2, 4, L"\\" };
    2423
    2524static NTSTATUS vbsfProcessCreate(PRX_CONTEXT RxContext,
     
    499498        {
    500499            Log(("VBOXSF: MRxCreate: Empty name -> Only backslash used\n"));
    501             RemainingName = &UnicodeBackslash;
     500            RemainingName = &g_UnicodeBackslash;
    502501        }
    503502    }
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsfhlp.c

    r69500 r76430  
    2020
    2121#include "vbsfhlp.h"
     22#include <iprt/err.h>
    2223
    2324#ifdef DEBUG
     
    7273        FileAttributes |= FILE_ATTRIBUTE_ENCRYPTED;
    7374    if (fMode & RTFS_DOS_NT_NORMAL)
    74     {
    7575        FileAttributes |= FILE_ATTRIBUTE_NORMAL;
    76     }
    7776    return FileAttributes;
    7877}
     
    153152    switch (vboxRC)
    154153    {
    155     case VINF_SUCCESS:
    156         Status = STATUS_SUCCESS;
    157         break;
    158 
    159     case VERR_ACCESS_DENIED:
    160         Status = STATUS_ACCESS_DENIED;
    161         break;
    162 
    163     case VERR_NO_MORE_FILES:
    164         Status = STATUS_NO_MORE_FILES;
    165         break;
    166 
    167     case VERR_PATH_NOT_FOUND:
    168         Status = STATUS_OBJECT_PATH_NOT_FOUND;
    169         break;
    170 
    171     case VERR_FILE_NOT_FOUND:
    172         Status = STATUS_OBJECT_NAME_NOT_FOUND;
    173         break;
    174 
    175     case VERR_DIR_NOT_EMPTY:
    176         Status = STATUS_DIRECTORY_NOT_EMPTY;
    177         break;
    178 
    179     case VERR_SHARING_VIOLATION:
    180         Status = STATUS_SHARING_VIOLATION;
    181         break;
    182 
    183     case VERR_FILE_LOCK_VIOLATION:
    184         Status = STATUS_FILE_LOCK_CONFLICT;
    185         break;
    186 
    187     case VERR_FILE_LOCK_FAILED:
    188         Status = STATUS_LOCK_NOT_GRANTED;
    189         break;
    190 
    191     case VINF_BUFFER_OVERFLOW:
    192         Status = STATUS_BUFFER_OVERFLOW;
    193         break;
    194 
    195     case VERR_EOF:
    196     case VINF_EOF:
    197         Status = STATUS_END_OF_FILE;
    198         break;
    199 
    200     case VERR_READ_ERROR:
    201     case VERR_WRITE_ERROR:
    202     case VERR_FILE_IO_ERROR:
    203         Status = STATUS_UNEXPECTED_IO_ERROR;
    204         break;
    205 
    206     case VERR_WRITE_PROTECT:
    207         Status = STATUS_MEDIA_WRITE_PROTECTED;
    208         break;
    209 
    210     case VERR_ALREADY_EXISTS:
    211         Status = STATUS_OBJECT_NAME_COLLISION;
    212         break;
    213 
    214     case VERR_NOT_A_DIRECTORY:
    215         Status = STATUS_NOT_A_DIRECTORY;
    216         break;
    217 
    218     case VERR_SEEK:
    219         Status = STATUS_INVALID_PARAMETER;
    220         break;
    221 
    222     case VERR_INVALID_PARAMETER:
    223         Status = STATUS_INVALID_PARAMETER;
    224         break;
    225 
    226     case VERR_NOT_SUPPORTED:
    227         Status = STATUS_NOT_SUPPORTED;
    228         break;
    229 
    230     default:
    231         /** @todo error handling */
    232         Status = STATUS_INVALID_PARAMETER;
    233         Log(("Unexpected vbox error %Rrc\n",
    234              vboxRC));
    235         break;
     154        case VINF_SUCCESS:
     155            Status = STATUS_SUCCESS;
     156            break;
     157
     158        case VERR_ACCESS_DENIED:
     159            Status = STATUS_ACCESS_DENIED;
     160            break;
     161
     162        case VERR_NO_MORE_FILES:
     163            Status = STATUS_NO_MORE_FILES;
     164            break;
     165
     166        case VERR_PATH_NOT_FOUND:
     167            Status = STATUS_OBJECT_PATH_NOT_FOUND;
     168            break;
     169
     170        case VERR_FILE_NOT_FOUND:
     171            Status = STATUS_OBJECT_NAME_NOT_FOUND;
     172            break;
     173
     174        case VERR_DIR_NOT_EMPTY:
     175            Status = STATUS_DIRECTORY_NOT_EMPTY;
     176            break;
     177
     178        case VERR_SHARING_VIOLATION:
     179            Status = STATUS_SHARING_VIOLATION;
     180            break;
     181
     182        case VERR_FILE_LOCK_VIOLATION:
     183            Status = STATUS_FILE_LOCK_CONFLICT;
     184            break;
     185
     186        case VERR_FILE_LOCK_FAILED:
     187            Status = STATUS_LOCK_NOT_GRANTED;
     188            break;
     189
     190        case VINF_BUFFER_OVERFLOW:
     191            Status = STATUS_BUFFER_OVERFLOW;
     192            break;
     193
     194        case VERR_EOF:
     195        case VINF_EOF:
     196            Status = STATUS_END_OF_FILE;
     197            break;
     198
     199        case VERR_READ_ERROR:
     200        case VERR_WRITE_ERROR:
     201        case VERR_FILE_IO_ERROR:
     202            Status = STATUS_UNEXPECTED_IO_ERROR;
     203            break;
     204
     205        case VERR_WRITE_PROTECT:
     206            Status = STATUS_MEDIA_WRITE_PROTECTED;
     207            break;
     208
     209        case VERR_ALREADY_EXISTS:
     210            Status = STATUS_OBJECT_NAME_COLLISION;
     211            break;
     212
     213        case VERR_NOT_A_DIRECTORY:
     214            Status = STATUS_NOT_A_DIRECTORY;
     215            break;
     216
     217        case VERR_SEEK:
     218            Status = STATUS_INVALID_PARAMETER;
     219            break;
     220
     221        case VERR_INVALID_PARAMETER:
     222            Status = STATUS_INVALID_PARAMETER;
     223            break;
     224
     225        case VERR_NOT_SUPPORTED:
     226            Status = STATUS_NOT_SUPPORTED;
     227            break;
     228
     229        default:
     230            /** @todo error handling */
     231            Status = STATUS_INVALID_PARAMETER;
     232            Log(("Unexpected vbox error %Rrc\n",
     233                 vboxRC));
     234            break;
    236235    }
    237236    return Status;
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