🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #25028

Re: Write protected disk

#25028
From: Michael Fischer
Date: Mon, 19 Jan 1987 16:55
18 lines
1409 bytes
In-reply-to: tektronix!sequent!ogcvax!metheus!scotth@ucbvax.Berkeley.EDU  (Scott Huskey)

> Does anyone out there know how a program can check if a DISK
> is write protected or not?  I would like my program (a game)
> to NOT write out the high scores if the disk is write protected.
> I do not want to bother the user (player) with a GEM error message.
> Is there a GEMDOS call or some type of memory peek?  Do I need to
> talk to the disk controller directly?

Simply attempt the write and look at the returned error code to
tell if the write succeeded or not.  If it failed, the error code
should tell you if the problem is the disk being write protected,
in which case you don't need to bother the user with an error message.
(All this assumes of course that you are using the GEMDOS calls
directly.)

--Mike Fischer <fischer@yale.arpa>
-------
Technical Details
Message-ID: <8701191655.AA03808@yale-eli.YALE.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!YALE.ARPA!fischer-michael

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!YALE.ARPA!fischer-michael
From: fischer-michael@YALE.ARPA (Michael Fischer)
Newsgroups: comp.sys.atari.st
Subject: Re: Write protected disk
Message-ID: <8701191655.AA03808@yale-eli.YALE.ARPA>
Date: Mon, 19-Jan-87 11:55:48 EST
Article-I.D.: yale-eli.8701191655.AA03808
Posted: Mon Jan 19 11:55:48 1987
Date-Received: Tue, 20-Jan-87 04:13:00 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 18