Skip to content
  • Alistair Francis's avatar
    bd6e1d81
    hw/mips: Replace fprintf(stderr, "*\n" with error_report() · bd6e1d81
    Alistair Francis authored
    
    
    Replace a large number of the fprintf(stderr, "*\n" calls with
    error_report(). The functions were renamed with these commands and then
    compiler issues where manually fixed.
    
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    
    Some lines where then manually tweaked to pass checkpatch.
    
    Signed-off-by: default avatarAlistair Francis <alistair.francis@xilinx.com>
    Cc: Paul Burton <paul.burton@imgtec.com>
    Cc: Aurelien Jarno <aurelien@aurel32.net>
    Cc: Yongbok Kim <yongbok.kim@imgtec.com>
    Cc: "Hervé Poussineau" <hpoussin@reactos.org>
    
    Conversions that aren't followed by exit() dropped, because they might
    be inappropriate.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Message-Id: <20180203084315.20497-6-armbru@redhat.com>
    bd6e1d81
    hw/mips: Replace fprintf(stderr, "*\n" with error_report()
    Alistair Francis authored
    
    
    Replace a large number of the fprintf(stderr, "*\n" calls with
    error_report(). The functions were renamed with these commands and then
    compiler issues where manually fixed.
    
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    find ./* -type f -exec sed -i \
        'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
        {} +
    
    Some lines where then manually tweaked to pass checkpatch.
    
    Signed-off-by: default avatarAlistair Francis <alistair.francis@xilinx.com>
    Cc: Paul Burton <paul.burton@imgtec.com>
    Cc: Aurelien Jarno <aurelien@aurel32.net>
    Cc: Yongbok Kim <yongbok.kim@imgtec.com>
    Cc: "Hervé Poussineau" <hpoussin@reactos.org>
    
    Conversions that aren't followed by exit() dropped, because they might
    be inappropriate.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Message-Id: <20180203084315.20497-6-armbru@redhat.com>
Loading