symtab.c (96707) | symtab.c (102231) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)symtab.c 8.3 (Berkeley) 4/28/95"; 37#endif 38static const char rcsid[] = | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)symtab.c 8.3 (Berkeley) 4/28/95"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/sbin/restore/symtab.c 96707 2002-05-16 04:10:46Z trhodes $"; | 39 "$FreeBSD: head/sbin/restore/symtab.c 102231 2002-08-21 18:11:48Z trhodes $"; |
40#endif /* not lint */ 41 42/* 43 * These routines maintain the symbol table which tracks the state | 40#endif /* not lint */ 41 42/* 43 * These routines maintain the symbol table which tracks the state |
44 * of the filesystem being restored. They provide lookup by either | 44 * of the file system being restored. They provide lookup by either |
45 * name or inode number. They also provide for creation, deletion, 46 * and renaming of entries. Because of the dynamic nature of pathnames, 47 * names should not be saved, but always constructed just before they 48 * are needed, by calling "myname". 49 */ 50 51#include <sys/param.h> 52#include <sys/stat.h> --- 8 unchanged lines hidden (view full) --- 61#include <unistd.h> 62 63#include "restore.h" 64#include "extern.h" 65 66/* 67 * The following variables define the inode symbol table. 68 * The primary hash table is dynamically allocated based on | 45 * name or inode number. They also provide for creation, deletion, 46 * and renaming of entries. Because of the dynamic nature of pathnames, 47 * names should not be saved, but always constructed just before they 48 * are needed, by calling "myname". 49 */ 50 51#include <sys/param.h> 52#include <sys/stat.h> --- 8 unchanged lines hidden (view full) --- 61#include <unistd.h> 62 63#include "restore.h" 64#include "extern.h" 65 66/* 67 * The following variables define the inode symbol table. 68 * The primary hash table is dynamically allocated based on |
69 * the number of inodes in the filesystem (maxino), scaled by | 69 * the number of inodes in the file system (maxino), scaled by |
70 * HASHFACTOR. The variable "entry" points to the hash table; 71 * the variable "entrytblsize" indicates its size (in entries). 72 */ 73#define HASHFACTOR 5 74static struct entry **entry; 75static long entrytblsize; 76 77static void addino(ino_t, struct entry *); --- 540 unchanged lines hidden --- | 70 * HASHFACTOR. The variable "entry" points to the hash table; 71 * the variable "entrytblsize" indicates its size (in entries). 72 */ 73#define HASHFACTOR 5 74static struct entry **entry; 75static long entrytblsize; 76 77static void addino(ino_t, struct entry *); --- 540 unchanged lines hidden --- |