Add -V option to test/iso.c little testing app.

This commit is contained in:
Vreixo Formoso Lopes 2007-09-06 15:15:09 +00:00
parent d9c3767ac1
commit fec717d2a1

View File

@ -20,7 +20,7 @@
#define SECSIZE 2048
const char * const optstring = "JRL:b:h";
const char * const optstring = "JRL:b:hV:";
extern char *optarg;
extern int optind;
@ -35,6 +35,7 @@ void help()
"Options:\n"
" -J Add Joliet support\n"
" -R Add Rock Ridge support\n"
" -V label Volume Label\n"
" -L <num> Set the ISO level (1 or 2)\n"
" -b file Specifies a boot image to add to image\n"
" -h Print this message\n"
@ -55,6 +56,7 @@ int main(int argc, char **argv)
struct iso_tree_radd_dir_behavior behav = {0,0,0};
int level=1, flags=0;
char *boot_img = NULL;
char *volid = "VOLID";
while ((c = getopt(argc, argv, optstring)) != -1) {
switch(c) {
@ -75,6 +77,9 @@ int main(int argc, char **argv)
case 'b':
boot_img = optarg;
break;
case 'V':
volid = optarg;
break;
case '?':
usage();
exit(1);
@ -108,7 +113,7 @@ int main(int argc, char **argv)
if (!root) {
err(1, "error opening input directory");
}
volume = iso_volume_new_with_root( "VOLID", "PUBID", "PREPID", root );
volume = iso_volume_new_with_root(volid, "PUBID", "PREPID", root);
if ( boot_img ) {
/* adds El-Torito boot info. Tunned for isolinux */