🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11765

Testing for disk (Lock?)

#11765
From: Bill Hogsett
Date: Sat, 11 Mar 1989 12:33
32 lines
1521 bytes
	I am modifying the C code for the old Tecmar T-Disk (yep its still
ticking!).  I now have it running with FFS, but can't get the old code to
properly tell if it is being run after the disk has already been mounted.

	I have tried the following:

/*      This calls up a requestor!!*/
	lock=Lock("dh0:c", SHARED_LOCK);
	if (lock != 0)
	{
		UnLock(lock);	 
		return HDERR_IsMounted;	
   	}
	This works fine if the disk has already been mounted.  It returns what 
you would expect.  The problem is that it prompts for DH0: if it is called 
before the disk is mounted (the normal case).

        Is there a way to check for the existence of a device or directory and
not have a requestor if the check fails?



--
******************************************************************************
Bill Hogsett			CLEVELAND AREA-AMIGA USERS' GROUP
ncoast!bill			(216) 581-2284 (BBS)
ncoast!wfhami!bill
3715 Townley Rd.		
Shaker Heights, OH 44122	I get paid for my legal opinions, but
216-295-1624			I'd really rather talk about my Amiga.
******************************************************************************
Technical Details
Message-ID: <0422.AA0422@wfhami>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!hal!ncoast!wfhami!bill

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!hal!ncoast!wfhami!bill
From: bill@wfhami.UUCP (Bill Hogsett)
Newsgroups: comp.sys.amiga.tech
Subject: Testing for disk (Lock?)
Message-ID: <0422.AA0422@wfhami>
Date: 11 Mar 89 12:33:20 GMT
Followup-To: comp.sys.amiga.tech
Organization: CA-AUG
Lines: 32
Keywords: Lock, Help, T-Disk