diff --git a/mkiso/mkiso.c b/mkiso/mkiso.c index 12cfe54..8aecd26 100644 --- a/mkiso/mkiso.c +++ b/mkiso/mkiso.c @@ -46,6 +46,7 @@ char *fst_ver=NULL; char *fst_codename=NULL; char *out_dir=NULL; char *lang=NULL; +int bootloader = MKISO_GRUB; int strrcmp(const char *haystack, const char *needle) { @@ -511,6 +512,7 @@ int main(int argc, char **argv) static struct option opts[] = { {"help", no_argument, 0, 'h'}, + {"bootloader", required_argument, 0, 'b'}, {"count", no_argument, 0, 'c'}, {"dry-run", no_argument, 0, 'n'}, {"stable", no_argument, 0, 's'}, @@ -520,7 +522,7 @@ int main(int argc, char **argv) if(argc >= 2) { - while((opt = getopt_long(argc, argv, "hcsf:n", opts, &option_index))) + while((opt = getopt_long(argc, argv, "hb:csf:n", opts, &option_index))) { if(opt < 0) break; @@ -528,6 +530,8 @@ int main(int argc, char **argv) { case 'h': printf("usage: %s [ options ]\n", argv[0]); + printf(" -b | --bootloader sets what bootloader to use\n"); + printf(" possible values: grub (default), isolinux\n"); printf(" -c | --count count the possible number of images only\n"); printf(" -f | --file use some other source instead of volumes.xml\n"); printf(" -h | --help this help\n"); @@ -536,6 +540,17 @@ int main(int argc, char **argv) free(xmlfile); return(0); break; + case 'b': + if(!strcmp("grub", optarg)) + bootloader = MKISO_GRUB; + else if(!strcmp("isolinux", optarg)) + bootloader = MKISO_ISOLINUX; + else + { + printf("unsupported bootloader!\n"); + return(1); + } + break; case 'c': countonly=1; break; case 'n': dryrun=1; break; case 's': stable=1; break; diff --git a/mkiso/mkiso.h b/mkiso/mkiso.h index 3c77721..9e7f5b1 100644 --- a/mkiso/mkiso.h +++ b/mkiso/mkiso.h @@ -49,3 +49,9 @@ typedef struct __isogrp_t } isogrp_t; char *detect_kernel(char *arch); + +enum +{ + MKISO_GRUB = 1, + MKISO_ISOLINUX +};