#define afs_open open
#endif /* !O_LARGEFILE */
-#define nFILES (sizeof (stuff)/sizeof(struct stuff))
/* Note: the volume creation functions herein leave the destroyMe flag in the
volume header ON: this means that the volumes will not be attached by the
#ifdef FSSYNC_BUILD_CLIENT
static void
-RemoveInodes(Device dev, VolumeId vid)
+RemoveInodes(struct afs_inode_info *stuff, Device dev, VolumeId vid)
{
int i;
IHandle_t *handle;
* needs the dev and vid to decrement volume special files.
*/
IH_INIT(handle, dev, vid, -1);
- for (i = 0; i < nFILES; i++) {
+ for (i = 0; i < MAXINODETYPE; i++) {
Inode inode = *stuff[i].inode;
if (VALID_INO(inode))
IH_DEC(handle, inode, vid);
Inode nearInode = 0;
char *part, *name;
struct stat st;
+ struct VolumeHeader tempHeader;
+ struct afs_inode_info stuff[MAXINODETYPE];
# ifdef AFS_DEMAND_ATTACH_FS
int locktype = 0;
# endif /* AFS_DEMAND_ATTACH_FS */
+ init_inode_info(&tempHeader, stuff);
+
*ec = 0;
memset(&vol, 0, sizeof(vol));
vol.id = volumeId;
}
device = partition->device;
- for (i = 0; i < nFILES; i++) {
- struct stuff *p = &stuff[i];
+ for (i = 0; i < MAXINODETYPE; i++) {
+ struct afs_inode_info *p = &stuff[i];
if (p->obsolete)
continue;
#ifdef AFS_NAMEI_ENV
bad:
if (handle)
IH_RELEASE(handle);
- RemoveInodes(device, vol.id);
+ RemoveInodes(stuff, device, vol.id);
if (!*ec) {
*ec = VNOVOL;
}