mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-14 23:24:49 -04:00
Rough attempt to deglue UEFIExtract from Qt
This commit is contained in:
parent
0a2f115056
commit
c9db871c12
9 changed files with 227 additions and 209 deletions
|
@ -14,41 +14,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include "uefidump.h"
|
||||
#include "../common/ffs.h"
|
||||
#include "../common/utility.h"
|
||||
#include "../common/filesystem.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <direct.h>
|
||||
bool isExistOnFs(const UString & path) {
|
||||
struct _stat buf;
|
||||
return (_stat((const char*)path.toLocal8Bit(), &buf) == 0);
|
||||
}
|
||||
|
||||
bool makeDirectory(const UString & dir) {
|
||||
return (_mkdir((const char*)dir.toLocal8Bit()) == 0);
|
||||
}
|
||||
|
||||
bool changeDirectory(const UString & dir) {
|
||||
return (_chdir((const char*)dir.toLocal8Bit()) == 0);
|
||||
}
|
||||
#else
|
||||
#include <unistd.h>
|
||||
bool isExistOnFs(const UString & path) {
|
||||
struct stat buf;
|
||||
return (stat((const char*)path.toLocal8Bit(), &buf) == 0);
|
||||
}
|
||||
|
||||
bool makeDirectory(const UString & dir) {
|
||||
return (mkdir((const char*)dir.toLocal8Bit(), ACCESSPERMS) == 0);
|
||||
}
|
||||
|
||||
bool changeDirectory(const UString & dir) {
|
||||
return (chdir((const char*)dir.toLocal8Bit()) == 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
USTATUS UEFIDumper::dump(const UByteArray & buffer, const UString & inPath, const UString & guid)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue