59 lines
1.8 KiB
Diff
59 lines
1.8 KiB
Diff
|
--- libregex/op_regex.cpp
|
||
|
+++ libregex/op_regex.cpp
|
||
|
@@ -282,15 +282,15 @@
|
||
|
string left = line;
|
||
|
left_rule.execute(left);
|
||
|
if (left == line) {
|
||
|
- throw bad_regex("invalid input file: " +
|
||
|
- '"' + line + '"');
|
||
|
+ throw bad_regex("invalid input file: \"" +
|
||
|
+ line + '"');
|
||
|
}
|
||
|
|
||
|
string right = line;
|
||
|
right_rule.execute(right);
|
||
|
if (right == line) {
|
||
|
- throw bad_regex("invalid input file: "
|
||
|
- + '"' + line + '"');
|
||
|
+ throw bad_regex("invalid input file: \""
|
||
|
+ + line + '"');
|
||
|
}
|
||
|
|
||
|
regex.add_pattern(left, right);
|
||
|
@@ -301,8 +301,8 @@
|
||
|
string var_value = line;
|
||
|
var_value_rule.execute(var_value);
|
||
|
if (var_value == line) {
|
||
|
- throw bad_regex("invalid input file: " +
|
||
|
- '"' + line + '"');
|
||
|
+ throw bad_regex("invalid input file: \"" +
|
||
|
+ line + '"');
|
||
|
}
|
||
|
|
||
|
regex.add_definition(var_name, var_value);
|
||
|
--- utils/opcontrol
|
||
|
+++ utils/opcontrol
|
||
|
@@ -452,11 +452,20 @@
|
||
|
return;
|
||
|
fi
|
||
|
|
||
|
+ kernel_file=$FILE_IMAGE
|
||
|
+ case $(file -L $kernel_file) in
|
||
|
+ *"gzip compressed"*)
|
||
|
+ kernel_file=$(mktemp /tmp/opcXXXXXX) || exit 1
|
||
|
+ trap "rm -f $kernel_file" EXIT
|
||
|
+ gzip -cd $FILE_IMAGE > $kernel_file
|
||
|
+ ;;
|
||
|
+ esac
|
||
|
+
|
||
|
# start at the start of .text and then continue to the end
|
||
|
- range_info=`objdump -h $FILE_IMAGE 2>/dev/null | grep " .text "`
|
||
|
+ range_info=`objdump -h $kernel_file 2>/dev/null | grep " .text "`
|
||
|
tmp1=`echo $range_info | awk '{print $4}'`
|
||
|
tmp_length=`echo $range_info | awk '{print $3}'`
|
||
|
- tmp2=`objdump -h $FILE_IMAGE --adjust-vma=0x$tmp_length 2>/dev/null | grep " .text " | awk '{print $4}'`
|
||
|
+ tmp2=`objdump -h $kernel_file --adjust-vma=0x$tmp_length 2>/dev/null | grep " .text " | awk '{print $4}'`
|
||
|
|
||
|
if test -z "$tmp1" -o -z "$tmp2"; then
|
||
|
echo "The specified file $FILE_IMAGE does not seem to be valid" >&2
|