From aa03717f245941c4903e0686cdd434ca9355813d Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 13 Apr 2007 17:28:25 +0000 Subject: [PATCH] Made use of fcntl(F_SETLK) switchable (and thus became more free with default) --- cdrskin/cdrskin.1 | 5 ++++- cdrskin/cdrskin.c | 5 ++++- cdrskin/cdrskin_timestamp.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cdrskin/cdrskin.1 b/cdrskin/cdrskin.1 index bcd723b..572a58c 100644 --- a/cdrskin/cdrskin.1 +++ b/cdrskin/cdrskin.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH CDRSKIN 1 "April 03, 2007" +.TH CDRSKIN 1 "April 12, 2007" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -731,6 +731,9 @@ Linux specific: Abort process if a busy drive is encountered. Linux specific: Try to wait for a busy drive to become free. This is not guaranteed to work with all drivers. Some need nonblocking i/o. .TP +.BI \--drive_f_setlk +Linux specific: Try to get exclusive lock on drive device file via fcntl(2). +.TP .BI \--drive_not_exclusive Linux specific: Combine --drive_not_f_setlk and --drive_not_o_excl. .TP diff --git a/cdrskin/cdrskin.c b/cdrskin/cdrskin.c index b2a0ed0..fa256c7 100644 --- a/cdrskin/cdrskin.c +++ b/cdrskin/cdrskin.c @@ -2101,6 +2101,9 @@ set_dev:; } else if(strcmp(argv[i],"--drive_blocking")==0) { o->drive_blocking= 1; + } else if(strcmp(argv[i],"--drive_f_setlk")==0) { + o->drive_fcntl_f_setlk= 1; + } else if(strcmp(argv[i],"--drive_not_exclusive")==0) { o->drive_exclusive= 0; o->drive_fcntl_f_setlk= 0; @@ -2121,7 +2124,6 @@ set_dev:; o->drive_scsi_dev_family= 4; else o->drive_scsi_dev_family= 0; - } else if(strcmp(argv[i],"--drive_scsi_exclusive")==0) { o->drive_exclusive= 2; @@ -2172,6 +2174,7 @@ set_dev:; printf(" (might be triggered by a busy hard disk)\n"); printf(" --drive_blocking try to wait for busy drive to become free\n"); printf(" (might be stalled by a busy hard disk)\n"); + printf(" --drive_f_setlk obtain exclusive lock via fcntl.\n"); printf(" --drive_not_exclusive combined not_o_excl and not_f_setlk.\n"); printf(" --drive_not_f_setlk do not obtain exclusive lock via fcntl.\n"); printf(" --drive_not_o_excl do not ask kernel to prevent opening\n"); diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 22ff28f..a3a3bd5 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2007.04.13.171347" +#define Cdrskin_timestamP "2007.04.13.173008"