Implemented emulation for cdrecord option -lock
This commit is contained in:
parent
61b112f45a
commit
0c6f315c43
@ -240,8 +240,10 @@ who is able to get this list without further
|
|||||||
precautions.
|
precautions.
|
||||||
.br
|
.br
|
||||||
It is consensus that \fBchmod a+rw /dev/sr0\fP or \fBchmod a+rw /dev/hdc\fP
|
It is consensus that \fBchmod a+rw /dev/sr0\fP or \fBchmod a+rw /dev/hdc\fP
|
||||||
is less security sensitive than chmod u+s /usr/bin/cdrskin. The risk for the
|
is less security sensitive than chmod u+s,a+x /usr/bin/cdrskin. The risk for
|
||||||
drive is somewhat higher but the overall system is much less at stake.
|
the drive is somewhat higher but the overall system is much less at stake.
|
||||||
|
Consider to restrict rw-access to a single group which bundles the users who
|
||||||
|
are allowed to use the burner drive (like group "floppy").
|
||||||
.br
|
.br
|
||||||
.PP
|
.PP
|
||||||
If you only got one CD capable drive then you may leave out cdrskin option
|
If you only got one CD capable drive then you may leave out cdrskin option
|
||||||
@ -468,6 +470,14 @@ of source if there is a fifo of at least 64 kiB. See option fs= .
|
|||||||
Load the media and exit. Exit value is 0 if any kind of media was found, non
|
Load the media and exit. Exit value is 0 if any kind of media was found, non
|
||||||
zero else. Note: Option -eject will unload the media even if -load is given.
|
zero else. Note: Option -eject will unload the media even if -load is given.
|
||||||
.TP
|
.TP
|
||||||
|
.BI -lock
|
||||||
|
Like option -load but leave the drive's eject button disabled if there is any
|
||||||
|
media found and not option -eject is given.
|
||||||
|
.br
|
||||||
|
Use program "eject" or cdrskin -eject to get the tray out of the drive.
|
||||||
|
Runs of programs like cdrecord, growisofs, wodim, cdrskin will not be hampered
|
||||||
|
and normally enable the drive's eject button when they are done.
|
||||||
|
.TP
|
||||||
.BI minbuf= percentage
|
.BI minbuf= percentage
|
||||||
Equivalent to:
|
Equivalent to:
|
||||||
.br
|
.br
|
||||||
|
@ -2425,6 +2425,8 @@ see_cdrskin_eng_html:;
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\t-load\t\tload the disk and exit (works only with tray loader)\n");
|
"\t-load\t\tload the disk and exit (works only with tray loader)\n");
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
"\t-lock\t\tload and lock the disk and exit (works only with tray loader)\n");
|
||||||
|
fprintf(stderr,
|
||||||
"\t-eject\t\teject the disk after doing the work\n");
|
"\t-eject\t\teject the disk after doing the work\n");
|
||||||
fprintf(stderr,"\t-dummy\t\tdo everything with laser turned off\n");
|
fprintf(stderr,"\t-dummy\t\tdo everything with laser turned off\n");
|
||||||
#ifdef Cdrskin_libburn_has_multI
|
#ifdef Cdrskin_libburn_has_multI
|
||||||
@ -3361,6 +3363,7 @@ ex:;
|
|||||||
/** Release grabbed libburn drive
|
/** Release grabbed libburn drive
|
||||||
@param flag Bitfield for control purposes:
|
@param flag Bitfield for control purposes:
|
||||||
bit0= eject
|
bit0= eject
|
||||||
|
bit1= leave tray locked (eventually overrides bit0)
|
||||||
*/
|
*/
|
||||||
int Cdrskin_release_drive(struct CdrskiN *skin, int flag)
|
int Cdrskin_release_drive(struct CdrskiN *skin, int flag)
|
||||||
{
|
{
|
||||||
@ -3368,6 +3371,9 @@ int Cdrskin_release_drive(struct CdrskiN *skin, int flag)
|
|||||||
fprintf(stderr,"cdrskin: CAUGHT : release of non-grabbed drive.\n");
|
fprintf(stderr,"cdrskin: CAUGHT : release of non-grabbed drive.\n");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
if(flag&2)
|
||||||
|
burn_drive_leave_locked(skin->grabbed_drive,0);
|
||||||
|
else
|
||||||
burn_drive_release(skin->grabbed_drive,(flag&1));
|
burn_drive_release(skin->grabbed_drive,(flag&1));
|
||||||
skin->drive_is_grabbed= 0;
|
skin->drive_is_grabbed= 0;
|
||||||
skin->grabbed_drive= NULL;
|
skin->grabbed_drive= NULL;
|
||||||
@ -6376,7 +6382,7 @@ int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
|
|||||||
static char ignored_full_options[][41]= {
|
static char ignored_full_options[][41]= {
|
||||||
"-d", "-Verbose", "-V", "-silent", "-s", "-setdropts", "-prcap",
|
"-d", "-Verbose", "-V", "-silent", "-s", "-setdropts", "-prcap",
|
||||||
"-reset", "-abort", "-overburn", "-ignsize", "-useinfo",
|
"-reset", "-abort", "-overburn", "-ignsize", "-useinfo",
|
||||||
"-lock", "-fix", "-nofix", "-waiti",
|
"-fix", "-nofix", "-waiti",
|
||||||
"-immed", "-raw", "-raw96p", "-raw16",
|
"-immed", "-raw", "-raw96p", "-raw16",
|
||||||
"-clone", "-text", "-mode2", "-xa", "-xa1", "-xa2", "-xamix",
|
"-clone", "-text", "-mode2", "-xa", "-xa1", "-xa2", "-xamix",
|
||||||
"-cdi", "-preemp", "-nopreemp", "-copy", "-nocopy",
|
"-cdi", "-preemp", "-nopreemp", "-copy", "-nocopy",
|
||||||
@ -6816,6 +6822,9 @@ gracetime_equals:;
|
|||||||
} else if(strcmp(argv[i],"-load")==0) {
|
} else if(strcmp(argv[i],"-load")==0) {
|
||||||
skin->do_load= 1;
|
skin->do_load= 1;
|
||||||
|
|
||||||
|
} else if(strcmp(argv[i],"-lock")==0) {
|
||||||
|
skin->do_load= 2;
|
||||||
|
|
||||||
} else if(strncmp(argv[i],"-minbuf=",8)==0) {
|
} else if(strncmp(argv[i],"-minbuf=",8)==0) {
|
||||||
value_pt= argv[i]+8;
|
value_pt= argv[i]+8;
|
||||||
goto minbuf_equals;
|
goto minbuf_equals;
|
||||||
@ -7362,9 +7371,15 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
|
|||||||
if(skin->do_load) {
|
if(skin->do_load) {
|
||||||
ret= Cdrskin_grab_drive(skin,8);
|
ret= Cdrskin_grab_drive(skin,8);
|
||||||
if(ret>0) {
|
if(ret>0) {
|
||||||
|
if(skin->do_load==2 && !skin->do_eject) {
|
||||||
printf(
|
printf(
|
||||||
"cdrskin: NOTE : option -load orders program to exit after loading tray\n");
|
"cdrskin: NOTE : Option -lock orders program to exit with locked tray.\n");
|
||||||
Cdrskin_release_drive(skin,0);
|
printf(
|
||||||
|
"cdrskin: HINT : Run cdrskin with option -eject to unlock the drive tray.\n");
|
||||||
|
} else if(!skin->do_eject)
|
||||||
|
printf(
|
||||||
|
"cdrskin: NOTE : option -load orders program to exit after loading tray.\n");
|
||||||
|
Cdrskin_release_drive(skin,(skin->do_load==2)<<1);
|
||||||
}
|
}
|
||||||
{*exit_value= 14*(ret<=0); goto ex;}
|
{*exit_value= 14*(ret<=0); goto ex;}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2007.09.18.090713"
|
#define Cdrskin_timestamP "2007.09.18.090839"
|
||||||
|
Loading…
Reference in New Issue
Block a user