New -osirrox settings "blocked" and "unblock"
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2012 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2013 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@ -1465,7 +1465,13 @@ int Xorriso_option_osirrox(struct XorrisO *xorriso, char *mode, int flag)
|
||||
allow_restore= 0;
|
||||
else if(strncmp(cpt, "banned", l)==0 && l >= 5)
|
||||
allow_restore= -1;
|
||||
else if(strncmp(cpt, "device_files", l)==0 && l >= 12)
|
||||
else if(strncmp(cpt, "blocked", l)==0 && l >= 7)
|
||||
allow_restore= -2;
|
||||
else if(strncmp(cpt, "unblock", l)==0 && l >= 7) {
|
||||
if(xorriso->allow_restore == -2)
|
||||
xorriso->allow_restore= 0;
|
||||
allow_restore= 1;
|
||||
} else if(strncmp(cpt, "device_files", l)==0 && l >= 12)
|
||||
allow_restore= 2;
|
||||
else if((strncmp(cpt, "on", l)==0 && l >= 2) || mode[0]==0)
|
||||
allow_restore= 1;
|
||||
@ -1502,6 +1508,12 @@ unknown_mode:;
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
}
|
||||
if(allow_restore > 0 && xorriso->allow_restore == -2) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-osirrox: is currently disabled by setting 'blocked'");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
}
|
||||
if(xorriso->allow_restore != -1)
|
||||
xorriso->allow_restore= allow_restore;
|
||||
sprintf(xorriso->info_text,
|
||||
|
Reference in New Issue
Block a user