Add -V option to test/iso.c little testing app.
This commit is contained in:
parent
d9c3767ac1
commit
fec717d2a1
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#define SECSIZE 2048
|
#define SECSIZE 2048
|
||||||
|
|
||||||
const char * const optstring = "JRL:b:h";
|
const char * const optstring = "JRL:b:hV:";
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind;
|
extern int optind;
|
||||||
|
|
||||||
@ -33,11 +33,12 @@ void help()
|
|||||||
{
|
{
|
||||||
printf(
|
printf(
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -J Add Joliet support\n"
|
" -J Add Joliet support\n"
|
||||||
" -R Add Rock Ridge support\n"
|
" -R Add Rock Ridge support\n"
|
||||||
" -L <num> Set the ISO level (1 or 2)\n"
|
" -V label Volume Label\n"
|
||||||
" -b file Specifies a boot image to add to image\n"
|
" -L <num> Set the ISO level (1 or 2)\n"
|
||||||
" -h Print this message\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};
|
struct iso_tree_radd_dir_behavior behav = {0,0,0};
|
||||||
int level=1, flags=0;
|
int level=1, flags=0;
|
||||||
char *boot_img = NULL;
|
char *boot_img = NULL;
|
||||||
|
char *volid = "VOLID";
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, optstring)) != -1) {
|
while ((c = getopt(argc, argv, optstring)) != -1) {
|
||||||
switch(c) {
|
switch(c) {
|
||||||
@ -75,6 +77,9 @@ int main(int argc, char **argv)
|
|||||||
case 'b':
|
case 'b':
|
||||||
boot_img = optarg;
|
boot_img = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'V':
|
||||||
|
volid = optarg;
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
usage();
|
usage();
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -108,7 +113,7 @@ int main(int argc, char **argv)
|
|||||||
if (!root) {
|
if (!root) {
|
||||||
err(1, "error opening input directory");
|
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 ) {
|
if ( boot_img ) {
|
||||||
/* adds El-Torito boot info. Tunned for isolinux */
|
/* adds El-Torito boot info. Tunned for isolinux */
|
||||||
|
Loading…
Reference in New Issue
Block a user