Article View: comp.sys.amiga.tech
Article #2666Re: Problem with handler
From: Chuck McManis
Date: Mon, 11 Dec 1989 05:55
Date: Mon, 11 Dec 1989 05:55
31 lines
2161 bytes
2161 bytes
In article <1989Dec1.152959.5833@dvinci.usask.ca> (Aries Project) writes:
>I've written a handler and it works just fine, except that when it is
>active it shows up as a disk device. How do I prevent this from
>happening?
This is because AmigaDOS doesn't have any really good way of figuring
out what a disk device is. Andy Finkel wrote some code for the '88
Developers Conference that has become something of the reference.
Essentially, the way in which many early File Requesters that figured
out what disks were available worked was to check for a device with a
handler task (as oppose to number which was a clue to port-handler on whether
or not they were the serial or parallel device.) These days most people
check for a handler task, a valid DSKENV vector, and really careful
campers send an ACTION_DISKINFO packet to make sure.
>Also, do handlers have to be re-entrant? Mine isn't and it seems to
>work fine even when I have multiple incarnations of it running.
Yes, there is only one copy of the code. If your handler allows multiple
ACTION_OPEN packets then that would mean several processes could be
executing through your code. If you don't allow multiple opens then you
should be ok as long as the packet code up to the refusal is reentrant.
And no, there isn't a really good DOS reference. Maybe we should send
cards and letters to Randall at cbmvax and suggest it?
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"If it didn't have bones in it, it wouldn't be crunchy now would it?!"
Technical Details
Message-ID:
<129038@sun.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sun-barr!newstop!sun!pepper!cmcmanisReferences:
<1989Dec1.152959.5833@dvinci.usask.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sun-barr!newstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: Problem with handler Message-ID: <129038@sun.Eng.Sun.COM> Date: 11 Dec 89 05:55:28 GMT References: <1989Dec1.152959.5833@dvinci.usask.ca> Sender: news@sun.Eng.Sun.COM Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 31