Skip to content
  • Alistair Francis's avatar
    7f69a433
    hw/dma: Replace fprintf(stderr, "*\n" with error_report() · 7f69a433
    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>
    
    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-4-armbru@redhat.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    7f69a433
    hw/dma: 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>
    
    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-4-armbru@redhat.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Loading