Home | History | Annotate | Download | only in ccdconfig
History log of /src/sbin/ccdconfig/ccdconfig.c
RevisionDateAuthorComments
 1.58  06-Oct-2020  mlelstv Use raw device for configuring units. This is necessary as
having a block device opened prevents autodiscovery of wedges.
 1.57  06-Sep-2020  mrg rework error message to never call printf() %s with NULL.
 1.56  07-Dec-2014  mlelstv branches: 1.56.18;
Make ccdconfig resolve wedge names.
 1.55  17-Aug-2014  apb Don't print ccd_size with %zu; it no longer has type size_t.
Instead, cast to uintmax_t and print with %ju.
 1.54  16-Aug-2014  sborrill Switch size_t to uint64_t in appropriate places to ensure that ccd(4) works
with component and total sizes of > 2TB.
Add COMPAT_60 code for platforms where this alters userland-accessible
structures.
Make kernel print device information when a ccd configured.
Fix some typos in comments.
 1.53  03-May-2013  christos branches: 1.53.6;
avoid initialization bug in vax gcc: int i; foo(&i);
 1.52  27-Apr-2013  christos one less kvm groveller. Use sysctl to get ccd info.
 1.51  27-Aug-2011  joerg branches: 1.51.2; 1.51.4; 1.51.8;
static. __dead.
 1.50  04-Jan-2011  wiz Fix file descriptor leak. Found by cppcheck.
 1.49  16-Mar-2009  lukem fix sign-compare issues
 1.48  20-Jul-2008  lukem branches: 1.48.2; 1.48.4;
Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
 1.47  28-Apr-2008  martin branches: 1.47.2;
Remove clause 3 and 4 from TNF licenses
 1.46  16-Oct-2006  christos branches: 1.46.18; 1.46.20;
c99 initializers
 1.45  20-Mar-2006  christos Delete an obvious free(NULL) pointed out by erh.
 1.44  20-Mar-2006  christos Coverity CID's 1853, 1852, 1851: Plug memory leaks.
 1.43  17-Mar-2006  hubertf Fix minor ressource leak

Coverity CID 1855
OK'd by thorpej
 1.42  16-Feb-2006  lukem * The kernel's struct ccd_softc has extra structure members over the
userland version; provide another ccd global variable (ccd_softc_elemsize)
containing the kernel's size, and use that it ccdconfig(8) to convert the
kernel's ccd_softc into userland versions.
Fixes 'ccdconfig -g'.
* Use DISKUNIT() instead of home-grown cruft to determine the `N' of "ccdN".
Fixes 'ccdconfig -g ccd1'.
* Use (void *) instead of (char *) in the calls to kvm_read().

XXX: ccd could be converted from nlist to sysctl. "Someone else's yak shave".
 1.41  08-Sep-2005  drochner namespace sanity: no need to include <sys/device.h>
 1.40  20-Jan-2005  xtraeme branches: 1.40.2;
Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.39  28-Oct-2004  dsl Add (unsigned char) to isdigit()
 1.38  17-Oct-2003  lukem Support CCDF_NOLABEL. Document what CCDF_UNIFORM actually does.
 1.37  08-Oct-2003  itojun use asprintf David Hill
 1.36  08-Oct-2003  itojun plug memory leak. David Hill
 1.35  19-Sep-2003  itojun realloc pedant
 1.34  19-Feb-2001  cgd convert to use getprogname()
 1.33  28-Jan-2001  thorpej Sprinkle some const.
 1.32  10-Oct-2000  is Format string cleanups by Bill Sommerfeld.
 1.31  07-Jul-2000  itojun warnx?/errx? audit. don't pass variable/function return value alone.
use with "%s". from openbsd.
 1.30  09-Jun-2000  enami branches: 1.30.2;
Sync with rev. 1.19 of vnconfig.c.
 1.29  16-Feb-2000  enami branches: 1.29.2;
Define __POOL_EXPOSE almost at the beginning, instead of just before
dev/vndvar.h or dev/ccdvar.h so that struct pool is always available
regardless of multiple inclusion. Actually, ccdconfig.c compiles without
this change but ...
 1.28  11-Aug-1999  thorpej Garbage-collect CCDF_SWAP; no longer used, and doesn't make any sense
with the UVM swap code.
 1.27  01-Apr-1999  ross branches: 1.27.2;
Define __POOL_EXPOSE for this nlist-groveling program.
 1.26  21-Jan-1999  thorpej update for changes to the ccd_softc.
 1.25  12-Jan-1999  thorpej Update for changes to ccdvar.h
 1.24  13-Nov-1998  thorpej CCDF_MIRROR is nuked from orbit.
 1.23  25-Aug-1998  ross from Erik Bertelsen <erik@mediator.uni-c.dk>
{ put } { in } { lots } { of } { these } { to } { shut } { up } { egcs }
 1.22  10-Aug-1998  msaitoh delete an obsolete usage
 1.21  31-Jul-1998  thorpej Remove the stats printing code. Now that the ccd driver uses the pool
allocator, there are no more stats that it keeps.
 1.20  06-Jul-1998  mrg - change setgid kmem programs (that lend themselves to this) so setegid(getgid())
and the top, and then set the effective gid back to kmem around the call to
kvm_openfiles(). this reduces the time group kmem is available.
- for those above that also allow this, setgid(getgid()) after the call to
kvm_openfiles() to fully revoke priviledges.
- some KNF
- use err(3) over fprintf(3) in some places
 1.19  03-Feb-1998  mrg use warn() properly.
 1.18  30-Dec-1997  mycroft The output of `ccdconfig -g' is supposed to be a valid configuration file.
