sbin/hammer: Separate setup_volume() into init/load_volume()
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 7 Mar 2016 09:57:25 +0000 (18:57 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 19 Mar 2016 14:52:18 +0000 (23:52 +0900)
commit1ad8576688e458845b9d269923530100b1cb01b8
treeb14d1e567bb43b282f1878309992a79642c6e420
parentb07caad8a4df97a721b508f92014306fee5700b2
sbin/hammer: Separate setup_volume() into init/load_volume()

Separate setup_volume() into isnew == 0 and 1 case.
setup_volume() taking two args vol_no and isnew is redundant.

Use init_volume() when newly creating a HAMMER volume.
Use load_volume() when the HAMMER volume already exists.

This commit is based on functions added by the previous two commits.
sbin/hammer/cmd_volume.c
sbin/hammer/hammer.c
sbin/hammer/hammer_util.h
sbin/hammer/ondisk.c
sbin/newfs_hammer/newfs_hammer.c