|
Lines 155-167
Link Here
|
| 155 |
if ((mode = (dp->di_mode & IFMT)) == 0) |
155 |
if ((mode = (dp->di_mode & IFMT)) == 0) |
| 156 |
continue; |
156 |
continue; |
| 157 |
/* |
157 |
/* |
| 158 |
* All dirs go in dumpdirmap; only inodes that are to |
158 |
* Everything must go in usedinomap so that a check |
| 159 |
* be dumped go in usedinomap and dumpinomap, however. |
159 |
* for "in dumpdirmap but not in usedinomap" to detect |
|
|
160 |
* dirs with nodump set has a chance of succeeding |
| 161 |
* (this is used in mapdirs()). |
| 160 |
*/ |
162 |
*/ |
|
|
163 |
SETINO(ino, usedinomap); |
| 161 |
if (mode == IFDIR) |
164 |
if (mode == IFDIR) |
| 162 |
SETINO(ino, dumpdirmap); |
165 |
SETINO(ino, dumpdirmap); |
| 163 |
if (WANTTODUMP(dp)) { |
166 |
if (WANTTODUMP(dp)) { |
| 164 |
SETINO(ino, usedinomap); |
|
|
| 165 |
SETINO(ino, dumpinomap); |
167 |
SETINO(ino, dumpinomap); |
| 166 |
if (mode != IFREG && mode != IFDIR && mode != IFLNK) |
168 |
if (mode != IFREG && mode != IFDIR && mode != IFLNK) |
| 167 |
*tapesize += 1; |
169 |
*tapesize += 1; |
|
Lines 169-176
Link Here
|
| 169 |
*tapesize += blockest(dp); |
171 |
*tapesize += blockest(dp); |
| 170 |
continue; |
172 |
continue; |
| 171 |
} |
173 |
} |
| 172 |
if (mode == IFDIR) |
174 |
if (mode == IFDIR) { |
|
|
175 |
if (!nonodump && (dp->di_flags & UF_NODUMP)) |
| 176 |
CLRINO(ino, usedinomap); |
| 173 |
anydirskipped = 1; |
177 |
anydirskipped = 1; |
|
|
178 |
} |
| 174 |
} |
179 |
} |
| 175 |
/* |
180 |
/* |
| 176 |
* Restore gets very upset if the root is not dumped, |
181 |
* Restore gets very upset if the root is not dumped, |
|
Lines 218-224
Link Here
|
| 218 |
* it isn't in usedinomap, we have to go through it to |
223 |
* it isn't in usedinomap, we have to go through it to |
| 219 |
* propagate the nodump flag. |
224 |
* propagate the nodump flag. |
| 220 |
*/ |
225 |
*/ |
| 221 |
nodump = (TSTINO(ino, usedinomap) == 0); |
226 |
nodump = !nonodump && (TSTINO(ino, usedinomap) == 0); |
| 222 |
if ((isdir & 1) == 0 || (TSTINO(ino, dumpinomap) && !nodump)) |
227 |
if ((isdir & 1) == 0 || (TSTINO(ino, dumpinomap) && !nodump)) |
| 223 |
continue; |
228 |
continue; |
| 224 |
dp = getino(ino); |
229 |
dp = getino(ino); |