ReactOS 0.4.15-dev-8241-g63935f8
misc.c File Reference
#include "ext2fs.h"
Include dependency graph for misc.c:

Go to the source code of this file.

Functions

ULONG Ext2Log2 (ULONG Value)
 
LARGE_INTEGER Ext2NtTime (IN ULONG i_time)
 
ULONG Ext2LinuxTime (IN LARGE_INTEGER SysTime)
 
ULONG Ext2MbsToUnicode (struct nls_table *PageTable, IN OUT PUNICODE_STRING Unicode, IN PANSI_STRING Mbs)
 
ULONG Ext2UnicodeToMbs (struct nls_table *PageTable, IN OUT PANSI_STRING Mbs, IN PUNICODE_STRING Unicode)
 
ULONG Ext2OEMToUnicodeSize (IN PEXT2_VCB Vcb, IN PANSI_STRING Oem)
 
NTSTATUS Ext2OEMToUnicode (IN PEXT2_VCB Vcb, IN OUT PUNICODE_STRING Unicode, IN POEM_STRING Oem)
 
ULONG Ext2UnicodeToOEMSize (IN PEXT2_VCB Vcb, IN PUNICODE_STRING Unicode)
 
NTSTATUS Ext2UnicodeToOEM (IN PEXT2_VCB Vcb, IN OUT POEM_STRING Oem, IN PUNICODE_STRING Unicode)
 
VOID Ext2Sleep (ULONG ms)
 
int Ext2LinuxError (NTSTATUS Status)
 
NTSTATUS Ext2WinntError (int rc)
 
BOOLEAN Ext2IsDot (PUNICODE_STRING name)
 
BOOLEAN Ext2IsDotDot (PUNICODE_STRING name)
 

Variables

PEXT2_GLOBAL Ext2Global
 

Function Documentation

◆ Ext2IsDot()

BOOLEAN Ext2IsDot ( PUNICODE_STRING  name)

Definition at line 524 of file misc.c.

525{
526 return (name->Length == 2 && name->Buffer[0] == L'.');
527}
#define L(x)
Definition: ntvdm.h:50
Definition: name.c:39

Referenced by Ext2SearchMcbWithoutLock().

◆ Ext2IsDotDot()

BOOLEAN Ext2IsDotDot ( PUNICODE_STRING  name)

Definition at line 529 of file misc.c.

530{
531 return (name->Length == 4 && name->Buffer[0] == L'.' &&
532 name->Buffer[1] == L'.');
533}

Referenced by Ext2SearchMcbWithoutLock().

◆ Ext2LinuxError()

int Ext2LinuxError ( NTSTATUS  Status)

Definition at line 304 of file misc.c.

