diff --git a/mt.1 b/mt.1 index 36beeb4..7ff5eb3 100644 --- a/mt.1 +++ b/mt.1 @@ -187,6 +187,8 @@ write two filemarks when file closed space directly to eod (and lose file number) .IP no-wait don't wait until rewind, etc. complete +.IP weof-no-wait +don't wait until writing filemarks completes .IP auto-lock automatically lock/unlock drive door .IP def-writes diff --git a/mt.c b/mt.c index 151a2e1..d941b15 100644 --- a/mt.c +++ b/mt.c @@ -250,6 +250,7 @@ static struct booleans { { "can-partitions", MT_ST_CAN_PARTITIONS, "drive can handle partitioned tapes" }, { "scsi2logical", MT_ST_SCSI2LOGICAL, "logical block addresses used with SCSI-2" }, { "no-wait", MT_ST_NOWAIT, "immediate mode for rewind, etc." }, + { "weof-no-wait", MT_ST_NOWAIT_EOF, "immediate mode for writing filemarks" }, #ifdef MT_ST_SYSV { "sysv", MT_ST_SYSV, "enable the SystemV semantics" }, #endif diff --git a/stinit.8 b/stinit.8 index c17dc2c..f918600 100644 --- a/stinit.8 +++ b/stinit.8 @@ -159,6 +159,10 @@ The cleaning request notifying parameter is set to The immediate mode is used with commands like rewind if .I value is non-zero (i.e., the driver does not wait for the command to finish). +.IP weof-n[o-wait] +The immediate mode is used when writing filemarks if +.I value +is non-zero (i.e., the driver does not wait for the command to finish). .IP mode=value This keyword starts definition of tape mode .I value. diff --git a/stinit.c b/stinit.c index 295e080..80face7 100644 --- a/stinit.c +++ b/stinit.c @@ -58,6 +58,7 @@ typedef struct _devdef_tr { int long_timeout; int cleaning; int nowait; + int weof_nowait; int sili; modepar_tr modedefs[4]; } devdef_tr; @@ -259,6 +260,7 @@ find_pars(FILE *dbf, char *company, char *product, char *rev, devdef_tr *defs, i defs->long_timeout = (-1); defs->cleaning = (-1); defs->nowait = (-1); + defs->weof_nowait = (-1); defs->sili = (-1); for (i = 0; i < NBR_MODES; i++) { defs->modedefs[i].defined = FALSE; @@ -368,6 +370,8 @@ find_pars(FILE *dbf, char *company, char *product, char *rev, devdef_tr *defs, i defs->cleaning = num_arg(t); if ((t = find_string(modebuf, "no-w", line, LINEMAX)) != NULL) defs->nowait = num_arg(t); + if ((t = find_string(modebuf, "weof-n", line, LINEMAX)) != NULL) + defs->weof_nowait = num_arg(t); if ((t = find_string(modebuf, "sili", line, LINEMAX)) != NULL) defs->sili = num_arg(t); @@ -738,6 +742,8 @@ static int set_defs(devdef_tr *defs, char **fnames) clear_set[0] = clear_set[1] = 0; if (defs->nowait >= 0) clear_set[defs->nowait != 0] |= MT_ST_NOWAIT; + if (defs->weof_nowait >= 0) + clear_set[defs->weof_nowait != 0] |= MT_ST_NOWAIT_EOF; if (defs->sili >= 0) clear_set[defs->sili != 0] |= MT_ST_SILI; if (defs->modedefs[i].buffer_writes >= 0)