fsck.h (57573) | fsck.h (62668) |
---|---|
1/* 2 * Copyright (c) 1980, 1986, 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)fsck.h 8.4 (Berkeley) 5/9/95 | 1/* 2 * Copyright (c) 1980, 1986, 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)fsck.h 8.4 (Berkeley) 5/9/95 |
34 * $FreeBSD: head/sbin/fsck_ffs/fsck.h 57573 2000-02-28 20:02:41Z mckusick $ | 34 * $FreeBSD: head/sbin/fsck_ffs/fsck.h 62668 2000-07-06 02:03:11Z mckusick $ |
35 */ 36 37#include <unistd.h> 38#include <stdlib.h> 39#include <stdio.h> 40 41#define MAXDUP 10 /* limit on dup blks (per inode) */ 42#define MAXBAD 10 /* limit on bad blks (per inode) */ --- 66 unchanged lines hidden (view full) --- 109 (bp)->b_flags = 0; 110 111#define sbdirty() sblk.b_dirty = 1 112#define cgdirty() cgblk.b_dirty = 1 113#define sblock (*sblk.b_un.b_fs) 114#define cgrp (*cgblk.b_un.b_cg) 115 116enum fixstate {DONTKNOW, NOFIX, FIX, IGNORE}; | 35 */ 36 37#include <unistd.h> 38#include <stdlib.h> 39#include <stdio.h> 40 41#define MAXDUP 10 /* limit on dup blks (per inode) */ 42#define MAXBAD 10 /* limit on bad blks (per inode) */ --- 66 unchanged lines hidden (view full) --- 109 (bp)->b_flags = 0; 110 111#define sbdirty() sblk.b_dirty = 1 112#define cgdirty() cgblk.b_dirty = 1 113#define sblock (*sblk.b_un.b_fs) 114#define cgrp (*cgblk.b_un.b_cg) 115 116enum fixstate {DONTKNOW, NOFIX, FIX, IGNORE}; |
117ino_t cursnapshot; |
|
117 118struct inodesc { 119 enum fixstate id_fix; /* policy on fixing errors */ 120 int (*id_func)(); /* function to be applied to blocks of inode */ 121 ino_t id_number; /* inode number described */ 122 ino_t id_parent; /* for DATA nodes, their parent */ | 118 119struct inodesc { 120 enum fixstate id_fix; /* policy on fixing errors */ 121 int (*id_func)(); /* function to be applied to blocks of inode */ 122 ino_t id_number; /* inode number described */ 123 ino_t id_parent; /* for DATA nodes, their parent */ |
124 int id_lbn; /* logical block number of current block */ |
|
123 ufs_daddr_t id_blkno; /* current block number being examined */ 124 int id_numfrags; /* number of frags contained in block */ 125 quad_t id_filesize; /* for DATA nodes, the size of the directory */ 126 int id_loc; /* for DATA nodes, current location in dir */ 127 int id_entryno; /* for DATA nodes, current entry number */ 128 struct direct *id_dirp; /* for DATA nodes, ptr to current entry */ 129 char *id_name; /* for DATA nodes, name to find or enter */ 130 char id_type; /* type of descriptor, DATA or ADDR */ 131}; 132/* file types */ | 125 ufs_daddr_t id_blkno; /* current block number being examined */ 126 int id_numfrags; /* number of frags contained in block */ 127 quad_t id_filesize; /* for DATA nodes, the size of the directory */ 128 int id_loc; /* for DATA nodes, current location in dir */ 129 int id_entryno; /* for DATA nodes, current entry number */ 130 struct direct *id_dirp; /* for DATA nodes, ptr to current entry */ 131 char *id_name; /* for DATA nodes, name to find or enter */ 132 char id_type; /* type of descriptor, DATA or ADDR */ 133}; 134/* file types */ |
133#define DATA 1 134#define ADDR 2 | 135#define DATA 1 /* a directory */ 136#define SNAP 2 /* a snapshot */ 137#define ADDR 3 /* anything but a directory or a snapshot */ |
135 136/* 137 * Linked list of duplicate blocks. 138 * 139 * The list is composed of two parts. The first part of the 140 * list (from duplist through the node pointed to by muldup) 141 * contains a single copy of each duplicate block that has been 142 * found. The second part of the list (from muldup to the end) --- 160 unchanged lines hidden --- | 138 139/* 140 * Linked list of duplicate blocks. 141 * 142 * The list is composed of two parts. The first part of the 143 * list (from duplist through the node pointed to by muldup) 144 * contains a single copy of each duplicate block that has been 145 * found. The second part of the list (from muldup to the end) --- 160 unchanged lines hidden --- |