305{
306 switch (Status) {
308 return (-EACCES);
309
311 return (-EFAULT);
312
314 return (-ETOOSMALL);
315
317 return (-EINVAL);
318
321 return (-EOPNOTSUPP);
322
325 return (-EADDRNOTAVAIL);
326
334 return (-ENETDOWN);
335
339 return (-ENETUNREACH);
340
344 return (-ECONNABORTED);
345
351 return (-ECONNRESET);
352
354 return (-ENOMEM);
355
357 case STATUS_NO_MEMORY:
365 return (-ENOBUFS);
366
368 return (-ENOTCONN);
369
371 return (-ESHUTDOWN);
372
373 case STATUS_TIMEOUT:
376 return (-ETIMEDOUT);
377
380 return (-ECONNREFUSED);
381
383 return (-EHOSTUNREACH);
384
385 case STATUS_CANT_WAIT:
386 case STATUS_PENDING:
387 return (-EAGAIN);
388
390 return (-EIO);
391
392 case STATUS_CANCELLED:
394 return (-EINTR);
395
398 return (-EMSGSIZE);
399
401 return (-EADDRINUSE);
402 }
403
404 if (NT_SUCCESS (Status))
405 return 0;
406
407 return (-EINVAL);
408}
#define EINVAL
Definition: acclib.h:90
#define EFAULT
Definition: acclib.h:86
#define EINTR
Definition: acclib.h:80
#define ENOMEM
Definition: acclib.h:84
#define EIO
Definition: acclib.h:81
#define EACCES
Definition: acclib.h:85
#define EAGAIN
Definition: acclib.h:83
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ETOOSMALL
Definition: errno.h:149
#define ESHUTDOWN
Definition: errno.h:119
#define ENETUNREACH
Definition: errno.h:112
#define ECONNABORTED
Definition: errno.h:114
#define EOPNOTSUPP
Definition: errno.h:104
#define EHOSTUNREACH
Definition: errno.h:124
#define EADDRNOTAVAIL
Definition: errno.h:110
#define ETIMEDOUT
Definition: errno.h:121
#define EADDRINUSE
Definition: errno.h:109
#define ENOBUFS
Definition: errno.h:116
#define ENETDOWN
Definition: errno.h:111
#define ECONNREFUSED
Definition: errno.h:122
#define ECONNRESET
Definition: errno.h:115
#define EMSGSIZE
Definition: errno.h:97
#define ENOTCONN
Definition: errno.h:118
Status
Definition: gdiplustypes.h:25
#define STATUS_TIMEOUT
Definition: ntstatus.h:81
#define STATUS_PIPE_DISCONNECTED
Definition: ntstatus.h:412
#define STATUS_INVALID_ADDRESS
Definition: ntstatus.h:557
#define STATUS_QUOTA_EXCEEDED
Definition: ntstatus.h:304
#define STATUS_NETWORK_UNREACHABLE
Definition: ntstatus.h:704
#define STATUS_CANT_WAIT
Definition: ntstatus.h:452
#define STATUS_PROTOCOL_UNREACHABLE
Definition: ntstatus.h:706
#define STATUS_ADDRESS_ALREADY_EXISTS
Definition: ntstatus.h:654
#define STATUS_INVALID_BUFFER_SIZE
Definition: ntstatus.h:650
#define STATUS_TRANSACTION_ABORTED
Definition: ntstatus.h:659
#define STATUS_HOST_UNREACHABLE
Definition: ntstatus.h:705
#define STATUS_WORKING_SET_QUOTA
Definition: ntstatus.h:397
#define STATUS_REMOTE_DISCONNECT
Definition: ntstatus.h:552
#define STATUS_INVALID_CONNECTION
Definition: ntstatus.h:556
#define STATUS_PORT_UNREACHABLE
Definition: ntstatus.h:707
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_NETWORK_BUSY
Definition: ntstatus.h:427
#define STATUS_INVALID_NETWORK_RESPONSE
Definition: ntstatus.h:431
#define STATUS_CONNECTION_RESET
Definition: ntstatus.h:657
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
#define STATUS_CONNECTION_ABORTED
Definition: ntstatus.h:709
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
#define STATUS_BAD_NETWORK_PATH
Definition: ntstatus.h:426
#define STATUS_CONNECTION_REFUSED
Definition: ntstatus.h:698
#define STATUS_INVALID_ADDRESS_COMPONENT
Definition: ntstatus.h:651
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define STATUS_CONNECTION_DISCONNECTED
Definition: ntstatus.h:656
#define STATUS_LINK_TIMEOUT
Definition: ntstatus.h:555
#define STATUS_CONFLICTING_ADDRESSES
Definition: ntstatus.h:261
#define STATUS_REMOTE_NOT_LISTENING
Definition: ntstatus.h:424
#define STATUS_REMOTE_RESOURCES
Definition: ntstatus.h:553
#define STATUS_LINK_FAILED
Definition: ntstatus.h:554
#define STATUS_UNEXPECTED_NETWORK_ERROR
Definition: ntstatus.h:432
#define STATUS_LOCAL_DISCONNECT
Definition: ntstatus.h:551
#define STATUS_PAGEFILE_QUOTA
Definition: ntstatus.h:244
#define STATUS_TOO_MANY_ADDRESSES
Definition: ntstatus.h:653
#define STATUS_TOO_MANY_PAGING_FILES
Definition: ntstatus.h:387
#define STATUS_COMMITMENT_LIMIT
Definition: ntstatus.h:537
#define STATUS_DEVICE_NOT_READY
Definition: shellext.h:70
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
#define STATUS_OBJECT_PATH_NOT_FOUND
Definition: udferr_usr.h:151
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_IO_TIMEOUT
Definition: udferr_usr.h:163
#define STATUS_NO_SUCH_DEVICE
Definition: udferr_usr.h:136
#define STATUS_REQUEST_ABORTED
Definition: udferr_usr.h:183
#define STATUS_NO_SUCH_FILE
Definition: udferr_usr.h:137
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define STATUS_OBJECT_NAME_NOT_FOUND
Definition: udferr_usr.h:149
#define STATUS_CANCELLED
Definition: udferr_usr.h:170