Prefix two messages with `# ' so they're comments.
 1.17  30-Dec-1997  mrg reset the gid before calling fopen() on the config file. stops people
having read kmem access. from rotel@indigo.ie (who obtained it from
openbsd).
 1.16  05-Dec-1997  thorpej Fix type problems on the Alpha.
 1.15  01-Dec-1997  lukem use fparseln() instead of fgets(), improve man page
 1.14  14-Sep-1997  lukem branches: 1.14.2;
use memset instead of bzero
 1.13  31-Jul-1997  jtc Fix files using old TNF copyright notice
 1.12  23-Jul-1997  thorpej Clean up usage of __COPYRIGHT() macro.
 1.11  20-Jul-1997  thorpej Case size_t to "long" for printing, and use %ld for the format.
 1.10  20-Jul-1997  thorpej - Use __COPYRIGHT() and __RCSID().
- Fix compiler warnings.
 1.9  21-Apr-1997  mrg be safe with buffers.
 1.8  30-Jan-1997  thorpej Add support to display the ccd-specific statistics kept by the ccd
driver.
 1.7  06-Jun-1996  thorpej Discard setgid privelidges if not reading the running kernel, as suggested
in PR #2485 from Mike Grupenhoff <ashmir@umiacs.umd.edu>.
 1.6  16-May-1996  thorpej branches: 1.6.4;
Use getmaxpartitions() and getrawpartition() from libutil, not homegrown
versions.
 1.5  28-Feb-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.4  01-Feb-1996  thorpej Add experimental data mirroring support, derived from code written by
Satoshi Asami and Nisha Talagala. For details on using data mirroring,
see the ccd(4) manual page.
 1.3  11-Nov-1995  thorpej Fix handling of "-M core" and "-N system"; a real brain-o on my part.
Fix related typo in manual page.
 1.2  23-Aug-1995  thorpej branches: 1.2.2;
Fix up a printf(), from Chris P. Ross.
 1.1  17-Aug-1995  thorpej Configuration utility for the ccd.
 1.2.2.1  11-Nov-1995  thorpej Update from trunk; fix -M and -N.
 1.6.4.1  06-Jun-1996  thorpej Update from trunk:

Discard setgid privilidges if not reading the running kernel, as suggested
in PR #2485 from Mike Grupenhoff <ashmir@umiacs.umd.edu>.
 1.14.2.2  30-Dec-1997  mycroft Pull up revision 1.18.
 1.14.2.1  30-Dec-1997  mrg pull up rev 1.16->1.17 from trunk
 1.27.2.1  10-Oct-2000  he Pull up revision 1.32 (requested by is):
Format string cleanup.
 1.29.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.30.2.2  18-Oct-2000  tv Pullup sbin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.30.2.1  27-Jul-2000  itojun pullup (approved by releng-1-5)
printf-like format pedant. do not pass string variable alone. use "%s".
from openbsd.

/cvsroot/basesrc/sbin/swapctl/swapctl.c 1.14 -> 1.15
/cvsroot/basesrc/sbin/ping6/ping6.c 1.15 -> 1.16
/cvsroot/basesrc/sbin/disklabel/disklabel.c 1.84 -> 1.85
/cvsroot/basesrc/sbin/ccdconfig/ccdconfig.c 1.30 -> 1.31
 1.40.2.1  20-Feb-2006  tron Pull up following revision(s) (requested by lukem in ticket #1178):
sys/dev/ccd.c: revision 1.108
sbin/ccdconfig/ccdconfig.c: revision 1.42
* The kernel's struct ccd_softc has extra structure members over the
userland version; provide another ccd global variable (ccd_softc_elemsize)
containing the kernel's size, and use that it ccdconfig(8) to convert the
kernel's ccd_softc into userland versions.
Fixes 'ccdconfig -g'.
* Use DISKUNIT() instead of home-grown cruft to determine the `N' of "ccdN".
Fixes 'ccdconfig -g ccd1'.
* Use (void *) instead of (char *) in the calls to kvm_read().
XXX: ccd could be converted from nlist to sysctl. "Someone else's yak shave".
 1.46.20.1  18-May-2008  yamt sync with head.
 1.46.18.2  28-Sep-2008  mjf Sync with HEAD.
 1.46.18.1  02-Jun-2008  mjf Sync with HEAD.
 1.47.2.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.48.4.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.48.2.1  27-Aug-2014  msaitoh Pull up following revision(s) (requested by sborrill in ticket #1919):
sbin/ccdconfig/ccdconfig.c 1.54 via patch
sys/dev/ccd.c 1.152 via patch
sys/dev/ccdvar.h 1.34 via patch

Switch size_t to uint64_t in appropriate places to ensure that ccd(4)
works with component and total sizes of > 2TB.
Make kernel print device information when a ccd configured.
Fix some typos in comments.
 1.51.8.1  23-Jun-2013  tls resync from head
 1.51.4.1  27-Aug-2014  msaitoh Pull up following revision(s) (requested by sborrill in ticket #1113):
sbin/ccdconfig/ccdconfig.c 1.54 via patch
sys/dev/ccd.c 1.152 via patch
sys/dev/ccdvar.h 1.34 via patch

Switch size_t to uint64_t in appropriate places to ensure that ccd(4)
works with component and total sizes of > 2TB.
Make kernel print device information when a ccd configured.
Fix some typos in comments.
 1.51.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.53.6.2  09-Dec-2014  martin Pull up following revision(s) (requested by mlelstv in ticket #305):
sbin/ccdconfig/ccdconfig.c: revision 1.56
Make ccdconfig resolve wedge names.
 1.53.6.1  18-Aug-2014  martin Pull up following revision(s) (requested by sborrill in ticket #38):
sys/dev/ccd.c: revision 1.152
sbin/ccdconfig/ccdconfig.c: revision 1.54
sbin/ccdconfig/ccdconfig.c: revision 1.55
sys/dev/ccdvar.h: revision 1.34
Switch size_t to uint64_t in appropriate places to ensure that ccd(4) works
with component and total sizes of > 2TB.
Add COMPAT_60 code for platforms where this alters userland-accessible
structures.
Make kernel print device information when a ccd configured.
Fix some typos in comments.
Don't print ccd_size with %zu; it no longer has type size_t.
Instead, cast to uintmax_t and print with %ju.
 1.56.18.1  11-Oct-2020  martin Pull up following revision(s) (requested by mlelstv in ticket #1110):

sys/dev/dkwedge/dk.c: revision 1.102
sys/dev/ccd.c: revision 1.185
sbin/ccdconfig/ccdconfig.c: revision 1.58

Use raw device for configuring units. This is necessary as
having a block device opened prevents autodiscovery of wedges.

Fix ioctl locking. Add dkdriver.

Check dkdriver before calling a driver function.

RSS XML Feed