Skip to content
  • Alistair Francis's avatar
    0a094a54
    hw/lm32: Replace fprintf(stderr, "*\n" with error_report() · 0a094a54
    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: Michael Walle <michael@walle.cc>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Acked-by: default avatarMichael Walle <michael@walle.cc>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Message-Id: <20180203084315.20497-5-armbru@redhat.com>
    0a094a54
    hw/lm32: 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: Michael Walle <michael@walle.cc>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Acked-by: default avatarMichael Walle <michael@walle.cc>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Message-Id: <20180203084315.20497-5-armbru@redhat.com>
Loading