Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!djh From: djh@cs.mu.oz.au (David Hornsby) Newsgroups: comp.protocols.appletalk Subject: Re: CAP/AUFS bug & patch Message-ID: <6287@munnari.oz.au> Date: 16 Dec 90 15:18:35 GMT References: <6242@munnari.oz.au> Organization: Comp Sci, Melbourne Uni, Australia Lines: 28 Fix one bug and another shows up :-( Priority: medium/high Affects: CAP5.0 and derivatives. Symptom: Existing files 'created' with FPCreateFile (hard create flag) were not being truncated to zero length before writing. This only became obvious after the previous FPCreatFile bug fix was applied. Fix: add truncate flag to the open() in applications/aufs/afpos.c in the routines unix_create() and unix_createo(). There are TWO lines of the form flg = (delf) ? O_CREAT : O_CREAT | O_EXCL; which become ... flg = (delf) ? O_CREAT | O_TRUNC : O_CREAT | O_EXCL; Thanks to Ed Moy for pointing out this behaviour. If you are running on a host that doesn't understand O_TRUNC, please email me and I will make a more portable fix for this problem. - David. David Hornsby ...!uunet!munnari!djh Professional Officer djh@munnari.OZ.AU Department of Computer Science "The home of Multigate" +61 3 344 4044 The University of Melbourne, Parkville, 3052, Victoria, Australia.