Referenced by ext3_bread(), and ext4_new_meta_blocks().

◆ Ext2LinuxTime()

ULONG Ext2LinuxTime ( IN LARGE_INTEGER  SysTime)

Definition at line 51 of file misc.c.

52{
53 ULONG Ext2Time = 0;
54
55 if (!RtlTimeToSecondsSince1970(&SysTime, &Ext2Time)) {
59 }
60
61 return Ext2Time;
62}
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
_In_ PLARGE_INTEGER NtTime
Definition: fatprocs.h:1914
BOOLEAN NTAPI RtlTimeToSecondsSince1970(PLARGE_INTEGER Time, PULONG ElapsedSeconds)
uint32_t ULONG
Definition: typedefs.h:59

Referenced by Ext2Cleanup(), Ext2CreateInode(), Ext2DeleteFile(), Ext2FlushFile(), Ext2SetFileInformation(), Ext2SupersedeOrOverWriteFile(), and ext3_current_time().

◆ Ext2Log2()

ULONG Ext2Log2 ( ULONG  Value)

Definition at line 25 of file misc.c.

26{
27 ULONG Order = 0;
28
29 ASSERT(Value > 0);
30
31 while (Value) {
32 Order++;
33 Value >>= 1;
34 }
35
36 return (Order - 1);
37}
#define ASSERT(a)
Definition: mode.c:44
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

Referenced by Ext2InitializeVcb().

◆ Ext2MbsToUnicode()

ULONG Ext2MbsToUnicode ( struct nls_table PageTable,
IN OUT PUNICODE_STRING  Unicode,
IN PANSI_STRING  Mbs 
)

Definition at line 66 of file misc.c.

70{
71 ULONG Length = 0;
72 int i, mbc = 0;
73 WCHAR uc;
74
75 /* Count the length of the resulting Unicode. */
76 for (i = 0; i < Mbs->Length; i += mbc) {
77
78 mbc = PageTable->char2uni(
79 (PUCHAR)&(Mbs->Buffer[i]),
80 Mbs->Length - i,
81 &uc
82 );
83
84 if (mbc <= 0) {
85
86 /* invalid character. */
87 if (mbc == 0 && Length > 0) {
88 break;
89 }
90 return 0;
91 }
92
93 Length += 2;
94 }
95
96 if (Unicode) {
97 if (Unicode->MaximumLength < Length) {
98
99 DbgBreak();
100 return 0;
101 }
102
103 Unicode->Length = 0;
104 mbc = 0;
105
106 for (i = 0; i < Mbs->Length; i += mbc) {
107
108 mbc = PageTable->char2uni(
109 (PUCHAR)&(Mbs->Buffer[i]),
110 Mbs->Length - i,
111 &uc
112 );
113 Unicode->Buffer[Unicode->Length/2] = uc;
114 Unicode->Length += 2;
115 }
116 }
117
118 return Length;
119}
#define DbgBreak()
Definition: ext2fs.h:46
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
static PMEM_HOOK PageTable[TOTAL_PAGES]
Definition: memory.c:43
unsigned char * PUCHAR
Definition: typedefs.h:53
char mbc
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by Ext2OEMToUnicode(), and Ext2OEMToUnicodeSize().

