- ashort |= VOLPBIT_ATTR_CATSEARCH;
- ashort |= VOLPBIT_ATTR_EXT_ATTRS;
- if (afp_version >= 30) {
- ashort |= VOLPBIT_ATTR_UTF8;
- if (vol->v_flags & AFPVOL_UNIX_PRIV)
- ashort |= VOLPBIT_ATTR_UNIXPRIV;
- if (vol->v_flags & AFPVOL_TM)
- ashort |= VOLPBIT_ATTR_TM;
- }
- if (afp_version >= 32) {
- if (vol->v_flags & AFPVOL_ACLS)
- ashort |= VOLPBIT_ATTR_ACLS;
+ /* prior 2.1 only VOLPBIT_ATTR_RO is defined */
+ if (afp_version > 20) {
+ if (0 == (vol->v_flags & AFPVOL_NOFILEID) && vol->v_cdb != NULL &&
+ (vol->v_cdb->flags & CNID_FLAG_PERSISTENT)) {
+ ashort |= VOLPBIT_ATTR_FILEID;
+ }
+ ashort |= VOLPBIT_ATTR_CATSEARCH;
+
+ if (afp_version >= 30) {
+ ashort |= VOLPBIT_ATTR_UTF8;
+ if (vol->v_flags & AFPVOL_UNIX_PRIV)
+ ashort |= VOLPBIT_ATTR_UNIXPRIV;
+ if (vol->v_flags & AFPVOL_TM)
+ ashort |= VOLPBIT_ATTR_TM;
+
+ if (afp_version >= 32) {
+ ashort |= VOLPBIT_ATTR_EXT_ATTRS;
+ if (vol->v_flags & AFPVOL_ACLS)
+ ashort |= VOLPBIT_ATTR_ACLS;
+ }
+ }