summaryrefslogtreecommitdiff
path: root/sbin/growfs
AgeCommit message (Collapse)Author
2016-05-28Give growfs a chance to error out with ENOTTY before pledging disklabel.Theo Buehler
Fixes pledge crash due to ioctl DIOCGDINFO with an inappropriate file. looks good to deraadt
2016-03-17simplify previous; ok bentleyJason McIntyre
2016-03-17missing El in previous;Jason McIntyre
2016-03-17Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom.Anthony J. Bentley
Previously behaviors were all over the map. This changes them to use COLUMNS first, and either terminal width or a hardcoded value (typically 80) as appropriate. ok deraadt@; man bits ok jmc@
2016-01-29Therefor -> Therefore (where appropriate)tb
from ray@, ok jmc@
2015-11-28hoist TIOCGWINSZ code upwards, and pledge "stdio disklabel" at theTheo de Raadt
right place. tested by mmcc
2015-11-27spacesTheo de Raadt
2015-11-23Remove the debugging infrastructure, which was ~1/3 of the code. Makesmmcc
pledging easier, and it was excessive complicated stuff. "Good." deraadt@
2015-11-23Remove more useless comments. This whole file may go eventually, as permmcc
deraadt@'s decree.
2015-11-20De-justify more comments. From FreeBSD.mmcc
2015-11-20Monospace comments are not meant to be justified. From FreeBSD.mmcc
2015-11-19Remove some weird comments containing only the name of the next function.mmcc
2015-11-19Don't bother casting memset() argument to void*. No binary change.mmcc
2015-11-19calloc((size_t)1, ...) -> calloc(1, ...)mmcc
No binary change (for real this time).
2015-08-20<stdlib.h> is included, so do not need to cast result fromTheo de Raadt
malloc, calloc, realloc* ok krw millert
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