git: sbin/hammer: Move score_printf()/hammer_check_restrict() to cmd_mirror.c

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Thu Aug 11 05:49:59 PDT 2016


commit 8679ed648f6da820877a735b4b6e6d0676ddc324
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Thu Aug 11 16:37:46 2016 +0900

    sbin/hammer: Move score_printf()/hammer_check_restrict() to cmd_mirror.c
    
    Make sbin/hammer/misc.c independent of /sbin/hammer's global variables
    (used by two functions score_printf()/hammer_check_restrict()) that
    aren't accessible from other programs such as /sbin/newfs_hammer
    which already links to some of sbin/hammer/*.o's.
    
    /sbin/newfs_hammer could make use of misc.o, but globals have been
    preventing from linking against sbin/hammer/misc.o. If these are
    to be used by other hammer commands, they need to be reimplemented
    without dependencies.

Summary of changes:
 sbin/hammer/cmd_mirror.c  | 70 +++++++++++++++++++++++++++++++++++++++++++++++
 sbin/hammer/hammer.c      |  1 -
 sbin/hammer/hammer.h      |  3 +-
 sbin/hammer/hammer_util.h |  4 ---
 sbin/hammer/misc.c        | 67 ---------------------------------------------
 5 files changed, 72 insertions(+), 73 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8679ed648f6da820877a735b4b6e6d0676ddc324


-- 
DragonFly BSD source repository


More information about the Commits mailing list