summaryrefslogtreecommitdiff
path: root/sbin/growfs
AgeCommit message (Collapse)Author
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-05-24Break annoyingly long line that keeps popping up in diffs.Kenneth R Westerback
2014-05-15- typo in commentCharles Longeau
- memset() is not needed after a calloc() - add missing DBG_ENTER; - use SEEK_SET instead of 0 in an lseek() call ok krw@
2014-05-05"new file systemsize is" -> "new filesystem size is".Kenneth R Westerback
From David Vasek.
2014-04-30Write last disk sector, not last 512-byte block, when testing validityKenneth R Westerback
of new partition limit. Fixes growfs on 4K-sector disks. Reported by and fix tested by David Vasek via misc@.
2013-11-10Don't use p_size as if it was the full partition size, and don'tKenneth R Westerback
assume the disk sector size is 512-bytes. Use DL_GETPSIZE() to get correct partition sizes and DL_SECTOBLK() to turn disk sector values into 512-byte-block values.
2013-11-09Replace (int) = (size_t)(long) with (long long) = (long long) by replacingKenneth R Westerback
atol() with strtonum() and storing value of 's' parameter in long long variable instead of an int.
2013-10-19fix obvious .An formatting errorsIngo Schwarze
found while working on mandoc apropos
2013-07-16Add missing .Mt macros for AUTHORS email addresses.Ingo Schwarze
From Jan Stary <hans at stare dot cz>. ok jmc@
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-04-23handle large ino_t; ok teduTheo de Raadt
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-04-01Don't be picky about character case when checking response.Jonathan Gray
ok deraadt@
2008-12-24fox format string; ok tedu@Otto Moerbeek
2008-11-28Make growfs refuse to run on a dirty filesystem, and set the filesystem toChris Kuethe
dirty on the way out so that users are forced to run fsck afterwards. The manpage politely suggested that the filesystem be checked after growing it; change it to say that fsck is required.
2008-06-24Index: src/sbin/growfs/growfs.cIgor Sobrado
=================================================================== RCS file: /cvs/src/sbin/growfs/growfs.c,v retrieving revision 1.23 diff -u -p -r1.23 growfs.c --- src/sbin/growfs/growfs.c 5 Oct 2007 13:56:14 -0000 1.23 +++ src/sbin/growfs/growfs.c 4 Jun 2008 10:10:32 -0000 @@ -2227,7 +2227,7 @@ usage(void) DBG_ENTER; - fprintf(stderr, "usage: growfs [-Ny] [-s size] special\n"); + fprintf(stderr, "usage: growfs [-Nqy] [-s size] special\n"); DBG_LEAVE; exit(1);
2007-10-05check fgets return valueCharles Longeau
use strncmp instead of strcmp with help of ray@ "Looks OK" millert@
2007-09-02more malloc(n * m) -> calloc(n, m); from Igor ZinovikTheo de Raadt
2007-07-17remove m68k gcc workaround now that the gcc fix is in; ok miod@Todd C. Miller
2007-07-09disable specific gcc optimization that triggers the gcc bugTodd C. Miller
2007-07-09Use -O1 for m68k to work around a gcc optimizer bugTodd C. Miller
2007-07-09remove -WallTodd C. Miller
2007-07-07Pull in ffs2 support and other updates from FreeBSD. OK deraadt@Todd C. Miller
2007-06-01ufs_daddr_t is a dead type. growfs is the only program that uses it, yetTheo de Raadt
it is ffs1-aware only. therefore all the types are on disk, and thus, they are actually int32_t. ok pedro
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-29Updated disklabel format to support larger disks and partitions. WeOtto Moerbeek
free room in struct partition by packing fragment size and fragments/block more tighlty and use the resulting space to make offset and size 48 bits. For the disk part we use spare fields in struct disklabel. Kernel converts in-mem copy of the on-disk label if needed, disklabel(8) writes new version. We are careful to only change fields not used by bootloaders. Conception of basic scheme by deraadt. ok deraadt@ krw@
2007-04-23Remove 'cg_space' from 'struct cg'. Due to the alignment on 64-bitPedro Martelletto
architectures, CGSIZE() was returning something sligthly over one block. The 'new' fsck would round this value up to a fragment boundary, and end up trying to access memory beyond allocated space. From mickey@, okay pedro@, millert@ and otto@.
2007-03-19Add FFS2 fields to the superblock, change file system tools to keepPedro Martelletto
accessing FFS1 fields, okay art@, quite some testing by ckuethe@, simon@ and thib@, thanks.
2006-04-02use SEEK_* for lseek()Theo de Raadt
2006-03-31Super block changes for FFS2, thanks to all who tested.Pedro Martelletto
Silent okay after almost 3 weeks, hackers@.
2006-01-14Add a -q flag to reduce output a la newfs, and print the raw device we areMiod Vallat
operating on instead of ``growfs'' (a la newfs as well). ok millert@ pedro@
2005-12-19Add and use a few more constants and macros needed by UFS2Pedro Martelletto
No functional change
2005-04-14handle snprintf out of range conditions; otto okTheo de Raadt
2004-07-28sort options, and fix a spurious list width;Jason McIntyre
2004-03-15some small knfTheo de Raadt
2003-11-08typos from Jonathon Gray;Jason McIntyre
2003-10-28better partition finding. instead of groveling around looking forTed Unangst
a device, and then trying to guess what partition it is, use opendev(), fstat(), and DISKPART() to know what what's going on. most of the diff from Tom Cosgrove <tom.cosgrove at arches-consulting.com>
2003-10-26fix partition selection to allow all partitions to be grown.Ted Unangst
report by Mitja Muzenic <mitja at muzenic.net>
2003-10-14getopt() returns int not char. ok pvalchev@Dale Rahn
2003-08-25rename struct dinode to ufs1_dinode. clears the namespace and makesTed Unangst
way for some future work. no function changes yet. help testing otto@ and markus@
2003-08-16more errx/warnx style \n errors; tom.cosgrove@arches-consulting.comTheo de Raadt
2003-08-07add missing tags and make this compile with debug.Federico G. Schwindt
2003-08-06ufs -> ffs as requested in pr3391. also rework part talking aboutTed Unangst
slices/partitions to have more openbsd flavor. ok jmc@
2003-08-05better wording for the -y option;Jason McIntyre
ok fgsch@ tedu@
2003-08-04nuke paragraph about snapshots. we don't support them.Federico G. Schwindt
henning millert ok.
2003-08-04spelling, freebsd pr50979 via khalek on ircTed Unangst
2003-07-29more prettyTed Unangst