+int
+do_mke2fs_J (const char *fstype, int blocksize, const char *device,
+ const char *journal)
+{
+ char *err;
+ int r;
+
+ char prog[] = "mke2fs";
+ if (e2prog (prog) == -1)
+ return -1;
+
+ char blocksize_s[32];
+ snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize);
+
+ int len = strlen (journal);
+ char jdev[len+32];
+ snprintf (jdev, len+32, "device=%s", journal);
+
+ r = command (NULL, &err,
+ prog, "-t", fstype, "-J", jdev, "-b", blocksize_s,
+ device, NULL);
+ if (r == -1) {
+ reply_with_error ("%s", err);
+ free (err);
+ return -1;