mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-26 01:48:23 +08:00
Print found item as "parent/child" path (#203)
This commit is contained in:
parent
0f31b1401e
commit
8e189f88df
@ -58,9 +58,9 @@ USTATUS FfsFinder::findHexPattern(const UModelIndex & index, const UByteArray &
|
|||||||
if (!(hasChildren && mode == SEARCH_MODE_ALL && offset/2 >= model->header(index).size())) {
|
if (!(hasChildren && mode == SEARCH_MODE_ALL && offset/2 >= model->header(index).size())) {
|
||||||
msg(UString("Hex pattern \"") + UString(hexPattern)
|
msg(UString("Hex pattern \"") + UString(hexPattern)
|
||||||
+ UString("\" found as \"") + hexBody.mid(offset, hexPattern.length()).toUpper()
|
+ UString("\" found as \"") + hexBody.mid(offset, hexPattern.length()).toUpper()
|
||||||
+ UString("\" in ") + model->name(index)
|
+ UString("\" in ") + model->name(model->parent(index))
|
||||||
+ UString(" (") + model->name(model->parent(index))
|
+ UString("/") + model->name(index)
|
||||||
+ usprintf(") at %s-offset %02Xh", mode == SEARCH_MODE_BODY ? "body" : "header", offset / 2),
|
+ usprintf(" at %s-offset %02Xh", mode == SEARCH_MODE_BODY ? "body" : "header", offset / 2),
|
||||||
index);
|
index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -127,9 +127,9 @@ USTATUS FfsFinder::findGuidPattern(const UModelIndex & index, const UByteArray &
|
|||||||
if (offset % 2 == 0) {
|
if (offset % 2 == 0) {
|
||||||
msg(UString("GUID pattern \"") + UString(guidPattern)
|
msg(UString("GUID pattern \"") + UString(guidPattern)
|
||||||
+ UString("\" found as \"") + hexBody.mid(offset, hexPattern.length()).toUpper()
|
+ UString("\" found as \"") + hexBody.mid(offset, hexPattern.length()).toUpper()
|
||||||
+ UString("\" in ") + model->name(index)
|
+ UString("\" in ") + model->name(model->parent(index))
|
||||||
+ UString(" (") + model->name(model->parent(index))
|
+ UString("/") + model->name(index)
|
||||||
+ usprintf(") at %s-offset %02Xh", mode == SEARCH_MODE_BODY ? "body" : "header", offset / 2),
|
+ usprintf(" at %s-offset %02Xh", mode == SEARCH_MODE_BODY ? "body" : "header", offset / 2),
|
||||||
index);
|
index);
|
||||||
}
|
}
|
||||||
offset = regexp.indexIn(hexBody, offset + 1);
|
offset = regexp.indexIn(hexBody, offset + 1);
|
||||||
@ -175,9 +175,9 @@ USTATUS FfsFinder::findTextPattern(const UModelIndex & index, const UString & pa
|
|||||||
while ((offset = data.indexOf(pattern, offset + 1, caseSensitive)) >= 0) {
|
while ((offset = data.indexOf(pattern, offset + 1, caseSensitive)) >= 0) {
|
||||||
|
|
||||||
msg((unicode ? UString("Unicode") : UString("ASCII")) + UString(" text \"") + UString(pattern)
|
msg((unicode ? UString("Unicode") : UString("ASCII")) + UString(" text \"") + UString(pattern)
|
||||||
+ UString("\" found in ") + model->name(index)
|
+ UString("\" in ") + model->name(model->parent(index))
|
||||||
+ UString(" (") + model->name(model->parent(index))
|
+ UString("/") + model->name(index)
|
||||||
+ usprintf(") at %s-offset %02Xh", mode == SEARCH_MODE_BODY ? "body" : "header", (unicode ? offset * 2 : offset)),
|
+ usprintf(" at %s-offset %02Xh", mode == SEARCH_MODE_BODY ? "body" : "header", (unicode ? offset * 2 : offset)),
|
||||||
index);
|
index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user