#include <sys/types.h>#include <sys/dir.h>#include <ctype.h>#include <errno.h>#include <fcntl.h>#include <limits.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <minix/config.h>#include <minix/const.h>#include <minix/type.h>#include "../../servers/fs/const.h"#include "../../servers/fs/inode.h"#include "../../servers/fs/type.h"#include <minix/fslib.h>#include <stdio.h>#include <sys/stat.h>#include <a.out.h>#include <tools.h>#include <dirent.h>#include "../../servers/fs/super.h"Include dependency graph for fsck.c:

Go to the source code of this file.
Data Structures | |
| struct | stack |
Defines | |
| #define | INODES_PER_BLOCK V2_INODES_PER_BLOCK(block_size) |
| #define | INODE_SIZE ((int) V2_INODE_SIZE) |
| #define | WORDS_PER_BLOCK (block_size / (int) sizeof(bitchunk_t)) |
| #define | MAX_ZONES (V2_NR_DZONES+V2_INDIRECTS(block_size)+(long)V2_INDIRECTS(block_size)*V2_INDIRECTS(block_size)) |
| #define | NR_DZONE_NUM V2_NR_DZONES |
| #define | NR_INDIRECTS V2_INDIRECTS(block_size) |
| #define | NR_ZONE_NUMS V2_NR_TZONES |
| #define | ZONE_NUM_SIZE V2_ZONE_NUM_SIZE |
| #define | bit_nr bit_t |
| #define | block_nr block_t |
| #define | d_inode d2_inode |
| #define | d_inum d_ino |
| #define | dir_struct struct direct |
| #define | i_mode d2_mode |
| #define | i_nlinks d2_nlinks |
| #define | i_size d2_size |
| #define | i_zone d2_zone |
| #define | zone_nr zone_t |
| #define | BITSHIFT 4 |
| #define | MAXPRINT 80 |
| #define | CINDIR 128 |
| #define | CDIRECT 1 |
| #define | BITMASK ((1 << BITSHIFT) - 1) |
| #define | WORDOFBIT(b) ((b) >> BITSHIFT) |
| #define | POWEROFBIT(b) (1 << ((int) (b) & BITMASK)) |
| #define | setbit(w, b) (w[WORDOFBIT(b)] |= POWEROFBIT(b)) |
| #define | clrbit(w, b) (w[WORDOFBIT(b)] &= ~POWEROFBIT(b)) |
| #define | bitset(w, b) (w[WORDOFBIT(b)] & POWEROFBIT(b)) |
| #define | ZONE_CT 360 |
| #define | INODE_CT 95 |
| #define | STICKY_BIT 01000 |
| #define | ztob(z) ((block_nr) (z) << sb.s_log_zone_size) |
| #define | btoa(b) ((long) (b) * block_size) |
| #define | SCALE ((int) ztob(1)) |
| #define | FIRST ((zone_nr) sb.s_firstdatazone) |
| #define | N_IMAP (sb.s_imap_blocks) |
| #define | N_ZMAP (sb.s_zmap_blocks) |
| #define | N_ILIST ((sb.s_ninodes+INODES_PER_BLOCK-1) / INODES_PER_BLOCK) |
| #define | N_DATA (sb.s_zones - FIRST) |
| #define | OFFSET_SUPER_BLOCK SUPER_BLOCK_BYTES |
| #define | BLK_IMAP 2 |
| #define | BLK_ZMAP (BLK_IMAP + N_IMAP) |
| #define | BLK_ILIST (BLK_ZMAP + N_ZMAP) |
| #define | BLK_FIRST ztob(FIRST) |
| #define | ZONE_SIZE ((int) ztob(block_size)) |
| #define | NLEVEL (NR_ZONE_NUMS - NR_DZONE_NUM + 1) |
| #define | zaddr(z) btoa(ztob(z)) |
| #define | cinoaddr(i) ((long) (i - 1) * INODE_SIZE + (long) btoa(BLK_ILIST)) |
| #define | INDCHUNK ((int) (CINDIR * ZONE_NUM_SIZE)) |
| #define | DIRCHUNK ((int) (CDIRECT * DIR_ENTRY_SIZE)) |
| #define | DOT 1 |
| #define | DOTDOT 2 |
Functions | |
| _PROTOTYPE (int main,(int argc, char **argv)) | |
| _PROTOTYPE (void initvars,(void)) | |
| _PROTOTYPE (void fatal,(char *s)) | |
| _PROTOTYPE (int eoln,(int c)) | |
| _PROTOTYPE (int yes,(char *question)) | |
| _PROTOTYPE (int atoo,(char *s)) | |
| _PROTOTYPE (int input,(char *buf, int size)) | |
| _PROTOTYPE (char *alloc,(unsigned nelem, unsigned elsize)) | |
| _PROTOTYPE (void printrec,(struct stack *sp)) | |
| _PROTOTYPE (void printpath,(int mode, int nlcr)) | |
| _PROTOTYPE (void devio,(block_nr bno, int dir)) | |
| _PROTOTYPE (void devread,(long offset, char *buf, int size)) | |
| _PROTOTYPE (void pr,(char *fmt, int cnt, char *s, char *p)) | |
| _PROTOTYPE (void lpr,(char *fmt, long cnt, char *s, char *p)) | |
| _PROTOTYPE (bit_nr getnumber,(char *s)) | |
| _PROTOTYPE (char **getlist,(char ***argv, char *type)) | |
| _PROTOTYPE (void lsi,(char **clist)) | |
| _PROTOTYPE (bitchunk_t *allocbitmap,(int nblk)) | |
| _PROTOTYPE (void loadbitmap,(bitchunk_t *bitmap, block_nr bno, int nblk)) | |
| _PROTOTYPE (void fillbitmap,(bitchunk_t *bitmap, bit_nr lwb, bit_nr upb, char **list)) | |
| _PROTOTYPE (void freebitmap,(bitchunk_t *p)) | |
| _PROTOTYPE (void chkword,(unsigned w1, unsigned w2, bit_nr bit, char *type, int *n, int *report, bit_t)) | |
| _PROTOTYPE (void chkmap,(bitchunk_t *cmap, bitchunk_t *dmap, bit_nr bit, block_nr blkno, int nblk, char *type)) | |
| _PROTOTYPE (void counterror,(Ino_t ino)) | |
| _PROTOTYPE (void printperm,(mode_t mode, int shift, int special, int overlay)) | |
| _PROTOTYPE (void list,(Ino_t ino, d_inode *ip)) | |
| _PROTOTYPE (int Remove,(dir_struct *dp)) | |
| _PROTOTYPE (void make_printable_name,(char *dst, char *src, int n)) | |
| _PROTOTYPE (int chkdots,(Ino_t ino, off_t pos, dir_struct *dp, Ino_t exp)) | |
| _PROTOTYPE (int chkname,(Ino_t ino, dir_struct *dp)) | |
| _PROTOTYPE (int chkentry,(Ino_t ino, off_t pos, dir_struct *dp)) | |
| _PROTOTYPE (int chkdirzone,(Ino_t ino, d_inode *ip, off_t pos, zone_nr zno)) | |
| _PROTOTYPE (void errzone,(char *mess, zone_nr zno, int level, off_t pos)) | |
| _PROTOTYPE (int markzone,(zone_nr zno, int level, off_t pos)) | |
| _PROTOTYPE (int chkindzone,(Ino_t ino, d_inode *ip, off_t *pos, zone_nr zno, int level)) | |
| _PROTOTYPE (off_t jump,(int level)) | |
| _PROTOTYPE (int chkzones,(Ino_t ino, d_inode *ip, off_t *pos, zone_nr *zlist, int len, int level)) | |
| _PROTOTYPE (int chkfile,(Ino_t ino, d_inode *ip)) | |
| _PROTOTYPE (void chkdev,(char *f, char **clist, char **ilist, char **zlist)) | |
| void | initvars () |
| void | fatal (char *s) |
| int | eoln (int c) |
| int | yes (char *question) |
| int | atoo (char *s) |
| int | input (char *buf, int size) |
| char * | alloc (unsigned nelem, unsigned elsize) |
| void | printname (char *s) |
| void | printrec (struct stack *sp) |
| void | printpath (int mode, int nlcr) |
| void | devopen () |
| void | devclose () |
| void | devio (block_nr bno, int dir) |
| void | devread (long offset, char *buf, int size) |
| void | devwrite (long offset, char *buf, int size) |
| void | pr (char *fmt, int cnt, char *s, char *p) |
| void | lpr (char *fmt, long cnt, char *s, char *p) |
| bit_nr | getnumber (char *s) |
| char ** | getlist (char ***argv, char *type) |
| void | lsuper () |
| void | getsuper () |
| void | chksuper () |
| int | inoaddr (int inn) |
| void | lsi (char **clist) |
| bitchunk_t * | allocbitmap (int nblk) |
| void | loadbitmap (bitchunk_t *bitmap, block_nr bno, int nblk) |
| void | dumpbitmap (bitchunk_t *bitmap, block_nr bno, int nblk) |
| void | fillbitmap (bitchunk_t *bitmap, bit_nr lwb, bit_nr upb, char **list) |
| void | freebitmap (bitchunk_t *p) |
| void | getbitmaps () |
| void | putbitmaps () |
| void | chkword (unsigned w1, unsigned w2, bit_nr bit, char *type, int *n, int *report, bit_nr phys) |
| void | chkmap (bitchunk_t *cmap, bitchunk_t *dmap, bit_nr bit, block_nr blkno, int nblk, char *type) |
| void | chkilist () |
| void | getcount () |
| void | counterror (ino_t ino) |
| void | chkcount () |
| void | freecount () |
| void | printperm (mode_t mode, int shift, int special, int overlay) |
| void | list (ino_t ino, d_inode *ip) |
| int | Remove (dir_struct *dp) |
| void | make_printable_name (char *dst, char *src, int n) |
| int | chkdots (ino_t ino, off_t pos, dir_struct *dp, ino_t exp) |
| int | chkname (ino_t ino, dir_struct *dp) |
| int | chkentry (ino_t ino, off_t pos, dir_struct *dp) |
| int | chkdirzone (ino_t ino, d_inode *ip, off_t pos, zone_nr zno) |
| int | chksymlinkzone (ino_t ino, d_inode *ip, off_t pos, zone_nr zno) |
| void | errzone (char *mess, zone_nr zno, int level, off_t pos) |
| int | markzone (zone_nr zno, int level, off_t pos) |
| int | chkindzone (ino_t ino, d_inode *ip, off_t *pos, zone_nr zno, int level) |
| off_t | jump (int level) |
| int | zonechk (ino_t ino, d_inode *ip, off_t *pos, zone_nr zno, int level) |
| int | chkzones (ino_t ino, d_inode *ip, off_t *pos, zone_nr *zlist, int len, int level) |
| int | chkfile (ino_t ino, d_inode *ip) |
| int | chkdirectory (ino_t ino, d_inode *ip) |
| int | chkspecial (ino_t ino, d_inode *ip) |
| int | chkmode (ino_t ino, d_inode *ip) |
| int | chkinode (ino_t ino, d_inode *ip) |
| int | descendtree (dir_struct *dp) |
| void | chktree () |
| void | printtotal () |
| void | chkdev (char *f, char **clist, char **ilist, char **zlist) |
| int | main (int argc, char **argv) |
Variables | |
| unsigned int | fs_version = 2 |
| unsigned int | block_size = 0 |
| static struct super_block | sb |
| char * | prog |
| char * | fsck_device |
| int | firstcnterr |
| bitchunk_t * | imap |
| bitchunk_t * | spec_imap |
| bitchunk_t * | zmap |
| bitchunk_t * | spec_zmap |
| bitchunk_t * | dirmap |
| char * | rwbuf |
| block_nr | thisblk |
| char * | nullbuf |
| nlink_t * | count |
| int | changed |
| stack * | ftop |
| int | dev |
| int | nfreeinode |
| int | nregular |
| int | ndirectory |
| int | nblkspec |
| int | ncharspec |
| int | nbadinode |
| int | npipe |
| int | nsyml |
| int | ztype [NLEVEL] |
| long | nfreezone |
| int | repair |
| int | automatic |
| int | listing |
| int | listsuper |
| int | firstlist |
| unsigned | part_offset |
| char | answer [] = "Answer questions with y or n. Then hit RETURN" |
|
|
Definition at line 11 of file fsck.c. Referenced by chkdev(), chkdirectory(), chkdots(), chkentry(), chkilist(), chkinode(), chkmap(), chkname(), chksymlinkzone(), counterror(), descendtree(), fillbitmap(), getnumber(), lsi(), markzone(), mini_receive(), and Remove(). |
|
|
|
|
|
Definition at line 85 of file fsck.c. Referenced by ajar(), chkentry(), chkilist(), dead(), descendtree(), edible(), hinged(), living(), locked(), locks(), markzone(), opaque(), outside(), plural(), portal(), printed(), small(), treasr(), vessel(), wearng(), and worn(). |
|
|
Definition at line 64 of file fsck.c. Referenced by main(). |
|
|
|
|
|
Definition at line 113 of file fsck.c. Referenced by chksuper(). |
|
|
Definition at line 111 of file fsck.c. Referenced by chkdev(). |
|
|
Definition at line 112 of file fsck.c. Referenced by chkdev(). |
|
|
Definition at line 12 of file fsck.c. Referenced by chksuper(), devread(), and devwrite(). |
|
|
Definition at line 99 of file fsck.c. Referenced by devio(), dumpbitmap(), getsuper(), loadbitmap(), and lsuper(). |
|
|
Definition at line 68 of file fsck.c. Referenced by chkdirzone(). |
|
|
Definition at line 67 of file fsck.c. Referenced by chkindzone(). |
|
|
Definition at line 120 of file fsck.c. Referenced by inoaddr(). |
|
|
Definition at line 84 of file fsck.c. Referenced by counterror(), and descendtree(). |
|
|
Definition at line 13 of file fsck.c. Referenced by counterror(), descendtree(), and lsi(). |
|
|
|
|
|
Definition at line 15 of file fsck.c. Referenced by chkdirzone(), chkentry(), chktree(), descendtree(), and Remove(). |
|
|
Definition at line 122 of file fsck.c. Referenced by chkdirzone(). |
|
|
|
|
|
Definition at line 143 of file fsck.c. Referenced by chkdirectory(), and chkentry(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 18 of file fsck.c. Referenced by chkindzone(), freesp_inode(), plan_a(), rahead(), re_input(), and truncate_inode(). |
|
|
|
|
|
Definition at line 121 of file fsck.c. Referenced by chkindzone(). |
|
|
|
|
|
Definition at line 4 of file fsck.c. Referenced by chkilist(), chksymlinkzone(), counterror(), descendtree(), and lsi(). |
|
|
|
|
|
Definition at line 6 of file fsck.c. Referenced by chksuper(). |
|
|
|
|
|
|
|
|
Definition at line 106 of file fsck.c. Referenced by chksuper(). |
|
|
Definition at line 104 of file fsck.c. Referenced by chkdev(), and getbitmaps(). |
|
|
Definition at line 105 of file fsck.c. Referenced by chkdev(), and getbitmaps(). |
|
|
Definition at line 116 of file fsck.c. Referenced by initvars(). |
|
|
Definition at line 7 of file fsck.c. Referenced by chkfile(). |
|
|
Definition at line 8 of file fsck.c. Referenced by chkindzone(), and jump(). |
|
|
Definition at line 9 of file fsck.c. Referenced by chkfile(), and chkspecial(). |
|
|
Definition at line 110 of file fsck.c. Referenced by getsuper(), and lsuper(). |
|
|
|
|
|
Definition at line 100 of file fsck.c. Referenced by chkdirzone(), and chksuper(). |
|
|
Definition at line 83 of file fsck.c. Referenced by chkdirectory(), chkdots(), chkinode(), chkname(), chksymlinkzone(), descendtree(), dodash(), fillbitmap(), lsi(), markzone(), and Remove(). |
|
|
Definition at line 93 of file fsck.c. Referenced by list(). |
|
|
|
|
|
Definition at line 5 of file fsck.c. Referenced by chkmap(), dumpbitmap(), and loadbitmap(). |
|
|
Definition at line 119 of file fsck.c. Referenced by chkdirzone(), chkindzone(), and chksymlinkzone(). |
|
|
|
|
|
Definition at line 20 of file fsck.c. Referenced by chkfile(), and chkindzone(). |
|
|
|
|
|
Definition at line 115 of file fsck.c. Referenced by jump(), printtotal(), and zonechk(). |
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 312 of file fsck.c. References fatal(), fprintf(), malloc(), memset(), p, and stderr. |
|
|
Definition at line 644 of file fsck.c. References alloc(), bitmap, and block_size. Referenced by getbitmaps(). |
|
|
Definition at line 273 of file fsck.c. References n. Referenced by lsi(). |
|
|
Definition at line 837 of file fsck.c. References count, counterror(), firstcnterr, printf, super_block::s_ninodes, and sb. Referenced by chkdev(). |
|
||||||||||||||||||||
|
Definition at line 1504 of file fsck.c. References _MAX_BLOCK_SIZE, automatic, bit_nr, BLK_IMAP, BLK_ZMAP, block_size, changed, chkcount(), chkilist(), chkmap(), chksuper(), chktree(), devclose(), devopen(), fatal(), fillbitmap(), FIRST, freecount(), fsck_device, getbitmaps(), getcount(), getsuper(), imap, initvars(), lsi(), malloc(), memset(), N_IMAP, N_ZMAP, nullbuf, printf, printtotal(), putbitmaps(), repair, rwbuf, super_block::s_ninodes, super_block::s_zones, sb, spec_imap, spec_zmap, and zmap. Referenced by main(). |
|
||||||||||||
|
Definition at line 1292 of file fsck.c. References bit_nr, chkfile(), dirmap, DOT, DOTDOT, ftop, ok(), printf, printpath(), setbit, and stack::st_presence. Referenced by chkmode(). |
|
||||||||||||||||||||
|
Definition at line 1077 of file fsck.c. References block_size, CDIRECT, devread(), devwrite(), DIR_ENTRY_SIZE, dir_struct, DIRCHUNK, dirty, n, NO_ENTRY, NR_DIR_ENTRIES, offset, SCALE, size, and zaddr. |
|
||||||||||||||||||||
|
Definition at line 961 of file fsck.c. References bit_nr, count, DIR_ENTRY_SIZE, make_printable_name(), printf, printpath(), setbit, spec_imap, and yes(). Referenced by chkentry(). |
|
||||||||||||||||
|
Definition at line 1026 of file fsck.c. References bit_nr, bitset, chkdots(), chkname(), count, descendtree(), dir_struct, dirmap, DOT, DOTDOT, ftop, memset(), printf, printname(), printpath(), Remove(), ROOT_INODE, super_block::s_ninodes, sb, SHRT_MAX, stack::st_dir, stack::st_next, stack::st_presence, strcmp, and yes(). |
|
||||||||||||
|
Definition at line 1278 of file fsck.c. References chkzones(), NR_DZONE_NUM, NR_ZONE_NUMS, ok(), and pos. Referenced by chkdirectory(), and chkmode(). |
|
|
Definition at line 782 of file fsck.c. References bit_nr, bitset, devread(), devwrite(), I_NOT_ALLOC, imap, inoaddr, INODE_SIZE, nullbuf, printf, super_block::s_ninodes, sb, and yes(). Referenced by chkdev(). |
|
||||||||||||||||||||||||
|
Definition at line 1195 of file fsck.c. References chkzones(), CINDIR, devread(), i_size, INDCHUNK, n, NR_INDIRECTS, offset, zaddr, and zone_nr. Referenced by zonechk(). |
|
||||||||||||
|
Definition at line 1399 of file fsck.c. References bit_nr, chkmode(), count, fatal(), I_DIRECTORY, I_TYPE, imap, nfreeinode, printf, printpath(), ROOT_INODE, setbit, SHRT_MAX, and spec_imap. Referenced by descendtree(). |
|
||||||||||||||||||||||||||||
|
Definition at line 753 of file fsck.c. References automatic, bit_nr, chkword(), dumpbitmap(), loadbitmap(), MAXPRINT, p, printf, repair, report(), WORDS_PER_BLOCK, and yes(). Referenced by chkdev(). |
|
||||||||||||
|
Definition at line 1364 of file fsck.c. References chkdirectory(), chkfile(), chkspecial(), I_BLOCK_SPECIAL, I_CHAR_SPECIAL, I_DIRECTORY, I_NAMED_PIPE, I_REGULAR, I_SYMBOLIC_LINK, I_TYPE, nbadinode, nblkspec, ncharspec, ndirectory, npipe, nregular, nsyml, printf, and printpath(). Referenced by chkinode(). |
|
||||||||||||
|
Definition at line 996 of file fsck.c. References bit_nr, n, p, printf, printname(), printpath(), Remove(), setbit, and spec_imap. Referenced by chkentry(). |
|
||||||||||||
|
Definition at line 1337 of file fsck.c. References NO_DEV, NO_ZONE, NR_ZONE_NUMS, printf, and printpath(). Referenced by chkmode(). |
|
|
Definition at line 560 of file fsck.c. References bitmapsize(), BLK_ILIST, block_nr, block_size, fatal(), if(), long(), MAX_FILE_POS, MAX_ZONES, maxsize, n, N_ILIST, pr(), printf, super_block::s_firstdatazone, super_block::s_imap_blocks, super_block::s_log_zone_size, super_block::s_magic, super_block::s_max_size, super_block::s_ninodes, super_block::s_zmap_blocks, super_block::s_zones, sb, SCALE, SUPER_V2, and SUPER_V3. Referenced by chkdev(). |
|
||||||||||||||||||||
|
Definition at line 1117 of file fsck.c. References bit_nr, devread(), devwrite(), fatal(), inoaddr, INODE_SIZE, offset, PATH_MAX, printf, printpath(), setbit, spec_imap, strlen(), target, yes(), and zaddr. |
|
|
Definition at line 1464 of file fsck.c. References descendtree(), dir_struct, fatal(), N_DATA, nfreeinode, nfreezone, putchar, ROOT_INODE, super_block::s_ninodes, and sb. Referenced by chkdev(). |
|
||||||||||||||||||||||||||||||||
|
Definition at line 732 of file fsck.c. References automatic, MAXPRINT, printf, repair, and yes(). Referenced by chkmap(). |
|
||||||||||||||||||||||||||||
|
Definition at line 1252 of file fsck.c. References i, jump, markzone(), NO_ZONE, and ok(). Referenced by chkfile(), and chkindzone(). |
|
|
Definition at line 808 of file fsck.c. References bit_nr, clrbit, count, d_inode, devread(), devwrite(), fatal(), firstcnterr, I_NOT_ALLOC, imap, inoaddr, INODE_SIZE, printf, and yes(). Referenced by chkcount(). |
|
|
Definition at line 1428 of file fsck.c. References bit_nr, bitset, chkinode(), clrbit, count, d_inode, devread(), devwrite(), dir_struct, ftop, imap, inoaddr, INODE_SIZE, list, listing, memset(), nullbuf, printf, printpath(), setbit, spec_imap, stack::st_dir, stack::st_next, and yes(). Referenced by chkentry(), and chktree(). |
|
|
Definition at line 384 of file fsck.c. References close, dev, fatal(), and perror(). Referenced by chkdev(). |
|
||||||||||||
|
Definition at line 393 of file fsck.c. References block_size, btoa, dev, errno, fatal(), lseek, memset(), printf, prog, read, READING, rwbuf, SEEK_SET, thisblk, and write. Referenced by devread(), and devwrite(). |
|
|
Definition at line 375 of file fsck.c. References dev, fatal(), fsck_device, O_RDONLY, O_RDWR, open, perror(), and repair. Referenced by chkdev(). |
|
||||||||||||||||
|
Definition at line 424 of file fsck.c. References block_nr, block_size, devio(), fatal(), memmove(), READING, and rwbuf. Referenced by chkdirzone(), chkilist(), chkindzone(), chksymlinkzone(), counterror(), descendtree(), getsuper(), loadbitmap(), and lsi(). |
|
||||||||||||||||
|
Definition at line 435 of file fsck.c. References block_nr, block_size, changed, devio(), fatal(), memmove(), READING, repair, rwbuf, and WRITING. Referenced by chkdirzone(), chkilist(), chksymlinkzone(), counterror(), descendtree(), dumpbitmap(), lsi(), and lsuper(). |
|
||||||||||||||||
|
Definition at line 670 of file fsck.c. References block_size, btoa, devwrite(), i, p, and WORDS_PER_BLOCK. Referenced by chkmap(). |
|
|
Definition at line 242 of file fsck.c. References EOF. |
|
||||||||||||||||||||
|
Definition at line 1148 of file fsck.c. References printf, and printpath(). Referenced by markzone(). |
|
|
|
|
||||||||||||||||||||
|
Definition at line 683 of file fsck.c. References bit_nr, getnumber(), NO_BIT, printf, setbit, and spec_imap. Referenced by chkdev(). |
|
|
Definition at line 703 of file fsck.c. References free. Referenced by putbitmaps(). |
|
|
Definition at line 847 of file fsck.c. Referenced by chkdev(). |
|
|
Definition at line 710 of file fsck.c. References allocbitmap(), dirmap, imap, N_IMAP, N_ZMAP, spec_imap, spec_zmap, and zmap. Referenced by chkdev(). |
|
|
Definition at line 802 of file fsck.c. References alloc(), count, super_block::s_ninodes, and sb. Referenced by chkdev(). |
|
||||||||||||
|
Definition at line 478 of file fsck.c. References getnumber(), NO_BIT, NULL, and printf. Referenced by main(). |
|
|
Definition at line 465 of file fsck.c. References bit_nr, isdigit, n, NO_BIT, and NULL. Referenced by fillbitmap(), getlist(), and lsi(). |
|
|
Definition at line 529 of file fsck.c. References block_size, dev, fatal(), fs_version, listsuper, lseek, lsuper(), OFFSET_SUPER_BLOCK, perror(), read, sb, SEEK_SET, SUPER_MAGIC, SUPER_V2, and SUPER_V3. Referenced by chkdev(). |
|
|
Definition at line 221 of file fsck.c. References changed, firstcnterr, firstlist, nbadinode, nblkspec, ncharspec, ndirectory, NLEVEL, NO_BLOCK, npipe, nregular, nsyml, thisblk, and ztype. Referenced by chkdev(). |
|
|
|
|
||||||||||||
|
Definition at line 286 of file fsck.c. References eoln(), fflush(), getchar, p, printf, repair, and stdout. |
|
|
Definition at line 1217 of file fsck.c. References NR_INDIRECTS, and ZONE_SIZE. |
|
||||||||||||
|
Definition at line 873 of file fsck.c. References firstlist, I_BLOCK_SPECIAL, I_CHAR_SPECIAL, I_DIRECTORY, I_NAMED_PIPE, I_REGULAR, I_SET_GID_BIT, I_SET_UID_BIT, I_SYMBOLIC_LINK, I_TYPE, MAJOR, MINOR, printf, printpath(), printperm(), putchar, and STICKY_BIT. |
|
||||||||||||||||
|
Definition at line 655 of file fsck.c. References block_size, btoa, devread(), i, p, and WORDS_PER_BLOCK. Referenced by chkmap(). |
|
||||||||||||||||||||
|
Definition at line 457 of file fsck.c. References printf. Referenced by printtotal(). |
|
|
Definition at line 614 of file fsck.c. References atol(), atoo(), bit_nr, d_inode, devread(), devwrite(), getnumber(), inoaddr, INODE_SIZE, input, NO_BIT, printf, setbit, spec_imap, and yes(). Referenced by chkdev(). |
|
|
Definition at line 498 of file fsck.c. References atol(), devwrite(), exit(), input, OFFSET_SUPER_BLOCK, printf, repair, super_block::s_block_size, super_block::s_firstdatazone, super_block::s_imap_blocks, super_block::s_log_zone_size, super_block::s_max_size, super_block::s_ninodes, super_block::s_zmap_blocks, super_block::s_zones, sb, and yes(). Referenced by getsuper(). |
|
||||||||||||
|
Definition at line 1546 of file fsck.c. References arg, automatic, BITSHIFT, chkdev(), exit(), getlist(), listing, listsuper, printf, prog, repair, and sync. |
|
||||||||||||||||
|
Definition at line 925 of file fsck.c. Referenced by chkdots(). |
|
||||||||||||||||
|
Definition at line 1169 of file fsck.c. References bit_nr, bitset, errzone(), FIRST, nfreezone, super_block::s_zones, sb, setbit, spec_zmap, zmap, and ztype. Referenced by chkzones(). |
|
||||||||||||||||||||
|
Definition at line 449 of file fsck.c. References printf. Referenced by chksuper(), evaluate(), explode(), newrule(), printtotal(), and splitenv(). |
|
|
Definition at line 327 of file fsck.c. References c, isprint, n, and putchar. Referenced by chkentry(), chkname(), print1(), and printrec(). |
|
||||||||||||
|
Definition at line 355 of file fsck.c. References ftop, printf, printrec(), putchar, stack::st_dir, and stack::st_next. Referenced by chkdirectory(), chkdots(), chkentry(), chkinode(), chkmode(), chkname(), chkspecial(), chksymlinkzone(), descendtree(), errzone(), and list(). |
|
||||||||||||||||||||
|
Definition at line 853 of file fsck.c. References putchar, R_BIT, W_BIT, and X_BIT. Referenced by list(). |
|
|
Definition at line 344 of file fsck.c. References printname(), and putchar. Referenced by printpath(), and printrec(). |
|
|
Definition at line 1477 of file fsck.c. References block_size, lpr(), nbadinode, nblkspec, ncharspec, ndirectory, nfreeinode, nfreezone, npipe, nregular, nsyml, pr(), printf, and ZONE_SIZE. Referenced by chkdev(). |
|
|
Definition at line 720 of file fsck.c. References dirmap, freebitmap(), imap, spec_imap, spec_zmap, and zmap. Referenced by chkdev(). |
|
|
Definition at line 912 of file fsck.c. References bit_nr, count, dir_struct, memset(), setbit, spec_imap, and yes(). Referenced by chkentry(), chkname(), test03(), test04(), and test10(). |
|
|
Definition at line 249 of file fsck.c. References automatic, c, eoln(), exit(), fflush(), getchar, printf, repair, and stdout. |
|
||||||||||||||||||||||||
|
Definition at line 1231 of file fsck.c. References chkindzone(), I_DIRECTORY, I_SYMBOLIC_LINK, I_TYPE, and ZONE_SIZE. |
|
|
Definition at line 153 of file fsck.c. Referenced by add(), ask(), do_extract_currentfile(), execute(), getinfo(), ListHosts(), master(), and yes(). |
|
|
Definition at line 150 of file fsck.c. Referenced by chkdev(), chkmap(), chkword(), main(), and yes(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 128 of file fsck.c. Referenced by chkdirectory(), chkentry(), getbitmaps(), and putbitmaps(). |
|
|
Definition at line 125 of file fsck.c. Referenced by chkcount(), counterror(), and initvars(). |
|
|
Definition at line 151 of file fsck.c. Referenced by initvars(), and list(). |
|
|
Definition at line 62 of file fsck.c. Referenced by add_zone(), alloc_inode(), enter_dir(), getsuper(), incr_link(), incr_size(), main(), print_fs(), and super(). |
|
|
|
|
|
Referenced by chkdirectory(), chkentry(), descendtree(), and printpath(). |
|
|
Definition at line 126 of file fsck.c. Referenced by chkdev(), chkilist(), chkinode(), counterror(), descendtree(), getbitmaps(), and putbitmaps(). |
|
|
Definition at line 150 of file fsck.c. Referenced by descendtree(), and main(). |
|
|
Definition at line 150 of file fsck.c. Referenced by getsuper(), and main(). |
|
|
Definition at line 146 of file fsck.c. Referenced by chkmode(), initvars(), and printtotal(). |
|
|
Definition at line 146 of file fsck.c. Referenced by chkmode(), initvars(), and printtotal(). |
|
|
Definition at line 146 of file fsck.c. Referenced by chkmode(), initvars(), and printtotal(). |
|
|
Definition at line 146 of file fsck.c. Referenced by chkmode(), initvars(), and printtotal(). |
|
|
Definition at line 146 of file fsck.c. Referenced by chkinode(), chktree(), and printtotal(). |
|
|
Definition at line 148 of file fsck.c. Referenced by chktree(), markzone(), and printtotal(). |
|
|
Definition at line 147 of file fsck.c. Referenced by chkmode(), initvars(), pipeline(), and printtotal(). |
|
|
Definition at line 146 of file fsck.c. Referenced by chkmode(), initvars(), and printtotal(). |
|
|
Definition at line 147 of file fsck.c. Referenced by chkmode(), initvars(), and printtotal(). |
|
|
Definition at line 131 of file fsck.c. Referenced by chkdev(), chkilist(), and descendtree(). |
|
|
|
|
|
|
|
|
Definition at line 150 of file fsck.c. Referenced by chkdev(), chkmap(), chkword(), devopen(), devwrite(), input(), lsuper(), main(), and yes(). |
|
|
Definition at line 129 of file fsck.c. Referenced by chkdev(), devio(), devread(), and devwrite(). |
|
|
Definition at line 91 of file fsck.c. Referenced by check_mtab(), chk_path(), chk_same(), chkcount(), chkdev(), chkentry(), chkilist(), chksuper(), chktree(), copy(), cp_file(), d_ncols(), dev_up(), doit(), e_backc(), e_getc(), e_peekc(), e_putc(), e_search(), e_sputz(), ed_insert(), empty_indir(), ex_alldot(), ex_gobol(), ex_goeol(), ex_gonl(), ex_gopl(), execvp(), extract(), f_twords(), fts_safe_changedir(), fts_stat(), geometry(), get_inode(), getcount(), getsuper(), kbd_send(), lnk_creat(), lsuper(), main(), mainSort(), markzone(), mk_link(), mkpath(), mode(), node_creat(), printit(), rd_wrfile(), readfs(), sb_close(), sb_clrovw(), sb_cpyn(), sb_killn(), sb_rdelc(), sb_rewind(), sb_seek(), sb_setovw(), sb_sins(), sb_tell(), sb_ztell(), sbe_sbs(), sbx_next(), sbx_norm(), sbx_ready(), sbx_sbrdy(), sbx_smdisc(), sbx_xcis(), scan_keyboard(), sctrin(), set_crc(), set_ftime(), unlnk_exist(), and wr_rdfile(). |
|
|
Definition at line 126 of file fsck.c. Referenced by chkdev(), chkdots(), chkinode(), chkname(), chksymlinkzone(), descendtree(), fillbitmap(), getbitmaps(), lsi(), putbitmaps(), and Remove(). |
|
|
Definition at line 127 of file fsck.c. Referenced by chkdev(), getbitmaps(), markzone(), and putbitmaps(). |
|
|
Definition at line 130 of file fsck.c. Referenced by devio(), and initvars(). |
|
|
Definition at line 127 of file fsck.c. Referenced by chkdev(), getbitmaps(), markzone(), and putbitmaps(). |
|
|
Definition at line 147 of file fsck.c. Referenced by initvars(), markzone(), proc_ind(), and rw_data_zones(). |
1.4.6