public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Scsi tape write protect status question
@ 2009-07-14 21:03 Mark Hounschell
  2009-07-14 21:23 ` Mark Hounschell
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Hounschell @ 2009-07-14 21:03 UTC (permalink / raw)
  To: linux-scsi; +Cc: Mark Hounschell

Sorry to bother you all with such an easy thing. I can't figure out how the
kernel knows I have a write protected tape in a drive that I open via

open("/dev/st0", O_RDWR, cf_flg, 0666)

Using the sgio interface I can only sense a write protect status after
attempting to to a write.
How can one know this before doing a write op?

Thanks in advance
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Scsi tape write protect status question
  2009-07-14 21:03 Scsi tape write protect status question Mark Hounschell
@ 2009-07-14 21:23 ` Mark Hounschell
  2009-07-15 10:52   ` Mark Hounschell
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Hounschell @ 2009-07-14 21:23 UTC (permalink / raw)
  To: markh; +Cc: linux-scsi, Mark Hounschell

Mark Hounschell wrote:
> Sorry to bother you all with such an easy thing. I can't figure out how
> the
> kernel knows I have a write protected tape in a drive that I open via
>
> open("/dev/st0", O_RDWR, cf_flg, 0666)

Sorry for the typo

open("/dev/st0", O_RDWR, 0666)

>
> Using the sgio interface I can only sense a write protect status after
> attempting to to a write.
> How can one know this before doing a write op?
>
> Thanks in advance
> Mark
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Scsi tape write protect status question
  2009-07-14 21:23 ` Mark Hounschell
@ 2009-07-15 10:52   ` Mark Hounschell
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Hounschell @ 2009-07-15 10:52 UTC (permalink / raw)
  To: markh; +Cc: linux-scsi

Mark Hounschell wrote:
> Mark Hounschell wrote:
>> Sorry to bother you all with such an easy thing. I can't figure out how
>> the
>> kernel knows I have a write protected tape in a drive that I open via
>>
>> open("/dev/st0", O_RDWR, cf_flg, 0666)
> 
> Sorry for the typo
> 
> open("/dev/st0", O_RDWR, 0666)
> 
>> Using the sgio interface I can only sense a write protect status after
>> attempting to to a write.
>> How can one know this before doing a write op?
>>

Never mind, it's in the mode-sense data.
Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-15 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-14 21:03 Scsi tape write protect status question Mark Hounschell
2009-07-14 21:23 ` Mark Hounschell
2009-07-15 10:52   ` Mark Hounschell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox