- ad->ad_inited = AD_INITED;
-}
-
-const char *adflags2logstr(int adflags)
-{
- int first = 1;
- static char buf[64];
-
- buf[0] = 0;
-
- if (adflags & ADFLAGS_DF) {
- strlcat(buf, "DF", 64);
- first = 0;
- }
- if (adflags & ADFLAGS_RF) {
- if (!first)
- strlcat(buf, "|", 64);
- strlcat(buf, "RF", 64);
- first = 0;
- }
- if (adflags & ADFLAGS_HF) {
- if (!first)
- strlcat(buf, "|", 64);
- strlcat(buf, "HF", 64);
- first = 0;
- }
- if (adflags & ADFLAGS_NOHF) {
- if (!first)
- strlcat(buf, "|", 64);
- strlcat(buf, "NOHF", 64);
- first = 0;
- }
- if (adflags & ADFLAGS_DIR) {
- if (!first)
- strlcat(buf, "|", 64);
- strlcat(buf, "DIR", 64);
- first = 0;
- }
- if (adflags & ADFLAGS_CHECK_OF) {
- if (!first)
- strlcat(buf, "|", 64);
- strlcat(buf, "OF", 64);
- first = 0;
- }
- return buf;
-}
-
-const char *oflags2logstr(int oflags)
-{
- int first = 1;
- static char buf[64];
-
- buf[0] = 0;
-
- if (oflags == O_RDONLY) {
- strlcat(buf, "O_RDONLY", 64);
- first = 0;
- }
- if (oflags & O_RDWR) {
- if (!first)
- strlcat(buf, "|", 64);
- strlcat(buf, "O_RDWR", 64);
- first = 0;
- }
- if (oflags & O_CREAT) {
- if (!first)
- strlcat(buf, "|", 64);
- strlcat(buf, "O_CREAT", 64);
- first = 0;
- }
- if (oflags & O_EXCL) {
- if (!first)
- strlcat(buf, "|", 64);
- strlcat(buf, "O_EXCL", 64);
- first = 0;
- }
- return buf;
+ memset(ad->ad_eid, 0, sizeof( ad->ad_eid ));
+ ad->ad_rlen = 0;
+ ad->ad_refcount = 1;
+ ad->ad_open_forks = 0;
+ ad->ad_resource_fork.adf_refcount = 0;
+ ad->ad_data_fork.adf_refcount = 0;
+ ad->ad_data_fork.adf_syml=0;
+ ad->ad_inited = 0;