Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!usc!apple!uokmax!munnari.oz.au!uhccux!rabanes From: rabanes@uhccux.uhcc.Hawaii.Edu (Greg Rabanes) Newsgroups: comp.sys.mac.programmer Subject: Journaling Device Drivers Message-ID: <9109@uhccux.uhcc.Hawaii.Edu> Date: 24 Aug 90 05:11:57 GMT Reply-To: rabanes@uhccux.UUCP (Greg Rabanes) Organization: University of Hawaii Lines: 56 I am currently tying to write a journaling device driver and am having a few problems with it. The programming environment I am using is MPW and the language is MPW C. 1) When creating the file from within the driver's "open" routine I am using the File manager routine "create" (NOTE: the lower case version included in the MPW C header file ). My code goes as follows: char fname[255] = "dezaley:user:journal4.dat"; create(fname, vrefnum, fcreator, ftype); Now the problem. A file is being created but not with the name or the directory I specified. I get a file named some- thing like &*&%&$^%@#% on the default volume. Now when I use these same declarations and calls from a plain old C program, it works fine. So, is there a way around this or am I doing something wrong? 2.) Although I have the above problem, a file is created and ultimately written to by my journaling device driver. I believe that the data written to the file is in compliance with what is specified in IM I-261. That is, I am writting both the Journal Code and the results of the call to the par- ticular Event manager routine making the call. A separate program I have written verifies this. (I think?!) Anyway, if my above belief is true then how do I go about playing back the recorded events? According to IM, I must set the system global variable JournalFlag to a negative number to tell the Event Manager that I am playing back a journal. There must be more to it than that? Do I write another driver that does the playback? If I do, then how does the Event Manager decode the file I have recorded the journal to? 3.) Next is the matter of finding some documentation on journaling. I have looked through the Macintosh Technical Notes as well as the Inside Macintosh series but I could not find much on this subject. Are there any books or articles which address this subject? As you can see by now I am quite lost and any help would be greatly appreciated. Mahalo (hawaiian for thanks) Mike Kanada c/o rabanes@uhccux.uhcc.hawaii.edu