Rough attempt to deglue UEFIExtract from Qt

This commit is contained in:
vit9696 2018-07-13 00:17:08 +03:00
parent 0a2f115056
commit c9db871c12
9 changed files with 227 additions and 209 deletions

View file

@ -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)
{