Deleted Added
full compact
pass2.c (241012) pass2.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[] = "@(#)pass2.c 8.9 (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[] = "@(#)pass2.c 8.9 (Berkeley) 4/28/95";
33#endif /* not lint */
34#endif
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/pass2.c 241012 2012-09-27 23:30:58Z mdf $");
36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/pass2.c 298907 2016-05-02 01:28:21Z araujo $");
37
38#include <sys/param.h>
39#include <sys/sysctl.h>
40
41#include <ufs/ufs/dinode.h>
42#include <ufs/ufs/dir.h>
43#include <ufs/ffs/fs.h>
44

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

177 roundup(inp->i_isize, DIRBLKSIZ));
178 inodirty();
179 }
180 }
181 dp = &dino;
182 memset(dp, 0, sizeof(struct ufs2_dinode));
183 DIP_SET(dp, di_mode, IFDIR);
184 DIP_SET(dp, di_size, inp->i_isize);
37
38#include <sys/param.h>
39#include <sys/sysctl.h>
40
41#include <ufs/ufs/dinode.h>
42#include <ufs/ufs/dir.h>
43#include <ufs/ffs/fs.h>
44

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

177 roundup(inp->i_isize, DIRBLKSIZ));
178 inodirty();
179 }
180 }
181 dp = &dino;
182 memset(dp, 0, sizeof(struct ufs2_dinode));
183 DIP_SET(dp, di_mode, IFDIR);
184 DIP_SET(dp, di_size, inp->i_isize);
185 for (i = 0;
186 i < (inp->i_numblks<NDADDR ? inp->i_numblks : NDADDR);
187 i++)
185 for (i = 0; i < MIN(inp->i_numblks, NDADDR); i++)
188 DIP_SET(dp, di_db[i], inp->i_blks[i]);
189 if (inp->i_numblks > NDADDR)
190 for (i = 0; i < NIADDR; i++)
191 DIP_SET(dp, di_ib[i], inp->i_blks[NDADDR + i]);
192 curino.id_number = inp->i_number;
193 curino.id_parent = inp->i_parent;
194 (void)ckinode(dp, &curino);
195 }

--- 473 unchanged lines hidden ---
186 DIP_SET(dp, di_db[i], inp->i_blks[i]);
187 if (inp->i_numblks > NDADDR)
188 for (i = 0; i < NIADDR; i++)
189 DIP_SET(dp, di_ib[i], inp->i_blks[NDADDR + i]);
190 curino.id_number = inp->i_number;
191 curino.id_parent = inp->i_parent;
192 (void)ckinode(dp, &curino);
193 }

--- 473 unchanged lines hidden ---