1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1994.
//
// File: fs.cxx
//
// Contents: Disk Administrator file system information
//
// History: 14-Jan-94 BruceFo Created
//
//----------------------------------------------------------------------------
#include "headers.hxx"
#pragma hdrstop
#include "fs.hxx"
//////////////////////////////////////////////////////////////////////////////
#define MAX_FAT_LABEL 11
#define MAX_NTFS_LABEL 32
#ifdef SUPPORT_OFS
#define MAX_OFS_LABEL 32
#endif // SUPPORT_OFS
//////////////////////////////////////////////////////////////////////////////
// NOTE: DEFAULT_FILE_SYSTEM defined in fs.hxx is an index into this array!
FileSystemInfoType FileSystems[] =
{
{
L"FAT", // not localized
IDS_LONG_FAT,
FS_FAT,
DA_FS_FLOPPY_CAPABLE,
MAX_FAT_LABEL
}
,
{
L"NTFS", // not localized
IDS_LONG_NTFS,
FS_NTFS,
DA_FS_EXTENDABLE,
MAX_NTFS_LABEL
}
#ifdef SUPPORT_OFS
,
{
L"OFS", // not localized
IDS_LONG_OFS,
FS_OFS,
DA_FS_FLOPPY_CAPABLE | DA_FS_EXTENDABLE,
MAX_OFS_LABEL
}
#endif // SUPPORT_OFS
};
UINT g_NumKnownFileSystems = ARRAYLEN(FileSystems);
//////////////////////////////////////////////////////////////////////////////
//+---------------------------------------------------------------------------
//
// Function: FindFileSystemInfo
//
// Synopsis: Find information about a file system type based on its name
//
// Arguments: [FileSystem] -- name of the file system
//
// Returns: pointer to a file system information structure, or NULL
// on failure
//
// History: 14-Jan-94 BruceFo Created
//
//----------------------------------------------------------------------------
FileSystemInfoType*
FindFileSystemInfo(
IN PWSTR FileSystem
)
{
INT i;
for (i=0; i<ARRAYLEN(FileSystems); i++)
{
if (0 == lstrcmp(FileSystem, FileSystems[i].pwszShortName))
{
return &(FileSystems[i]);
}
}
return NULL;
}
|