Go to the source code of this file.
|
BOOLEAN | DissectArcPath (IN PCSTR ArcPath, OUT PCSTR *Path OPTIONAL, OUT PUCHAR DriveNumber, OUT PULONG PartitionNumber) |
|
BOOLEAN | DissectArcPath2 (IN PCSTR ArcPath, OUT PULONG x, OUT PULONG y, OUT PULONG z, OUT PULONG Partition, OUT PULONG PathSyntax) |
|
VOID | ConstructArcPath (PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition) |
|
◆ ConstructArcPath()
Definition at line 175 of file arcname.c.
176{
177 char tmp[50];
178
179 strcpy(ArcPath,
"multi(0)disk(0)");
180
181 if (Disk < 0x80)
182 {
183
184
185
186
187 sprintf(tmp,
"fdisk(%d)", (
int) Disk);
189 }
190 else
191 {
192
193
194
195
196 sprintf(tmp,
"rdisk(%d)partition(%d)", (
int) (Disk - 0x80), (
int) Partition);
198 }
199
200 if (SystemFolder[0] == '\\' || SystemFolder[0] == '/')
201 {
202 strcat(ArcPath, SystemFolder);
203 }
204 else
205 {
207 strcat(ArcPath, SystemFolder);
208 }
209}
char * strcat(char *DstString, const char *SrcString)
char * strcpy(char *DstString, const char *SrcString)
#define sprintf(buf, format,...)
Referenced by EditCustomBootReactOS().
◆ DissectArcPath()
Definition at line 25 of file arcname.c.
30{
32
33
34 if (
_strnicmp(ArcPath,
"ramdisk(0)", 10) == 0)
35 {
36
37 *DriveNumber = 0x49;
39
40
43
45 }
46
47
48 if (
_strnicmp(ArcPath,
"multi(0)disk(0)", 15) != 0)
50
53 {
54
55
56
57
59 *DriveNumber =
atoi(
p);
65 }
67 {
68
69
70
71
73 *DriveNumber =
atoi(
p) + 0x80;
79 }
81 {
82
83
84
85
87 *DriveNumber =
atoi(
p) + 0x80;
92
94 {
101 }
102 else
103 {
105 }
106 }
107 else
108 {
110 }
111
112
115
117}
PRTL_UNICODE_STRING_BUFFER Path
char * strchr(const char *String, int ch)
#define _strnicmp(_String1, _String2, _MaxCount)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_In_ ULONG _In_ ULONG PartitionNumber
Referenced by DiskOpen(), and UefiDiskOpen().
◆ DissectArcPath2()
Definition at line 121 of file arcname.c.
128{
129
130 if (
_strnicmp(ArcPath,
"ramdisk(0)", 10) == 0)
131 {
133 *Partition = 1;
134 *PathSyntax = 2;
136 }
137
138 else if (
sscanf(ArcPath,
"scsi(%lu)disk(%lu)rdisk(%lu)partition(%lu)",
x,
y,
z, Partition) == 4)
139 {
140 *PathSyntax = 0;
142 }
143
144 else if (
sscanf(ArcPath,
"scsi(%lu)cdrom(%lu)fdisk(%lu)",
x,
y,
z) == 3)
145 {
146 *Partition = 0;
147 *PathSyntax = 0;
149 }
150
151 else if (
sscanf(ArcPath,
"multi(%lu)disk(%lu)rdisk(%lu)partition(%lu)",
x,
y,
z, Partition) == 4)
152 {
153 *PathSyntax = 1;
155 }
156
157 else if (
sscanf(ArcPath,
"multi(%lu)disk(%lu)cdrom(%lu)",
x,
y,
z) == 3)
158 {
159 *Partition = 1;
160 *PathSyntax = 1;
162 }
163
164 else if (
sscanf(ArcPath,
"multi(%lu)disk(%lu)fdisk(%lu)",
x,
y,
z) == 3)
165 {
166 *Partition = 1;
167 *PathSyntax = 1;
169 }
170
171
173}
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
Referenced by DiskOpen().