Deleted Added
full compact
setup.c (100935) setup.c (101037)
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

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

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static const char sccsid[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95";
37#endif
38static const char rcsid[] =
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

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

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static const char sccsid[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/sbin/fsck_ffs/setup.c 100935 2002-07-30 13:01:25Z phk $";
39 "$FreeBSD: head/sbin/fsck_ffs/setup.c 101037 2002-07-31 12:01:14Z mux $";
40#endif /* not lint */
41
42#define DKTYPENAMES
43#include <sys/param.h>
44#include <sys/stat.h>
45#include <sys/disklabel.h>
46#include <sys/file.h>
47#include <sys/sysctl.h>
48
49#include <ufs/ufs/dinode.h>
50#include <ufs/ffs/fs.h>
51
52#include <ctype.h>
53#include <err.h>
54#include <errno.h>
40#endif /* not lint */
41
42#define DKTYPENAMES
43#include <sys/param.h>
44#include <sys/stat.h>
45#include <sys/disklabel.h>
46#include <sys/file.h>
47#include <sys/sysctl.h>
48
49#include <ufs/ufs/dinode.h>
50#include <ufs/ffs/fs.h>
51
52#include <ctype.h>
53#include <err.h>
54#include <errno.h>
55#include <stdint.h>
55#include <string.h>
56
57#include "fsck.h"
58
59struct bufarea asblk;
60#define altsblock (*asblk.b_un.b_fs)
61#define POWEROF2(num) (((num) & ((num) - 1)) == 0)
62

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

264 }
265 inplast = 0;
266 listmax = numdirs + 10;
267 inpsort = (struct inoinfo **)calloc((unsigned)listmax,
268 sizeof(struct inoinfo *));
269 inphead = (struct inoinfo **)calloc((unsigned)numdirs,
270 sizeof(struct inoinfo *));
271 if (inpsort == NULL || inphead == NULL) {
56#include <string.h>
57
58#include "fsck.h"
59
60struct bufarea asblk;
61#define altsblock (*asblk.b_un.b_fs)
62#define POWEROF2(num) (((num) & ((num) - 1)) == 0)
63

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

265 }
266 inplast = 0;
267 listmax = numdirs + 10;
268 inpsort = (struct inoinfo **)calloc((unsigned)listmax,
269 sizeof(struct inoinfo *));
270 inphead = (struct inoinfo **)calloc((unsigned)numdirs,
271 sizeof(struct inoinfo *));
272 if (inpsort == NULL || inphead == NULL) {
272 printf("cannot alloc %u bytes for inphead\n",
273 (unsigned)numdirs * sizeof(struct inoinfo *));
273 printf("cannot alloc %ju bytes for inphead\n",
274 (uintmax_t)numdirs * sizeof(struct inoinfo *));
274 goto badsb;
275 }
276 bufinit();
277 if (sblock.fs_flags & FS_DOSOFTDEP)
278 usedsoftdep = 1;
279 else
280 usedsoftdep = 0;
281 return (1);

--- 219 unchanged lines hidden ---
275 goto badsb;
276 }
277 bufinit();
278 if (sblock.fs_flags & FS_DOSOFTDEP)
279 usedsoftdep = 1;
280 else
281 usedsoftdep = 0;
282 return (1);

--- 219 unchanged lines hidden ---