| 168 | } |
| 169 | |
| 170 | EFI_STATUS |
| 171 | CreateDir ( |
| 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 | |
| 201 | int |
| 202 | main ( |