MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / isElf32Bit

Function isElf32Bit

ui-linux/src/deployer.cpp:60–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static 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
76Deployer::Deployer(QObject *parent)
77 : QObject(parent)

Callers 2

deployMethod · 0.85
updateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected