mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
make-fs: print error message on mkfs failure
This makes a bit easier to diagnose failures on mkfs, without the need to restart the filesystem creation with verbose output (which will produce a lot more output).
This commit is contained in:
@@ -773,8 +773,8 @@ do_make_fs (const char *input, const char *output_str)
|
||||
|
||||
if (r == -1) {
|
||||
/* Provide more guidance in the error message (RHBZ#823883). */
|
||||
fprintf (stderr, "%s: 'mkfs' (create filesystem) operation failed.\n",
|
||||
guestfs_int_program_name);
|
||||
fprintf (stderr, "%s: 'mkfs' (create filesystem) operation failed: %s\n",
|
||||
guestfs_int_program_name, guestfs_last_error (g));
|
||||
if (STREQ (type, "fat"))
|
||||
fprintf (stderr, "Instead of 'fat', try 'vfat' (long filenames) or 'msdos' (short filenames).\n");
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user