| 58 | } |
| 59 | |
| 60 | static bool isElf32Bit(const QString &path) |
| 61 | { |
| 62 | QFile f(path); |
| 63 | if (!f.open(QIODevice::ReadOnly)) |
| 64 | return false; |
| 65 | |
| 66 | unsigned char header[5]; |
| 67 | if (f.read(reinterpret_cast<char*>(header), 5) != 5) |
| 68 | return false; |
| 69 | |
| 70 | if (header[0] != 0x7F || header[1] != 'E' || header[2] != 'L' || header[3] != 'F') |
| 71 | return false; |
| 72 | |
| 73 | return header[4] == ELFCLASS32; |
| 74 | } |
| 75 | |
| 76 | Deployer::Deployer(QObject *parent) |
| 77 | : QObject(parent) |