SCIENTIFIC-LINUX-USERS Archives

August 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Brandon Vincent <[log in to unmask]>
Reply To:
Brandon Vincent <[log in to unmask]>
Date:
Sun, 30 Aug 2015 00:02:35 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (15 lines)
On Sat, Aug 29, 2015 at 10:18 PM, ToddAndMargo <[log in to unmask]> wrote:
> Rats!

I poked around the kernel source code a bit and confirmed my suspicion
that the kernel/SCSI driver determines if the device is
write-protected by performing a series of tests. These tests basically
involve querying the SCSI mode pages from the device.

You should be able to query the same information in userspace by using
tools bundled in the sg3_utils package.

You might want to try sginfo -a /dev/sdc.

Brandon Vincent

ATOM RSS1 RSS2