{
return foreach_block_device(add_partitions);
}
-
-int
-do_mkfs (char *fstype, char *device)
-{
- char *err;
- int r;
-
- RESOLVE_DEVICE (device, return -1);
-
- r = command (NULL, &err, "/sbin/mkfs", "-t", fstype, device, NULL);
- if (r == -1) {
- reply_with_error ("mkfs: %s", err);
- free (err);
- return -1;
- }
-
- free (err);
- return 0;
-}