summaryrefslogtreecommitdiffstats
path: root/sbin/growfs
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2015-05-27 01:19:58 +0000
committersjg <sjg@FreeBSD.org>2015-05-27 01:19:58 +0000
commit65145fa4c81da358fcbc3b650156dab705dfa34e (patch)
tree55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /sbin/growfs
parent60ff4eb0dff94a04d75d0d52a3957aaaf5f8c693 (diff)
parente6b664c390af88d4a87208bc042ce503da664c3b (diff)
downloadFreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.zip
FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.tar.gz
Merge sync of head
Diffstat (limited to 'sbin/growfs')
-rw-r--r--sbin/growfs/Makefile11
-rw-r--r--sbin/growfs/growfs.814
-rw-r--r--sbin/growfs/growfs.c4
3 files changed, 15 insertions, 14 deletions
diff --git a/sbin/growfs/Makefile b/sbin/growfs/Makefile
index 025771f..e7017a7 100644
--- a/sbin/growfs/Makefile
+++ b/sbin/growfs/Makefile
@@ -4,8 +4,6 @@
# $FreeBSD$
#
-#GFSDBG=
-
.include <src.opts.mk>
.PATH: ${.CURDIR}/../mount
@@ -16,14 +14,15 @@ MAN= growfs.8
CFLAGS+=-I${.CURDIR}/../mount
.if defined(GFSDBG)
-SRCS+= debug.c
+SRCS+= debug.c
+CFLAGS+= -DFS_DEBUG
+NO_WCAST_ALIGN= yes
.endif
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
-.include <bsd.prog.mk>
+.include <bsd.prog.mk>
diff --git a/sbin/growfs/growfs.8 b/sbin/growfs/growfs.8
index 0dab89f..42dc530 100644
--- a/sbin/growfs/growfs.8
+++ b/sbin/growfs/growfs.8
@@ -37,7 +37,7 @@
.\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $
.\" $FreeBSD$
.\"
-.Dd November 26, 2013
+.Dd November 20, 2014
.Dt GROWFS 8
.Os
.Sh NAME
@@ -96,12 +96,14 @@ This value defaults to the size of the raw partition specified in
will enlarge the file system to the size of the entire partition).
.El
.Sh EXAMPLES
-.Dl growfs -s 2G /dev/ada0p1
+Expand root file system to fill up available space:
+.Dl growfs /
.Pp
-will enlarge
+Resize
.Pa /dev/ada0p1
-up to 2GB if there is enough space in
-.Pa /dev/ada0p1 .
+partition to 2GB and expand the file system:
+.Dl gpart resize -i 1 -s 2G ada0
+.Dl growfs -s 2G /dev/ada0p1
.Sh SEE ALSO
.Xr dumpfs 8 ,
.Xr ffsinfo 8 ,
@@ -115,7 +117,7 @@ The
.Nm
utility first appeared in
.Fx 4.4 .
-The ability to resize mounted filesystems was added in
+The ability to resize mounted file systems was added in
.Fx 10.0 .
.Sh AUTHORS
.An Christoph Herrmann Aq Mt chm@FreeBSD.org
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index 96897e2..7b85b25 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -161,7 +161,7 @@ growfs(int fsi, int fso, unsigned int Nflag)
#ifdef FS_DEBUG
{
struct csum *dbg_csp;
- int dbg_csc;
+ u_int32_t dbg_csc;
char dbg_line[80];
dbg_csp = fscs;
@@ -242,7 +242,7 @@ growfs(int fsi, int fso, unsigned int Nflag)
#ifdef FS_DEBUG
{
struct csum *dbg_csp;
- int dbg_csc;
+ u_int32_t dbg_csc;
char dbg_line[80];
dbg_csp = fscs;
OpenPOWER on IntegriCloud