/*
- * $Id: adv1tov2.c,v 1.3.14.3 2004-08-23 22:20:07 bfernhomberg Exp $
+ * $Id: adv1tov2.c,v 1.3.14.3.2.1 2005-02-10 01:23:05 didg Exp $
* v1tov2: given a root directory, run down and convert all the
* files/directories into appledouble v2.
*/
int flags;
static int count = 0;
- ad_init(&ad, AD_VERSION2);
+ ad_init(&ad, AD_VERSION2, 0);
if (count++ > MAXDESCEND) {
fprintf(stderr, "FAILURE: too many subdirectories! possible infinite recursion.");
return;
DIR *dp;
struct adouble ad;
- ad_init(&ad, AD_VERSION2);
+ ad_init(&ad, AD_VERSION2, 0);
if (argc != 2) {
fprintf(stderr, "%s <directory>\n", *argv);
return -1;
/*
- * $Id: afppasswd.c,v 1.11.6.1 2004-10-08 00:54:40 bfernhomberg Exp $
+ * $Id: afppasswd.c,v 1.11.6.1.2.1 2005-02-10 01:23:07 didg Exp $
*
* Copyright 1999 (c) Adrian Sun (asun@u.washington.edu)
* All Rights Reserved. See COPYRIGHT.
{
u_int8_t key[HEXPASSWDLEN];
Key_schedule schedule;
- int i, j;
+ unsigned int i, j;
if (!newpwd) {
/* convert to binary */
/*
- * $Id: nad.c,v 1.11.8.2 2004-06-27 02:38:42 didg Exp $
+ * $Id: nad.c,v 1.11.8.2.2.1 2005-02-10 01:23:08 didg Exp $
*/
#ifdef HAVE_CONFIG_H
{
if (!loadvolinfo(path, &vol)) {
vol_load_charsets(&vol);
- ad_init(&nad.ad, vol.v_adouble);
+ ad_init(&nad.ad, vol.v_adouble, 0);
_mtoupath = mtoupathiconv;
_utompath = utompathiconv;
}
else
- ad_init(&nad.ad, 0);
+ ad_init(&nad.ad, 0, 0);
}
if (!isdir && (of = of_findname(path))) {
adp = of->of_ad;
} else {
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
adp = &ad;
}
/*
- * $Id: desktop.c,v 1.26.2.4.2.18.2.1 2005-02-06 10:16:01 didg Exp $
+ * $Id: desktop.c,v 1.26.2.4.2.18.2.2 2005-02-10 01:23:10 didg Exp $
*
* See COPYRIGHT.
*
isadir = path_isadir(path);
if (isadir || !(of = of_findname(path))) {
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
adp = &ad;
} else
adp = of->of_ad;
upath = path->u_name;
isadir = path_isadir(path);
if (isadir || !(of = of_findname(path))) {
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
adp = &ad;
} else
adp = of->of_ad;
isadir = path_isadir(path);
if (isadir || !(of = of_findname(path))) {
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
adp = &ad;
} else
adp = of->of_ad;
/*
- * $Id: directory.c,v 1.71.2.4.2.15.2.4 2005-01-31 17:00:43 didg Exp $
+ * $Id: directory.c,v 1.71.2.4.2.15.2.5 2005-02-10 01:23:10 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
(1 << DIRPBIT_BDATE) |
(1 << DIRPBIT_FINFO)))) {
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if ( !ad_metadata( upath, ADFLAGS_DIR, &ad) ) {
isad = 1;
}
bitmap = bitmap>>1;
bit++;
}
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if (ad_open( upath, vol_noadouble(vol)|ADFLAGS_HF|ADFLAGS_DIR,
O_RDWR|O_CREAT, 0666, &ad) < 0) {
struct stat *st = &path->st;
if (dir && dir->d_parent) {
- ad_setid(&ad,(vol->v_flags & AFPVOL_NODEV)?0:st->st_dev,
- st->st_ino, dir->d_did, dir->d_parent->d_did, vol->v_stamp);
+ ad_setid(&ad, st->st_dev, st->st_ino, dir->d_did, dir->d_parent->d_did, vol->v_stamp);
}
}
ad_flush( &ad, ADFLAGS_HF );
return( AFPERR_PARAM );
}
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if (ad_open( ".", vol_noadouble(vol)|ADFLAGS_HF|ADFLAGS_DIR,
O_RDWR|O_CREAT, 0666, &ad ) < 0) {
if (vol_noadouble(vol))
return( AFPERR_ACCESS );
}
ad_setname(&ad, s_path->m_name);
- ad_setid( &ad, (vol->v_flags & AFPVOL_NODEV)?0:s_path->st.st_dev,
- s_path->st.st_ino, dir->d_did, did, vol->v_stamp);
+ ad_setid( &ad, s_path->st.st_dev, s_path->st.st_ino, dir->d_did, did, vol->v_stamp);
ad_flush( &ad, ADFLAGS_HF );
ad_close( &ad, ADFLAGS_HF );
* .Parent
*/
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if (!ad_open( dst, ADFLAGS_HF|ADFLAGS_DIR, O_RDWR, 0, &ad)) {
ad_setname(&ad, newname);
fdir = curdir;
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if ( ad_metadata( ".", ADFLAGS_DIR, &ad) == 0 ) {
ad_getattr(&ad, &ashort);
/*
- * $Id: file.c,v 1.92.2.2.2.31.2.9 2005-02-05 14:46:35 didg Exp $
+ * $Id: file.c,v 1.92.2.2.2.31.2.10 2005-02-10 01:23:12 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
u_int32_t aint = 0;
#if AD_VERSION > AD_VERSION1
-dev_t dev;
-ino_t ino;
-cnid_t a_did;
-char stamp[ADEDLEN_PRIVSYN];
- /* look in AD v2 header
- * note inode and device are opaques and not in network order
- */
- if (adp
- && sizeof(dev_t) == ad_getentrylen(adp, ADEID_PRIVDEV)
- && sizeof(ino_t) == ad_getentrylen(adp,ADEID_PRIVINO)
- && sizeof(stamp) == ad_getentrylen(adp,ADEID_PRIVSYN)
- && sizeof(cnid_t) == ad_getentrylen(adp, ADEID_DID)
- && sizeof(cnid_t) == ad_getentrylen(adp, ADEID_PRIVID)
-
- ) {
- memcpy(&dev, ad_entry(adp, ADEID_PRIVDEV), sizeof(dev_t));
- memcpy(&ino, ad_entry(adp, ADEID_PRIVINO), sizeof(ino_t));
- memcpy(stamp, ad_entry(adp, ADEID_PRIVSYN), sizeof(stamp));
- memcpy(&a_did, ad_entry(adp, ADEID_DID), sizeof(cnid_t));
-
- if ( ( (vol->v_flags & AFPVOL_NODEV) || dev == st->st_dev)
- && ino == st->st_ino && a_did == did
- && !memcmp(vol->v_stamp, stamp, sizeof(stamp))) {
- memcpy(&aint, ad_entry(adp, ADEID_PRIVID), sizeof(aint));
- return aint;
- }
+
+ if ((aint = ad_getid(adp, st->st_dev, st->st_ino, did, vol->v_stamp))) {
+ return aint;
}
#endif
+
if (vol->v_cdb != NULL) {
aint = cnid_add(vol->v_cdb, st, did, upath, len, aint);
/* Throw errors if cnid_add fails. */
/* update the ressource fork
* for a folder adp is always null
*/
- if (ad_setid(adp,(vol->v_flags & AFPVOL_NODEV)?0:st->st_dev, st->st_ino, aint, did, vol->v_stamp)) {
+ if (ad_setid(adp, st->st_dev, st->st_ino, aint, did, vol->v_stamp)) {
ad_flush(adp, ADFLAGS_HF);
}
}
attrbits = ((of->of_ad->ad_df.adf_refcount > 0) ? ATTRBIT_DOPEN : 0);
attrbits |= ((of->of_ad->ad_hf.adf_refcount > of->of_ad->ad_df.adf_refcount)? ATTRBIT_ROPEN : 0);
} else {
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
adp = &ad;
}
if ((of = of_findname(s_path))) {
adp = of->of_ad;
} else {
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
adp = &ad;
}
if ( creatf) {
* create .AppleDouble if the file is already opened, so we
* use a diff one, it's not a pb,ie it's not the same file, yet.
*/
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if (!ad_open(dst, ADFLAGS_HF, O_RDWR | O_CREAT, 0666, &ad)) {
ad_close(&ad, ADFLAGS_HF);
if (!unix_rename( adsrc, vol->ad_path( dst, 0 )) )
#endif /* DEBUG */
if (adp == NULL) {
- ad_init(&ads, s_vol->v_adouble);
+ ad_init(&ads, s_vol->v_adouble, s_vol->v_ad_options);
adp = &ads;
}
- ad_init(&add, d_vol->v_adouble);
+ ad_init(&add, d_vol->v_adouble, d_vol->v_ad_options);
adflags = ADFLAGS_DF;
if (newname) {
adflags |= ADFLAGS_HF;
goto done;
}
else {
- ad_init(&add, d_vol->v_adouble);
+ ad_init(&add, d_vol->v_adouble, d_vol->v_ad_options);
if (ad_open(dst , adflags | noadouble, O_RDWR, 0666, &add) < 0) {
ret_err = errno;
}
/* try to open both forks at once */
adflags = ADFLAGS_DF|ADFLAGS_HF;
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options); /* OK */
while(1) {
- ad_init(&ad, vol->v_adouble); /* OK */
if ( ad_open( file, adflags, O_RDONLY, 0, &ad ) < 0 ) {
switch (errno) {
case ENOENT:
}
else if (!adp) {
/* was EACCESS error try to get only metadata */
- ad_init(&ad, vol->v_adouble); /* OK */
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options); /* OK */
if ( ad_metadata( file , 0, &ad) == 0 ) {
ad_getattr(&ad, &bshort);
ad_close( &ad, ADFLAGS_HF );
if ( ad_open( de->d_name, ADFLAGS_HF, O_RDWR, 0, adp ) < 0 ) {
continue;
}
- if (ad_setid(adp,(vol->v_flags & AFPVOL_NODEV)?0:path.st.st_dev, path.st.st_ino, aint, did, vol->v_stamp)) {
+ if (ad_setid(adp, path.st.st_dev, path.st.st_ino, aint, did, vol->v_stamp)) {
ad_flush(adp, ADFLAGS_HF);
}
ad_close(adp, ADFLAGS_HF);
return AFPERR_PARAM ;
}
- ad_init(&ads, vol->v_adouble);
+ ad_init(&ads, vol->v_adouble, vol->v_ad_options);
if (!(adsp = find_adouble( path, &s_of, &ads))) {
return afp_errno;
}
goto err_exchangefile;
}
- ad_init(&add, vol->v_adouble);
+ ad_init(&add, vol->v_adouble, vol->v_ad_options);
if (!(addp = find_adouble( path, &d_of, &add))) {
err = afp_errno;
goto err_exchangefile;
}
/* here we need to reopen if crossdev */
- if (sid && ad_setid(addp,(vol->v_flags & AFPVOL_NODEV)?0:destst.st_dev, destst.st_ino, sid, sdir->d_did, vol->v_stamp))
+ if (sid && ad_setid(addp, destst.st_dev, destst.st_ino, sid, sdir->d_did, vol->v_stamp))
{
ad_flush( addp, ADFLAGS_HF );
}
- if (did && ad_setid(adsp,(vol->v_flags & AFPVOL_NODEV)?0:srcst.st_dev, srcst.st_ino, did, curdir->d_did, vol->v_stamp))
+ if (did && ad_setid(adsp, srcst.st_dev, srcst.st_ino, did, curdir->d_did, vol->v_stamp))
{
ad_flush( adsp, ADFLAGS_HF );
}
/*
- * $Id: filedir.c,v 1.45.2.2.2.14.2.1 2004-12-07 02:58:08 didg Exp $
+ * $Id: filedir.c,v 1.45.2.2.2.14.2.2 2005-02-10 01:23:14 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
struct path path;
cnid_t id;
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
adp = &ad;
adflags = 0;
/*
- * $Id: ofork.c,v 1.20.6.6.2.1 2004-12-07 03:23:51 didg Exp $
+ * $Id: ofork.c,v 1.20.6.6.2.2 2005-02-10 01:23:15 didg Exp $
*
* Copyright (c) 1996 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
/* initialize to zero. This is important to ensure that
ad_open really does reinitialize the structure. */
- ad_init(ad, vol->v_adouble);
+ ad_init(ad, vol->v_adouble, vol->v_ad_options);
} else {
/* Increase the refcount on this struct adouble. This is
decremented again in oforc_dealloc. */
if ((of = of_findname(path))) {
adp = of->of_ad;
} else {
- ad_init(ad, vol->v_adouble);
+ ad_init(ad, vol->v_adouble, vol->v_ad_options);
adp = ad;
}
return adp;
/*
- * $Id: volume.c,v 1.51.2.7.2.33.2.3 2005-02-06 10:16:01 didg Exp $
+ * $Id: volume.c,v 1.51.2.7.2.33.2.4 2005-02-10 01:23:16 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
options[VOLOPT_FLAGS].i_value |= AFPVOL_UNIX_PRIV;
else if (strcasecmp(p, "nodev") == 0)
options[VOLOPT_FLAGS].i_value |= AFPVOL_NODEV;
+ else if (strcasecmp(p, "cachecnid") == 0)
+ options[VOLOPT_FLAGS].i_value |= AFPVOL_CACHE;
p = strtok(NULL, ",");
}
/* shift in some flags */
volume->v_flags = options[VOLOPT_FLAGS].i_value;
+ volume->v_ad_options = 0;
+ if ((volume->v_flags & AFPVOL_NODEV))
+ volume->v_ad_options |= AFPVOL_NODEV;
+ if ((volume->v_flags & AFPVOL_CACHE))
+ volume->v_ad_options |= AFPVOL_CACHE;
+
if (options[VOLOPT_PASSWORD].c_value)
volume->v_password = strdup(options[VOLOPT_PASSWORD].c_value);
* For MacOS8.x support we need to create the
* .Parent file here if it doesn't exist. */
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if ( ad_open( vol->v_path, vol_noadouble(vol) |
ADFLAGS_HF|ADFLAGS_DIR, O_RDWR | O_CREAT,
0666, &ad) < 0 ) {
struct vol *ovol;
curdir = NULL;
for ( ovol = Volumes; ovol; ovol = ovol->v_next ) {
- if ( ovol->v_flags & AFPVOL_OPEN ) {
+ if ( (ovol->v_flags & AFPVOL_OPEN) ) {
ovol->v_flags &= ~AFPVOL_OPEN;
closevol(ovol);
}
vol->v_flags &= ~AFPVOL_OPEN;
for ( ovol = Volumes; ovol; ovol = ovol->v_next ) {
- if ( ovol->v_flags & AFPVOL_OPEN ) {
+ if ( (ovol->v_flags & AFPVOL_OPEN) ) {
break;
}
}
return( AFPERR_PARAM );
}
- if (vol->v_flags & AFPVOL_RO)
+ if ((vol->v_flags & AFPVOL_RO))
return AFPERR_VLOCK;
/* we can only set the backup date. */
if (bitmap != (1 << VOLPBIT_BDATE))
return AFPERR_BITMAP;
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if ( ad_open( vol->v_path, ADFLAGS_HF|ADFLAGS_DIR, O_RDWR,
0666, &ad) < 0 ) {
if (errno == EROFS)
if ( !ret && folder->hide) {
/* Hide it */
- ad_init(&ad, vol->v_adouble);
+ ad_init(&ad, vol->v_adouble, vol->v_ad_options);
if (ad_open( p, vol_noadouble(vol) | ADFLAGS_HF|ADFLAGS_DIR,
O_RDWR|O_CREAT, 0666, &ad) < 0) {
free (p);
{
const _special_folder *p = &special_folders[0];
- if (vol->v_flags & AFPVOL_RO)
+ if ((vol->v_flags & AFPVOL_RO))
return;
for (; p->name != NULL; p++) {
/* volume flags */
strcpy(item, "VOLUME_OPTS:");
for (;op->name; op++) {
- if ( vol->v_flags & op->option ) {
+ if ( (vol->v_flags & op->option) ) {
strlcat(item, op->name, sizeof(item));
strlcat(item, " ", sizeof(item));
}
/* casefold flags */
strcpy(item, "VOLCASEFOLD:");
for (;cf->name; cf++) {
- if ( vol->v_casefold & cf->option ) {
+ if ( (vol->v_casefold & cf->option) ) {
strlcat(item, cf->name, sizeof(item));
strlcat(item, " ", sizeof(item));
}
/*
- * $Id: volume.h,v 1.19.2.5.2.7 2004-06-24 00:46:12 bfernhomberg Exp $
+ * $Id: volume.h,v 1.19.2.5.2.7.2.1 2005-02-10 01:23:16 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
charset_t v_maccharset;
struct charset_functions *v_mac;
- int v_deleted; /* volume open but deleted in new config file */
- int v_hide; /* new volume wait open volume */
- int v_adouble; /* default adouble format */
-
+ int v_deleted; /* volume open but deleted in new config file */
+ int v_hide; /* new volume wait open volume */
+ int v_adouble; /* default adouble format */
+ int v_ad_options; /* adouble option NODEV, NOCACHE, etc.. */
+
char *v_root_preexec;
char *v_preexec;
* help if device number is notconsistent across reboot
* NOTE symlink to a different device will return an ACCESS error
*/
+#define AFPVOL_CACHE (1 << 19) /* Use adouble v2 CNID caching, default don't use it */
/* FPGetSrvrParms options */
#define AFPSRVR_CONFIGINFO (1 << 0)
/*
- * $Id: adouble.h,v 1.21.6.20.2.1 2004-10-20 20:16:21 didg Exp $
+ * $Id: adouble.h,v 1.21.6.20.2.2 2005-02-10 01:23:16 didg Exp $
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
struct ad_entry ad_eid[ ADEID_MAX ];
struct ad_fd ad_df, ad_hf;
int ad_flags, ad_inited;
+ int ad_options;
int ad_refcount; /* used in afpd/ofork.c */
off_t ad_rlen; /* ressource fork len with AFP 3.0
the header parameter size is too small.
#define ADFLAGS_NOHF (1<<5) /* not an error if no ressource fork */
#define ADFLAGS_RDONLY (1<<6) /* don't try readwrite */
+/* adouble v2 cnid cache */
+#define ADVOL_NODEV (1 << 0)
+#define ADVOL_CACHE (1 << 1)
+
/* lock flags */
#define ADLOCK_CLR (0)
#define ADLOCK_RD (1<<0)
extern int ad_mode __P((const char *, int));
extern int ad_mkdir __P((const char *, int));
-extern void ad_init __P((struct adouble *, int ));
+extern void ad_init __P((struct adouble *, int, int ));
extern int ad_open __P((const char *, int, int, int, struct adouble *));
extern int ad_refresh __P((struct adouble *));
extern int ad_setname __P((struct adouble *, const char *));
#if AD_VERSION == AD_VERSION2
extern int ad_setid __P((struct adouble *, const dev_t dev,const ino_t ino, const u_int32_t, const u_int32_t, const void *));
+extern u_int32_t ad_getid __P((struct adouble *, const dev_t, const ino_t, const cnid_t, const void *));
#else
#define ad_setid(a, b, c)
#endif
/*
- * $Id: ad_attr.c,v 1.4.8.7 2004-09-06 09:38:22 didg Exp $
+ * $Id: ad_attr.c,v 1.4.8.7.2.1 2005-02-10 01:23:17 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#if AD_VERSION == AD_VERSION2
int ad_setid (struct adouble *adp, const dev_t dev, const ino_t ino , const u_int32_t id, const cnid_t did, const void *stamp)
{
- if (adp->ad_flags == AD_VERSION2 && ad_getentryoff(adp, ADEID_PRIVDEV) &&
+ if (adp->ad_flags == AD_VERSION2 && ( adp->ad_options & ADVOL_CACHE) &&
+ ad_getentryoff(adp, ADEID_PRIVDEV) &&
sizeof(dev_t) == ADEDLEN_PRIVDEV && sizeof(ino_t) == ADEDLEN_PRIVINO)
{
ad_setentrylen( adp, ADEID_PRIVDEV, sizeof(dev_t));
- memcpy(ad_entry( adp, ADEID_PRIVDEV ), &dev, sizeof(dev_t));
+ if ((adp->ad_options & ADVOL_NODEV)) {
+ memset(ad_entry( adp, ADEID_PRIVDEV ), 0, sizeof(dev_t));
+ }
+ else {
+ memcpy(ad_entry( adp, ADEID_PRIVDEV ), &dev, sizeof(dev_t));
+ }
ad_setentrylen( adp, ADEID_PRIVINO, sizeof(ino_t));
memcpy(ad_entry( adp, ADEID_PRIVINO ), &ino, sizeof(ino_t));
return 0;
}
+/* ----------------------------- */
+u_int32_t ad_getid (struct adouble *adp, const dev_t st_dev, const ino_t st_ino , const cnid_t did, const void *stamp)
+{
+u_int32_t aint = 0;
+dev_t dev;
+ino_t ino;
+cnid_t a_did;
+char temp[ADEDLEN_PRIVSYN];
+
+ /* look in AD v2 header
+ * note inode and device are opaques and not in network order
+ */
+ if (adp && ( adp->ad_options & ADVOL_CACHE)
+ && sizeof(dev_t) == ad_getentrylen(adp, ADEID_PRIVDEV)
+ && sizeof(ino_t) == ad_getentrylen(adp,ADEID_PRIVINO)
+ && sizeof(temp) == ad_getentrylen(adp,ADEID_PRIVSYN)
+ && sizeof(cnid_t) == ad_getentrylen(adp, ADEID_DID)
+ && sizeof(cnid_t) == ad_getentrylen(adp, ADEID_PRIVID)
+ ) {
+ memcpy(&dev, ad_entry(adp, ADEID_PRIVDEV), sizeof(dev_t));
+ memcpy(&ino, ad_entry(adp, ADEID_PRIVINO), sizeof(ino_t));
+ memcpy(temp, ad_entry(adp, ADEID_PRIVSYN), sizeof(stamp));
+ memcpy(&a_did, ad_entry(adp, ADEID_DID), sizeof(cnid_t));
+
+ if ( ((adp->ad_options & ADVOL_NODEV) || dev == st_dev)
+ && ino == st_ino && a_did == did
+ && !memcmp(stamp, temp, sizeof(temp))) {
+ memcpy(&aint, ad_entry(adp, ADEID_PRIVID), sizeof(aint));
+ return aint;
+ }
+ }
+ return 0;
+}
+
#endif
/* -----------------
/*
- * $Id: ad_open.c,v 1.30.6.18.2.2 2005-02-05 14:54:49 didg Exp $
+ * $Id: ad_open.c,v 1.30.6.18.2.3 2005-02-10 01:23:18 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
* Copyright (c) 1990,1991 Regents of The University of Michigan.
#define AD_SET(a) a = 0
#endif
-void ad_init(struct adouble *ad, int flags)
+void ad_init(struct adouble *ad, int flags, int options)
{
memset( ad, 0, sizeof( struct adouble ) );
ad->ad_flags = flags;
else {
ad->ad_path = ad_path;
}
+ ad->ad_options = options;
}
/* -------------------