const char *command =
"\n"
"type=\"${type:-ext4}\"\n"
"\n"
"labelopt='-L'\n"
"\n"
"case \"$type\" in\n"
"    ext?)\n"
"        extra='-F' ;;\n"
"    *fat|msdos)\n"
"        extra='-I' ;;\n"
"    ntfs)\n"
"        extra='-Q -F'\n"
"        labelopt='-n' ;;\n"
"    xfs)\n"
"        extra='-f' ;;\n"
"esac\n"
"\n"
"truncate -s $size \"$disk\"\n"
"\n"
"if [ \"x$label\" = \"x\" ]; then\n"
"    mkfs -t \"$type\" $extra \"$disk\"\n"
"else\n"
"    mkfs -t \"$type\" $extra $labelopt \"$label\" \"$disk\"\n"
"fi\n"
;