◆ Ext2NtTime()

LARGE_INTEGER Ext2NtTime ( IN ULONG  i_time)

Definition at line 40 of file misc.c.

41{
42 LARGE_INTEGER SysTime;
43
44 SysTime.QuadPart = 0;
45 RtlSecondsSince1970ToTime(i_time, &SysTime);
46
47 return SysTime;
48}
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime(_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by Ext2Cleanup(), Ext2FlushFile(), Ext2InitializeVcb(), Ext2LookupFile(), Ext2ProcessEntry(), Ext2RefreshSuper(), and Ext2SetFileInformation().

◆ Ext2OEMToUnicode()

NTSTATUS Ext2OEMToUnicode ( IN PEXT2_VCB  Vcb,
IN OUT PUNICODE_STRING  Unicode,
IN POEM_STRING  Oem 
)

Definition at line 206 of file misc.c.

211{
213
214
215 if (Vcb->Codepage.PageTable) {
216 Status = Ext2MbsToUnicode(Vcb->Codepage.PageTable,
217 Unicode, Oem);
218
219 if (Status >0 && Status == Unicode->Length) {
221 goto errorout;
222 }
223 }
224
226 Unicode, Oem, FALSE );
227
228 if (!NT_SUCCESS(Status)) {
229 DbgBreak();
230 goto errorout;
231 }
232
233errorout:
234
235 return Status;
236}
LONG NTSTATUS
Definition: precomp.h:26
#define FALSE
Definition: types.h:117
ULONG Ext2MbsToUnicode(struct nls_table *PageTable, IN OUT PUNICODE_STRING Unicode, IN PANSI_STRING Mbs)
Definition: misc.c:66
NTSYSAPI NTSTATUS NTAPI RtlOemStringToUnicodeString(PUNICODE_STRING DestinationString, PCOEM_STRING SourceString, BOOLEAN AllocateDestinationString)
#define Vcb
Definition: cdprocs.h:1415
#define STATUS_SUCCESS
Definition: shellext.h:65

Referenced by Ext2FillEntry(), Ext2FollowLink(), Ext2GetReparsePoint(), Ext2InitializeLabel(), and Ext2QueryDirectory().

◆ Ext2OEMToUnicodeSize()

ULONG Ext2OEMToUnicodeSize ( IN PEXT2_VCB  Vcb,
IN PANSI_STRING  Oem 
)

Definition at line 183 of file misc.c.

187{
188 ULONG Length = 0;
189
190 if (Vcb->Codepage.PageTable) {
191 Length = Ext2MbsToUnicode(Vcb->Codepage.PageTable, NULL, Oem);
192 if (Length > 0) {
193 goto errorout;
194 }
195 }
196
198
199errorout:
200
201 return Length;
202}
#define NULL
Definition: types.h:112
#define RtlOemStringToCountedUnicodeSize(STRING)

Referenced by Ext2FillEntry(), Ext2FollowLink(), Ext2GetReparsePoint(), and Ext2QueryDirectory().

◆ Ext2Sleep()

VOID Ext2Sleep ( ULONG  ms)

Definition at line 297 of file misc.c.

298{
300 Timeout.QuadPart = (LONGLONG)ms*1000*(-10); /* ms/1000 sec*/
302}
#define TRUE
Definition: types.h:120
#define KeDelayExecutionThread(mode, foo, t)
Definition: env_spec_w32.h:484
#define KernelMode
Definition: asm.h:34
static ULONG Timeout
Definition: ping.c:61
int64_t LONGLONG
Definition: typedefs.h:68

