SCIENTIFIC-LINUX-USERS Archives

August 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

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

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

Print Reply
Sender:
Mailing list for Scientific Linux users worldwide <[log in to unmask]>
Date:
Sun, 30 Aug 2015 00:02:35 -0700
Reply-To:
Brandon Vincent <[log in to unmask]>
Message-ID:
Subject:
From:
Brandon Vincent <[log in to unmask]>
Content-Type:
text/plain; charset="UTF-8"
In-Reply-To:
MIME-Version:
1.0
Comments:
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