git: sbin/hammer: Use printf() instead of fprintf(stdout)

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Mon Apr 18 04:15:25 PDT 2016


commit 0ba55d9a9d744d706f60b721a0cbc5562dd3fe04
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Mon Apr 18 19:01:29 2016 +0900

    sbin/hammer: Use printf() instead of fprintf(stdout)
    
    Follow sbin/hammer's coding style (as well as C in general).
    
     # grep "fprintf(stdout" sbin/hammer -riI
     sbin/hammer/cmd_info.c:                                         fprintf(stdout, "\n");
     sbin/hammer/cmd_info.c:                         fprintf(stdout, "No mounted HAMMER filesystems found\n");
     sbin/hammer/cmd_info.c:                 fprintf(stdout, "No mounted filesystems found\n");
     sbin/hammer/cmd_info.c: fprintf(stdout, "Volume identification\n");
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tLabel               %s\n", fip->vol_name);
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tNo. Volumes         %d\n", fip->nvolumes);
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tHAMMER Volumes      ");
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tRoot Volume         %s\n", rootvol);
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tFSID                %s\n", fsid);
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tHAMMER Version      %d\n", fip->version);
     sbin/hammer/cmd_info.c: fprintf(stdout, "Big-block information\n");
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tTotal      %10jd\n", (intmax_t)fip->bigblocks);
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tUsed       %10jd (%.2lf%%)\n"
     sbin/hammer/cmd_info.c: fprintf(stdout, "Space information\n");
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tNo. Inodes %10jd\n", (intmax_t)fip->inodes);
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tTotal size     %6s (%jd bytes)\n",
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tUsed           %6s (%.2lf%%)\n", buf,
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tReserved       %6s (%.2lf%%)\n", buf,
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tFree           %6s (%.2lf%%)\n", buf,
     sbin/hammer/cmd_info.c: fprintf(stdout, "PFS information\n");
     sbin/hammer/cmd_info.c: fprintf(stdout, "\tPFS ID  Mode    Snaps  Mounted on\n");
     sbin/hammer/cmd_info.c:         fprintf(stdout, "\t%6d  %-6s",
     sbin/hammer/cmd_info.c:         fprintf(stdout, " %6s  ", (pi->head.error && pi->snapcount == 0) ? "-" : buf);
     sbin/hammer/cmd_info.c:                 fprintf(stdout, "%s", pi->mountedon);
     sbin/hammer/cmd_info.c:                 fprintf(stdout, "not mounted");
     sbin/hammer/cmd_info.c:         fprintf(stdout, "\n");

Summary of changes:
 sbin/hammer/cmd_info.c | 69 +++++++++++++++++++++++++-------------------------
 1 file changed, 34 insertions(+), 35 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0ba55d9a9d744d706f60b721a0cbc5562dd3fe04


-- 
DragonFly BSD source repository



More information about the Commits mailing list