growfs.c (234846) | growfs.c (235079) |
---|---|
1/* 2 * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. 3 * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz 4 * Copyright (c) 2012 The FreeBSD Foundation 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Christoph Herrmann and Thomas-Henning von Kamptz, Munich and Frankfurt. --- 37 unchanged lines hidden (view full) --- 46#ifndef lint 47static const char copyright[] = 48"@(#) Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz\n\ 49Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\ 50All rights reserved.\n"; 51#endif /* not lint */ 52 53#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. 3 * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz 4 * Copyright (c) 2012 The FreeBSD Foundation 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Christoph Herrmann and Thomas-Henning von Kamptz, Munich and Frankfurt. --- 37 unchanged lines hidden (view full) --- 46#ifndef lint 47static const char copyright[] = 48"@(#) Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz\n\ 49Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\ 50All rights reserved.\n"; 51#endif /* not lint */ 52 53#include <sys/cdefs.h> |
54__FBSDID("$FreeBSD: head/sbin/growfs/growfs.c 234846 2012-04-30 16:08:02Z trasz $"); | 54__FBSDID("$FreeBSD: head/sbin/growfs/growfs.c 235079 2012-05-06 11:48:37Z trasz $"); |
55 56#include <sys/param.h> 57#include <sys/ioctl.h> 58#include <sys/stat.h> 59#include <sys/disk.h> 60#include <sys/ucred.h> 61#include <sys/mount.h> 62 --- 1499 unchanged lines hidden (view full) --- 1562 } 1563 1564 /* 1565 * Try to access our new last block in the file system. 1566 */ 1567 testbuf = malloc(sblock.fs_fsize); 1568 if (testbuf == NULL) 1569 err(1, "malloc"); | 55 56#include <sys/param.h> 57#include <sys/ioctl.h> 58#include <sys/stat.h> 59#include <sys/disk.h> 60#include <sys/ucred.h> 61#include <sys/mount.h> 62 --- 1499 unchanged lines hidden (view full) --- 1562 } 1563 1564 /* 1565 * Try to access our new last block in the file system. 1566 */ 1567 testbuf = malloc(sblock.fs_fsize); 1568 if (testbuf == NULL) 1569 err(1, "malloc"); |
1570 rdfs((ufs2_daddr_t)((size / DEV_BSIZE) - sblock.fs_fsize), | 1570 rdfs((ufs2_daddr_t)((size - sblock.fs_fsize) / DEV_BSIZE), |
1571 sblock.fs_fsize, testbuf, fsi); | 1571 sblock.fs_fsize, testbuf, fsi); |
1572 wtfs((ufs2_daddr_t)((size / DEV_BSIZE) - sblock.fs_fsize), | 1572 wtfs((ufs2_daddr_t)((size - sblock.fs_fsize) / DEV_BSIZE), |
1573 sblock.fs_fsize, testbuf, fso, Nflag); 1574 free(testbuf); 1575 1576 /* 1577 * Now calculate new superblock values and check for reasonable 1578 * bound for new file system size: 1579 * fs_size: is derived from user input 1580 * fs_dsize: should get updated in the routines creating or --- 143 unchanged lines hidden --- | 1573 sblock.fs_fsize, testbuf, fso, Nflag); 1574 free(testbuf); 1575 1576 /* 1577 * Now calculate new superblock values and check for reasonable 1578 * bound for new file system size: 1579 * fs_size: is derived from user input 1580 * fs_dsize: should get updated in the routines creating or --- 143 unchanged lines hidden --- |