traverse.c (100207) | traverse.c (102231) |
---|---|
1/*- 2 * Copyright (c) 1980, 1988, 1991, 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[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95"; 37#endif 38static const char rcsid[] = | 1/*- 2 * Copyright (c) 1980, 1988, 1991, 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[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/sbin/dump/traverse.c 100207 2002-07-17 02:03:19Z mckusick $"; | 39 "$FreeBSD: head/sbin/dump/traverse.c 102231 2002-08-21 18:11:48Z trhodes $"; |
40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/stat.h> 44 45#include <ufs/ufs/dir.h> 46#include <ufs/ufs/dinode.h> 47#include <ufs/ffs/fs.h> --- 78 unchanged lines hidden (view full) --- 126 (nonodump || (DIP(dp, di_flags) & UF_NODUMP) != UF_NODUMP)) 127#else 128#define WANTTODUMP(dp) CHANGEDSINCE(dp, spcl.c_ddate) 129#endif 130 131/* 132 * Dump pass 1. 133 * | 40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/stat.h> 44 45#include <ufs/ufs/dir.h> 46#include <ufs/ufs/dinode.h> 47#include <ufs/ffs/fs.h> --- 78 unchanged lines hidden (view full) --- 126 (nonodump || (DIP(dp, di_flags) & UF_NODUMP) != UF_NODUMP)) 127#else 128#define WANTTODUMP(dp) CHANGEDSINCE(dp, spcl.c_ddate) 129#endif 130 131/* 132 * Dump pass 1. 133 * |
134 * Walk the inode list for a filesystem to find all allocated inodes | 134 * Walk the inode list for a file system to find all allocated inodes |
135 * that have been modified since the previous dump time. Also, find all | 135 * that have been modified since the previous dump time. Also, find all |
136 * the directories in the filesystem. | 136 * the directories in the file system. |
137 */ 138int 139mapfiles(ino_t maxino, long *tapesize) 140{ 141 int mode; 142 ino_t ino; 143 union dinode *dp; 144 int anydirskipped = 0; --- 31 unchanged lines hidden (view full) --- 176 */ 177 SETINO(ROOTINO, dumpinomap); 178 return (anydirskipped); 179} 180 181/* 182 * Dump pass 2. 183 * | 137 */ 138int 139mapfiles(ino_t maxino, long *tapesize) 140{ 141 int mode; 142 ino_t ino; 143 union dinode *dp; 144 int anydirskipped = 0; --- 31 unchanged lines hidden (view full) --- 176 */ 177 SETINO(ROOTINO, dumpinomap); 178 return (anydirskipped); 179} 180 181/* 182 * Dump pass 2. 183 * |
184 * Scan each directory on the filesystem to see if it has any modified | 184 * Scan each directory on the file system to see if it has any modified |
185 * files in it. If it does, and has not already been added to the dump 186 * list (because it was itself modified), then add it. If a directory 187 * has not been modified itself, contains no modified files and has no 188 * subdirectories, then it can be deleted from the dump list and from 189 * the list of directories. By deleting it from the list of directories, 190 * its parent may now qualify for the same treatment on this or a later 191 * pass using this algorithm. 192 */ --- 549 unchanged lines hidden --- | 185 * files in it. If it does, and has not already been added to the dump 186 * list (because it was itself modified), then add it. If a directory 187 * has not been modified itself, contains no modified files and has no 188 * subdirectories, then it can be deleted from the dump list and from 189 * the list of directories. By deleting it from the list of directories, 190 * its parent may now qualify for the same treatment on this or a later 191 * pass using this algorithm. 192 */ --- 549 unchanged lines hidden --- |