/*
- * $Id: ad_open.c,v 1.30.6.2 2003-10-17 00:01:12 didg Exp $
+ * $Id: ad_open.c,v 1.30.6.4 2003-12-12 19:34:27 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* 2) create space for SHORTNAME, AFPFILEI, DID, and PRODOSI
* 3) move FILEI attributes into AFPFILEI
* 4) initialize ACCESS field of FILEDATESI.
- *
- * so, we need 4*12 (entry ids) + 12 (shortname) + 4 (afpfilei) +
- * 4 (did) + 8 (prodosi) = 76 more bytes. */
-
+ */
+
#define SHIFTDATA (AD_DATASZ2 - AD_DATASZ1)
/* bail if we can't get a lock */
}
} else if (fstat(ad->ad_hf.adf_fd, &st) == 0 && st.st_size == 0) {
/* for 0 length files, treat them as new. */
- ad->ad_hf.adf_flags = (oflags & ~(O_RDONLY | O_WRONLY)) | O_RDWR | O_TRUNC;
+ ad->ad_hf.adf_flags = hoflags| O_TRUNC;
} else {
ad->ad_hf.adf_flags = hoflags;
}