Referenced by Ext2AddMcbExtent(), Ext2AddMcbMetaExts(), Ext2AddVcbExtent(), Ext2ExpandBlock(), Ext2ExpandLast(), Ext2GetBlock(), Ext2QueueCloseRequest(), Ext2RemoveMcbExtent(), Ext2RemoveMcbMetaExts(), Ext2RemoveVcbExtent(), Ext2TruncateBlock(), get_block_bh_mdl(), and get_block_bh_pin().

◆ Ext2UnicodeToMbs()

ULONG Ext2UnicodeToMbs ( struct nls_table PageTable,
IN OUT PANSI_STRING  Mbs,
IN PUNICODE_STRING  Unicode 
)

Definition at line 122 of file misc.c.

126{
127 ULONG Length = 0;
128 UCHAR mbs[0x10];
129 int i, mbc;
130
131 /* Count the length of the resulting mbc-8. */
132 for (i = 0; i < (Unicode->Length / 2); i++) {
133
134 RtlZeroMemory(mbs, 0x10);
135 mbc = PageTable->uni2char(
136 Unicode->Buffer[i],
137 mbs,
138 0x10
139 );
140
141 if (mbc <= 0) {
142
143 /* Invalid character. */
144 return 0;
145 }
146
147 Length += mbc;
148 }
149
150 if (Mbs) {
151
152 if (Mbs->MaximumLength < Length) {
153
154 DbgBreak();
155 return 0;
156 }
157
158 Mbs->Length = 0;
159
160 for (i = 0; i < (Unicode->Length / 2); i++) {
161
162 mbc = PageTable->uni2char(
163 Unicode->Buffer[i],
164 mbs,
165 0x10
166 );
167
169 (PUCHAR)&(Mbs->Buffer[Mbs->Length]),
170 &mbs[0],
171 mbc
172 );
173
174 Mbs->Length += (USHORT)mbc;
175 }
176 }
177
178 return Length;
179}
unsigned short USHORT
Definition: pedump.c:61
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
char mbs[5]
unsigned char UCHAR
Definition: xmlstorage.h:181

Referenced by Ext2UnicodeToOEM(), and Ext2UnicodeToOEMSize().

◆ Ext2UnicodeToOEM()

NTSTATUS Ext2UnicodeToOEM ( IN PEXT2_VCB  Vcb,
IN OUT POEM_STRING  Oem,
IN PUNICODE_STRING  Unicode 
)

Definition at line 261 of file misc.c.

265{
267
268 if (Vcb->Codepage.PageTable) {
269
270 Status = Ext2UnicodeToMbs(Vcb->Codepage.PageTable,
271 Oem, Unicode);
272 if (Status > 0 && Status == Oem->Length) {
274 } else {
276 DbgBreak();
277 }
278
279 goto errorout;
280 }
281
283 Oem, Unicode, FALSE );
284
285 if (!NT_SUCCESS(Status))
286 {
287 DbgBreak();
288 goto errorout;
289 }
290
291errorout:
292
293 return Status;
294}
ULONG Ext2UnicodeToMbs(struct nls_table *PageTable, IN OUT PANSI_STRING Mbs, IN PUNICODE_STRING Unicode)
Definition: misc.c:122
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132

Referenced by Ext2BuildEntry(), Ext2SetReparsePoint(), and Ext2SetVolumeInformation().

◆ Ext2UnicodeToOEMSize()

ULONG Ext2UnicodeToOEMSize ( IN PEXT2_VCB  Vcb,
IN PUNICODE_STRING  Unicode 
)

Definition at line 239 of file misc.c.

243{
244 ULONG Length = 0;
245
246 if (Vcb->Codepage.PageTable) {
247 Length = Ext2UnicodeToMbs(Vcb->Codepage.PageTable,
248 NULL, Unicode);
249 if (Length > 0) {
250 return Length;
251 }
252
253 DbgBreak();
254 }
255
256 return RtlxUnicodeStringToOemSize(Unicode);
257}
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToOemSize(IN PCUNICODE_STRING UnicodeString)
Definition: unicode.c:1091

