Article View: comp.sys.amiga.tech
Article #6877Re: DateStamp HELP!
From: Gregory Kritsch
Date: Sat, 21 Nov 2020 02:13
Date: Sat, 21 Nov 2020 02:13
36 lines
2141 bytes
2141 bytes
huver@amgraf.UUCP (Huver) writes:
>In article <1990Nov18.030410.7819@hoss.unl.edu>, Phil Dietz wrote:
>NOTICE, however, in Lydiatt's setDate() function he used:
> arg[1] = (ULONG)IoErr(); /* lock on parent director set by DeviceProc() */
>which is incorrect. ParentDir() should be used for this purpose.
>A similar function that I use with Manx 3.6/5.0 (under WB 1.3 or 1.3.2),
>modified slightly from original PDmake posting, is attached below.
On the contrary, using (ULONG)IoErr() is quite correct, and using
ParentDir() won't work in most cases. See, DeviceProc() is a somewhat
magical function, at the heart of AmigaDOS. You call it with a pointer
to a volume:path/filename - it returns in D0 the address of the message
port of the associated filesystem, and in IoErr() the parent directory
lock relative to the volume:path/filename you passed. This is fully
documented in the Tech Ref Man.
Calling ParentDir() will only work correctly if there is no
volume:path/, or you strip that off before calling ACTION_SET_DATE.
It is my understanding that if I pass the name "a/b", the appropriate
parent directory lock to pass is the current directory lock, whereas if
I pass "a:b/c", the appropriate lock to pass is a lock on a: (obtained
from the device list, I think). I've looked through a few filesystems
and this seems to be correct.
>-huver ...!uunet!amgraf!huver -or- huver%amgraf@uunet.uu.net
Gregory Kritsch | University of Waterloo
Fido: 1:221/208.11110 [1:163/109.30] | 1A Computer Engineering
OCUG: ggk@tirith.ocug.on.ca |----------------------------
UUCP: ggk@tirith.UUCP | The University doesn't get
...!watmath!xenitec!tirith!ggk | a chance to censor me!
Technical Details
Message-ID:
<ggk.659153583@tirith.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!maytag!xenitec!tirith!ggkReferences:
<364@amgraf.UUCP> <1990Nov18.030410.7819@hoss.unl.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!maytag!xenitec!tirith!ggk From: ggk@tirith.UUCP (Gregory Kritsch) Message-ID: <ggk.659153583@tirith.UUCP> Date: 21 Nov 20 02:13:03 Newsgroups: comp.sys.amiga.tech Subject: Re: DateStamp HELP! In-Reply-To: huver@amgraf.UUCP (Huver) References: <364@amgraf.UUCP> <1990Nov18.030410.7819@hoss.unl.edu>