Deleted Added
full compact
pass1.c (256281) pass1.c (260178)
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

--- 19 unchanged lines hidden (view full) ---

28 */
29
30#if 0
31#ifndef lint
32static const char sccsid[] = "@(#)pass1.c 8.6 (Berkeley) 4/28/95";
33#endif /* not lint */
34#endif
35#include <sys/cdefs.h>
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

--- 19 unchanged lines hidden (view full) ---

28 */
29
30#if 0
31#ifndef lint
32static const char sccsid[] = "@(#)pass1.c 8.6 (Berkeley) 4/28/95";
33#endif /* not lint */
34#endif
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: stable/10/sbin/fsck_ffs/pass1.c 248658 2013-03-23 20:00:02Z mckusick $");
36__FBSDID("$FreeBSD: stable/10/sbin/fsck_ffs/pass1.c 260178 2014-01-02 01:44:14Z scottl $");
37
38#include <sys/param.h>
39#include <sys/stat.h>
40#include <sys/sysctl.h>
41
42#include <ufs/ufs/dinode.h>
43#include <ufs/ufs/dir.h>
44#include <ufs/ffs/fs.h>

--- 18 unchanged lines hidden (view full) ---

63 struct inodesc idesc;
64 struct bufarea *cgbp;
65 struct cg *cgp;
66 ino_t inumber, inosused, mininos;
67 ufs2_daddr_t i, cgd;
68 u_int8_t *cp;
69 int c, rebuildcg;
70
37
38#include <sys/param.h>
39#include <sys/stat.h>
40#include <sys/sysctl.h>
41
42#include <ufs/ufs/dinode.h>
43#include <ufs/ufs/dir.h>
44#include <ufs/ffs/fs.h>

--- 18 unchanged lines hidden (view full) ---

63 struct inodesc idesc;
64 struct bufarea *cgbp;
65 struct cg *cgp;
66 ino_t inumber, inosused, mininos;
67 ufs2_daddr_t i, cgd;
68 u_int8_t *cp;
69 int c, rebuildcg;
70
71 badblk = dupblk = lastino = 0;
72
71 /*
72 * Set file system reserved blocks in used block map.
73 */
74 for (c = 0; c < sblock.fs_ncg; c++) {
75 cgd = cgdmin(&sblock, c);
76 if (c == 0) {
77 i = cgbase(&sblock, c);
78 } else

--- 379 unchanged lines hidden (view full) ---

458 pwarn("EXCESSIVE BAD BLKS I=%lu",
459 (u_long)idesc->id_number);
460 if (preen)
461 printf(" (SKIPPING)\n");
462 else if (reply("CONTINUE") == 0) {
463 ckfini(0);
464 exit(EEXIT);
465 }
73 /*
74 * Set file system reserved blocks in used block map.
75 */
76 for (c = 0; c < sblock.fs_ncg; c++) {
77 cgd = cgdmin(&sblock, c);
78 if (c == 0) {
79 i = cgbase(&sblock, c);
80 } else

--- 379 unchanged lines hidden (view full) ---

460 pwarn("EXCESSIVE BAD BLKS I=%lu",
461 (u_long)idesc->id_number);
462 if (preen)
463 printf(" (SKIPPING)\n");
464 else if (reply("CONTINUE") == 0) {
465 ckfini(0);
466 exit(EEXIT);
467 }
468 rerun = 1;
466 return (STOP);
467 }
468 }
469 for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) {
470 if (anyout && chkrange(blkno, 1)) {
471 res = SKIP;
472 } else if (!testbmap(blkno)) {
473 n_blks++;

--- 4 unchanged lines hidden (view full) ---

478 pwarn("EXCESSIVE DUP BLKS I=%lu",
479 (u_long)idesc->id_number);
480 if (preen)
481 printf(" (SKIPPING)\n");
482 else if (reply("CONTINUE") == 0) {
483 ckfini(0);
484 exit(EEXIT);
485 }
469 return (STOP);
470 }
471 }
472 for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) {
473 if (anyout && chkrange(blkno, 1)) {
474 res = SKIP;
475 } else if (!testbmap(blkno)) {
476 n_blks++;

--- 4 unchanged lines hidden (view full) ---

481 pwarn("EXCESSIVE DUP BLKS I=%lu",
482 (u_long)idesc->id_number);
483 if (preen)
484 printf(" (SKIPPING)\n");
485 else if (reply("CONTINUE") == 0) {
486 ckfini(0);
487 exit(EEXIT);
488 }
489 rerun = 1;
486 return (STOP);
487 }
488 new = (struct dups *)Malloc(sizeof(struct dups));
489 if (new == NULL) {
490 pfatal("DUP TABLE OVERFLOW.");
491 if (reply("CONTINUE") == 0) {
492 ckfini(0);
493 exit(EEXIT);
494 }
490 return (STOP);
491 }
492 new = (struct dups *)Malloc(sizeof(struct dups));
493 if (new == NULL) {
494 pfatal("DUP TABLE OVERFLOW.");
495 if (reply("CONTINUE") == 0) {
496 ckfini(0);
497 exit(EEXIT);
498 }
499 rerun = 1;
495 return (STOP);
496 }
497 new->dup = blkno;
498 if (muldup == 0) {
499 duplist = muldup = new;
500 new->next = 0;
501 } else {
502 new->next = muldup->next;

--- 15 unchanged lines hidden ---
500 return (STOP);
501 }
502 new->dup = blkno;
503 if (muldup == 0) {
504 duplist = muldup = new;
505 new->next = 0;
506 } else {
507 new->next = muldup->next;

--- 15 unchanged lines hidden ---