Referenced by Ext2BuildEntry(), and Ext2SetReparsePoint().

◆ Ext2WinntError()

NTSTATUS Ext2WinntError ( int  rc)

Definition at line 410 of file misc.c.

411{
412 switch (rc) {
413
414 case 0:
415 return STATUS_SUCCESS;
416
417 case -EPERM:
418 case -EACCES:
420
421 case -ENOENT:
423
424 case -EFAULT:
426
427 case -ETOOSMALL:
429
430 case -EBADMSG:
431 case -EBADF:
432 case -EINVAL:
433 case -EFBIG:
435
436 case -EBUSY:
437 return STATUS_DEVICE_BUSY;
438
439 case -ENOSYS:
441
442 case -ENOSPC:
443 return STATUS_DISK_FULL;
444
445 case -EOPNOTSUPP:
447
448 case -EDEADLK:
450
451 case -EEXIST:
453
454 case -EIO:
456
457 case -ENOTDIR:
459
460 case -EISDIR:
462
463 case -ENOTEMPTY:
465
466 case -ENODEV:
468
469 case -ENXIO:
471
472 case -EADDRNOTAVAIL:
474
475 case -ENETDOWN:
477
478 case -ENETUNREACH:
480
481 case -ECONNABORTED:
483
484 case -ECONNRESET:
486
487 case -ENOMEM:
489
490 case -ENOBUFS:
491 return STATUS_NO_MEMORY;
492
493 case -ENOTCONN:
495
496 case -ESHUTDOWN:
498
499 case -ETIMEDOUT:
500 return STATUS_TIMEOUT;
501
502 case -ECONNREFUSED:
504
505 case -EHOSTUNREACH:
507
508 case -EAGAIN:
509 return STATUS_CANT_WAIT;
510
511 case -EINTR:
512 return STATUS_CANCELLED;
513
514 case -EMSGSIZE:
516
517 case -EADDRINUSE:
519 }
520
521 return STATUS_UNSUCCESSFUL;
522}
#define ENOENT
Definition: acclib.h:79
#define EEXIST
Definition: acclib.h:88
#define EBUSY
Definition: acclib.h:87
#define ENODEV
Definition: acclib.h:89
#define EBADF
Definition: acclib.h:82
#define EPERM
Definition: acclib.h:78
#define ENOSPC
Definition: errno.h:34
#define EBADMSG
Definition: errno.h:80
#define ENXIO
Definition: errno.h:12
#define ENOTDIR
Definition: errno.h:26
#define EISDIR
Definition: errno.h:27
#define EFBIG
Definition: errno.h:33
#define STATUS_POSSIBLE_DEADLOCK
Definition: ntstatus.h:637
#define STATUS_UNEXPECTED_IO_ERROR
Definition: ntstatus.h:469
#define ENOSYS
Definition: errno.h:57
#define EDEADLK
Definition: errno.h:54
#define ENOTEMPTY
Definition: errno.h:58
#define STATUS_DIRECTORY_NOT_EMPTY
Definition: udferr_usr.h:167
#define STATUS_FILE_IS_A_DIRECTORY
Definition: udferr_usr.h:164
#define STATUS_NOT_A_DIRECTORY
Definition: udferr_usr.h:169
#define STATUS_OBJECT_NAME_COLLISION
Definition: udferr_usr.h:150
#define STATUS_DEVICE_BUSY
Definition: udferr_usr.h:129
#define STATUS_DISK_FULL
Definition: udferr_usr.h:155

Referenced by Ext2AddDotEntries(), Ext2AddEntry(), Ext2DoExtentExpand(), Ext2FreeInode(), Ext2MapExtent(), Ext2NewBlock(), Ext2NewInode(), Ext2OverwriteEa(), Ext2QueryEa(), Ext2QueryFileInformation(), Ext2RemoveEntry(), and Ext2SetEa().

Variable Documentation

◆ Ext2Global

PEXT2_GLOBAL Ext2Global
extern

Definition at line 16 of file init.c.