Project

General

Profile

Actions

Submit #3315

closed

[PATCH] split newfs_hammer2(8) into newfs and mkfs for other programs to use

Added by tkusumi over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Userland
Target version:
Start date:
06/02/2022
Due date:
% Done:

100%

Estimated time:

Description

https://leaf.dragonflybsd.org/~tkusumi/diff/newfs_hammer2_split.patch

This patch splits newfs_hammer2(8) into newfs and mkfs part, similarly to newfs_msdos(8).

  • The existing file newfs_hammer2.c now only does main() to handle options and call hammer2_mkfs().
  • The new file mkfs_hammer2.c does actual newfs work in hammer2_mkfs().
  • hammer2_mkfs() can be used by other programs.
  • newfs_hammer2(8) behavior and features stay the same.

The intention of this change is HAMMER2 support for makefs(8) which needs hammer2_mkfs() functionality.
I'll commit this diff along with makefs(8) HAMMER2 support in a few days or so.

Note that unlike makefs(8) FAT (which has MAKEFS ifdefs in sys/vfs/msdos here and there), the upcoming makefs(8) HAMMER2 doesn't change a single line of code in sys/vfs/hammer2 or sbin/hammer2.

Actions

Also available in: Atom PDF