Deleted Added
full compact
mkfs.c (75124) mkfs.c (75377)
1/*
2 * Copyright (c) 1980, 1989, 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 char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
37#endif
38static const char rcsid[] =
1/*
2 * Copyright (c) 1980, 1989, 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 char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/sbin/newfs/mkfs.c 75124 2001-04-03 09:35:36Z bde $";
39 "$FreeBSD: head/sbin/newfs/mkfs.c 75377 2001-04-10 08:38:59Z mckusick $";
40#endif /* not lint */
41
42#include <err.h>
43#include <signal.h>
44#include <string.h>
45#include <stdio.h>
46#include <unistd.h>
47#include <sys/param.h>

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

114extern int opt; /* optimization preference (space or time) */
115extern int density; /* number of bytes per inode */
116extern int maxcontig; /* max contiguous blocks to allocate */
117extern int rotdelay; /* rotational delay between blocks */
118extern int maxbpg; /* maximum blocks per file in a cyl group */
119extern int nrpos; /* # of distinguished rotational positions */
120extern int bbsize; /* boot block size */
121extern int sbsize; /* superblock size */
40#endif /* not lint */
41
42#include <err.h>
43#include <signal.h>
44#include <string.h>
45#include <stdio.h>
46#include <unistd.h>
47#include <sys/param.h>

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

114extern int opt; /* optimization preference (space or time) */
115extern int density; /* number of bytes per inode */
116extern int maxcontig; /* max contiguous blocks to allocate */
117extern int rotdelay; /* rotational delay between blocks */
118extern int maxbpg; /* maximum blocks per file in a cyl group */
119extern int nrpos; /* # of distinguished rotational positions */
120extern int bbsize; /* boot block size */
121extern int sbsize; /* superblock size */
122extern int avgfilesize; /* expected average file size */
123extern int avgfilesperdir; /* expected number of files per directory */
122extern u_long memleft; /* virtual memory available */
123extern caddr_t membase; /* start address of memory based filesystem */
124extern char * filename;
125
126union {
127 struct fs fs;
128 char pad[SBSIZE];
129} fsun;

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

269 */
270 sblock.fs_nsect = nsectors;
271 sblock.fs_ntrak = ntracks;
272 if (sblock.fs_ntrak <= 0)
273 printf("preposterous ntrak %d\n", sblock.fs_ntrak), exit(14);
274 if (sblock.fs_nsect <= 0)
275 printf("preposterous nsect %d\n", sblock.fs_nsect), exit(15);
276 /*
124extern u_long memleft; /* virtual memory available */
125extern caddr_t membase; /* start address of memory based filesystem */
126extern char * filename;
127
128union {
129 struct fs fs;
130 char pad[SBSIZE];
131} fsun;

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

271 */
272 sblock.fs_nsect = nsectors;
273 sblock.fs_ntrak = ntracks;
274 if (sblock.fs_ntrak <= 0)
275 printf("preposterous ntrak %d\n", sblock.fs_ntrak), exit(14);
276 if (sblock.fs_nsect <= 0)
277 printf("preposterous nsect %d\n", sblock.fs_nsect), exit(15);
278 /*
279 * collect and verify the filesystem density info
280 */
281 sblock.fs_avgfilesize = avgfilesize;
282 sblock.fs_avgfpdir = avgfilesperdir;
283 if (sblock.fs_avgfilesize <= 0)
284 printf("illegal expected average file size %d\n",
285 sblock.fs_avgfilesize), exit(14);
286 if (sblock.fs_avgfpdir <= 0)
287 printf("illegal expected number of files per directory %d\n",
288 sblock.fs_avgfpdir), exit(15);
289 /*
277 * collect and verify the block and fragment sizes
278 */
279 sblock.fs_bsize = bsize;
280 sblock.fs_fsize = fsize;
281 if (!POWEROF2(sblock.fs_bsize)) {
282 printf("block size must be a power of 2, not %d\n",
283 sblock.fs_bsize);
284 exit(16);

--- 1248 unchanged lines hidden ---
290 * collect and verify the block and fragment sizes
291 */
292 sblock.fs_bsize = bsize;
293 sblock.fs_fsize = fsize;
294 if (!POWEROF2(sblock.fs_bsize)) {
295 printf("block size must be a power of 2, not %d\n",
296 sblock.fs_bsize);
297 exit(16);

--- 1248 unchanged lines hidden ---