MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / CreateDir

Function CreateDir

BaseTools/Source/C/Split/Split.c:170–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170EFI_STATUS
171CreateDir (
172 IN OUT CHAR8** FullFileName
173)
174{
175 CHAR8* temp = *FullFileName;
176 CHAR8* start = temp;
177 CHAR8 tempchar;
178 UINT64 index = 0;
179
180 for (;index < strlen(temp); ++index) {
181 if (temp[index] == '\\' || temp[index] == '/') {
182 if (temp[index + 1] != '\0') {
183 tempchar = temp[index + 1];
184 temp[index + 1] = 0;
185 if (chdir(start)) {
186 if (mkdir(start, S_IRWXU | S_IRWXG | S_IRWXO) != 0) {
187 return EFI_ABORTED;
188 }
189 chdir(start);
190 }
191 start = temp + index + 1;
192 temp[index] = '/';
193 temp[index + 1] = tempchar;
194 }
195 }
196 }
197
198 return EFI_SUCCESS;
199}
200
201int
202main (

Callers 1

mainFunction · 0.85

Calls 3

chdirFunction · 0.85
mkdirFunction · 0.85
strlenFunction · 0.50

Tested by

no test coverage detected