Deleted Added
full compact
setup.c (276737) setup.c (298907)
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[] = "@(#)setup.c 8.10 (Berkeley) 5/9/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[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95";
33#endif /* not lint */
34#endif
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/setup.c 276737 2015-01-06 05:28:37Z imp $");
36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/setup.c 298907 2016-05-02 01:28:21Z araujo $");
37
38#include <sys/param.h>
39#include <sys/stat.h>
40#define FSTYPENAMES
41#include <sys/disklabel.h>
42#include <sys/file.h>
43#include <sys/sysctl.h>
44

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

240 asked = 0;
241 sblock.fs_csp = Calloc(1, sblock.fs_cssize);
242 if (sblock.fs_csp == NULL) {
243 printf("cannot alloc %u bytes for cg summary info\n",
244 (unsigned)sblock.fs_cssize);
245 goto badsb;
246 }
247 for (i = 0, j = 0; i < sblock.fs_cssize; i += sblock.fs_bsize, j++) {
37
38#include <sys/param.h>
39#include <sys/stat.h>
40#define FSTYPENAMES
41#include <sys/disklabel.h>
42#include <sys/file.h>
43#include <sys/sysctl.h>
44

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

240 asked = 0;
241 sblock.fs_csp = Calloc(1, sblock.fs_cssize);
242 if (sblock.fs_csp == NULL) {
243 printf("cannot alloc %u bytes for cg summary info\n",
244 (unsigned)sblock.fs_cssize);
245 goto badsb;
246 }
247 for (i = 0, j = 0; i < sblock.fs_cssize; i += sblock.fs_bsize, j++) {
248 size = sblock.fs_cssize - i < sblock.fs_bsize ?
249 sblock.fs_cssize - i : sblock.fs_bsize;
248 size = MIN(sblock.fs_cssize - i, sblock.fs_bsize);
250 readcnt[sblk.b_type]++;
251 if (blread(fsreadfd, (char *)sblock.fs_csp + i,
252 fsbtodb(&sblock, sblock.fs_csaddr + j * sblock.fs_frag),
253 size) != 0 && !asked) {
254 pfatal("BAD SUMMARY INFORMATION");
255 if (reply("CONTINUE") == 0) {
256 ckfini(0);
257 exit(EEXIT);

--- 192 unchanged lines hidden ---
249 readcnt[sblk.b_type]++;
250 if (blread(fsreadfd, (char *)sblock.fs_csp + i,
251 fsbtodb(&sblock, sblock.fs_csaddr + j * sblock.fs_frag),
252 size) != 0 && !asked) {
253 pfatal("BAD SUMMARY INFORMATION");
254 if (reply("CONTINUE") == 0) {
255 ckfini(0);
256 exit(EEXIT);

--- 192 unchanged lines hidden ---