CVS commit: src/crypto/external/bsd/netpgp/netpgp
Module Name:src Committed By: agc Date: Wed Sep 1 06:02:58 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/netpgp: Makefile Log Message: Fix a problem reported by moof whereby the build would fail on Sun2 due to shared library lossage on the Sun2 platform. Sorry, I thought that the change had already been made, but it was just to netpgpkeys' Makefile. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/netpgp/netpgp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/netpgp/Makefile diff -u src/crypto/external/bsd/netpgp/netpgp/Makefile:1.2 src/crypto/external/bsd/netpgp/netpgp/Makefile:1.3 --- src/crypto/external/bsd/netpgp/netpgp/Makefile:1.2 Tue Jun 9 00:56:15 2009 +++ src/crypto/external/bsd/netpgp/netpgp/Makefile Wed Sep 1 06:02:58 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2009/06/09 00:56:15 agc Exp $ +# $NetBSD: Makefile,v 1.3 2010/09/01 06:02:58 agc Exp $ .include bsd.own.mk @@ -11,6 +11,10 @@ LDADD+= -L${LIBNETPGPDIR} -lnetpgp DPADD+= ${LIBNETPGPDIR}/libnetpgp.a +LIBMJDIR!= cd ${.CURDIR}/../libmj ${PRINTOBJDIR} +LDADD+= -L${LIBMJDIR} -lmj +DPADD+= ${LIBMJDIR}/libmj.a + LDADD+= -lcrypto -lz -lbz2 DPADD+= ${LIBCRYPTO} ${LIBZ} ${LIBBZ2}
CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys
Module Name:src Committed By: agc Date: Wed Sep 1 06:18:21 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.c Log Message: + if we're going to the trouble of testing the return value from the setoption() function, probably best to return one + check for a valid entry in the JSON array instead of trusting that we have one + if there is no JSON value to print, don't print it + if we've set the keyring from an ssh key file, then we're using ssh keys - no need to set that value separately. This means that % netpgpkeys --sshkeyfile ~/.ssh/id_test.pub -l 1 key found signature 2048/RSA (Encrypt or Sign) 8368881b3b9832ec 2010-08-26 Key fingerprint: 3abd bf38 33a5 1f87 d704 ad42 8368 881b 3b98 32ec uid osx-vm1.crowthorne.alistaircrooks.co.uk (/home/agc/.ssh/id_test.pub) a...@osx-vm1.crowthorne.alistaircrooks.co.uk % lists ssh pubkeys properly, no need for other tautological arguments To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c diff -u src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.16 src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.17 --- src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.16 Fri Aug 13 18:29:41 2010 +++ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c Wed Sep 1 06:18:21 2010 @@ -179,6 +179,10 @@ { int i; + if (obj == NULL) { + (void) fprintf(stderr, No object found\n); + return; + } for (i = 0 ; i depth ; i++) { p(fp, , NULL); } @@ -332,7 +336,9 @@ from = to = tok = 0; /* convert from string into an mj structure */ (void) mj_parse(ids, json, from, to, tok); - idc = mj_arraycount(ids); + if ((idc = mj_arraycount(ids)) == 1 strchr(json, '{') == NULL) { + idc = 0; + } (void) fprintf(fp, %d key%s found\n, idc, (idc == 1) ? : s); for (i = 0 ; i idc ; i++) { formatobj(fp, ids.value.v[i], psigs); @@ -474,6 +480,7 @@ netpgp_setvar(netpgp, res, arg); break; case SSHKEYFILE: + netpgp_setvar(netpgp, ssh keys, 1); netpgp_setvar(netpgp, sshkeyfile, arg); break; case OPS_DEBUG: @@ -483,6 +490,7 @@ p-cmd = HELP_CMD; break; } + return 1; } /* we have -o option=value -- parse, and process */ @@ -548,7 +556,7 @@ if (ch = LIST_KEYS) { /* getopt_long returns 0 for long options */ if (!setoption(netpgp, p, options[optindex].val, optarg, homeset)) { -(void) fprintf(stderr, Bad option\n); +(void) fprintf(stderr, Bad setoption result %d\n, ch); } } else { switch (ch) { @@ -566,7 +574,7 @@ break; case 'o': if (!parse_option(netpgp, p, optarg, homeset)) { - (void) fprintf(stderr, Bad option\n); + (void) fprintf(stderr, Bad parse_option\n); } break; case 's':
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Wed Sep 1 06:20:23 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c netpgp.c Log Message: Denote the signing key with the word signature (the encryption key already has the tag encryption). This is a bit more meaningful than pub and sub. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c cvs rdiff -u -r1.69 -r1.70 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.44 src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.45 --- src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.44 Sat Aug 21 19:00:43 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Wed Sep 1 06:20:23 2010 @@ -57,7 +57,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: keyring.c,v 1.44 2010/08/21 19:00:43 agc Exp $); +__RCSID($NetBSD: keyring.c,v 1.45 2010/09/01 06:20:23 agc Exp $); #endif #ifdef HAVE_FCNTL_H @@ -998,7 +998,7 @@ __ops_print_keydata(io, keyring, key, sec, key-key.seckey.pubkey, 0); } else { - __ops_print_keydata(io, keyring, key, pub, key-key.pubkey, psigs); + __ops_print_keydata(io, keyring, key, signature , key-key.pubkey, psigs); } (void) fputc('\n', io-res); } Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.69 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.70 --- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.69 Sun Aug 15 16:10:56 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Wed Sep 1 06:20:23 2010 @@ -34,7 +34,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: netpgp.c,v 1.69 2010/08/15 16:10:56 agc Exp $); +__RCSID($NetBSD: netpgp.c,v 1.70 2010/09/01 06:20:23 agc Exp $); #endif #include sys/types.h @@ -170,7 +170,7 @@ WARNING: signature for %s made with encryption key\n, (f) ? f : stdin); } - __ops_print_keydata(io, ring, key, pub, key-key.pubkey, 0); + __ops_print_keydata(io, ring, key, signature , key-key.pubkey, 0); } } @@ -691,7 +691,7 @@ } else { __ops_sprint_keydata(netpgp-io, netpgp-pubring, key, pubs.v[pubs.c], - pub, + signature , key-key.pubkey, psigs); } if (pubs.v[pubs.c] != NULL) { @@ -819,7 +819,7 @@ netpgp_getvar(netpgp, subkey sigs) != NULL) 0) ? newkey : NULL; } return (__ops_sprint_keydata(netpgp-io, netpgp-pubring, -key, newkey, pub, +key, newkey, signature, key-key.pubkey, netpgp_getvar(netpgp, subkey sigs) != NULL) 0) ? newkey : NULL; } @@ -889,7 +889,7 @@ return 0; } cp = NULL; - __ops_sprint_keydata(netpgp-io, NULL, key, cp, pub, key-key.seckey.pubkey, 0); + __ops_sprint_keydata(netpgp-io, NULL, key, cp, signature , key-key.seckey.pubkey, 0); (void) fprintf(stdout, %s, cp); /* write public key */ (void) snprintf(dir, sizeof(dir), %s/%.16s, netpgp_getvar(netpgp, homedir), cp[31]); @@ -1137,10 +1137,11 @@ if (pubkey == NULL) { (void) fprintf(io-errs, netpgp: warning - using pubkey from secring\n); -__ops_print_keydata(io, netpgp-pubring, keypair, pub, +__ops_print_keydata(io, netpgp-pubring, keypair, signature , keypair-key.seckey.pubkey, 0); } else { -__ops_print_keydata(io, netpgp-pubring, pubkey, pub, pubkey-key.pubkey, 0); +__ops_print_keydata(io, netpgp-pubring, pubkey, signature , + pubkey-key.pubkey, 0); } } /* now decrypt key */ @@ -1480,58 +1481,3 @@ return (int)__ops_validate_all_sigs(result, netpgp-pubring, NULL); } - -#if 0 -#include sshkey.h - -int -netpgp_pgpkey_to_sshkey(netpgp_t *netpgp, char *name, SSHKey *sshkey) -{ - const __ops_key_t *pgpkey; - unsigned k; - - k = 0; - pgpkey = __ops_getnextkeybyname(netpgp-io, netpgp-pubring, name, k); - if (pgpkey == NULL) { - pgpkey = __ops_getkeybyname(io, netpgp-pubring, userid); - } - if (pgpkey == NULL) { - (void) fprintf(stderr, No key matching '%s'\n, name); - return 0; - } - switch(pgpkey-key.pubkey.alg) { - case OPS_PKA_RSA: - sshkey-type = KEY_RSA; - sshkey-rsa = calloc(1, sizeof(*sshkey-rsa); - if (sshkey-rsa == NULL) { - (void) fprintf(stderr, RSA memory problems\n); - return 0; - } - sshkey-rsa-n = pgpkey-key.pubkey.key.rsa.n; - sshkey-rsa-e = pgpkey-key.pubkey.key.rsa.e; - sshkey-rsa-d = pgpkey-key.seckey.key.rsa.d; - sshkey-rsa-p = pgpkey-key.seckey.key.rsa.p; - sshkey-rsa-q = pgpkey-key.seckey.key.rsa.q; - sshkey-rsa-iqmp = pgpkey-key.seckey.key.rsa.u; - break; - case OPS_PKA_DSA: -
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: kiyohara Date: Wed Sep 1 06:23:59 UTC 2010 Modified Files: src/sys/arch/arm/omap: files.omap2 Log Message: Indent. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/files.omap2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/omap/files.omap2 diff -u src/sys/arch/arm/omap/files.omap2:1.5 src/sys/arch/arm/omap/files.omap2:1.6 --- src/sys/arch/arm/omap/files.omap2:1.5 Sat Aug 28 13:02:32 2010 +++ src/sys/arch/arm/omap/files.omap2 Wed Sep 1 06:23:59 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.omap2,v 1.5 2010/08/28 13:02:32 ahoka Exp $ +# $NetBSD: files.omap2,v 1.6 2010/09/01 06:23:59 kiyohara Exp $ # # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support # Based on xscale/files.pxa2x0 @@ -19,9 +19,9 @@ defflag opt_omap.hOMAP_3530: OMAP3 # OBIO just an attach point -device obio { [addr=-1], [size=0], [intr=-1], [mult=1], [intrbase=-1], [nobyteacc=0] +device obio { [addr=-1], [size=0], [intr=-1], [mult=1], [intrbase=-1], [nobyteacc=0] } : bus_space_generic -attach obio at mainbus +attach obio at mainbus file arch/arm/omap/omap2_obio.c obio needs-count # OBIO files @@ -59,24 +59,24 @@ # Watchdog timers -device omapwdt32k: sysmon_wdog -file arch/arm/omap/omap_wdt.c omapwdt32k needs-flag +device omapwdt32k: sysmon_wdog +file arch/arm/omap/omap_wdt.c omapwdt32k needs-flag -attach omapwdt32k at obio with obiowdt32k -file arch/arm/omap/obio_wdt.c obiowdt32k +attach omapwdt32k at obio with obiowdt32k +file arch/arm/omap/obio_wdt.c obiowdt32k # L3 Interconnect -device L3i { [addr=-1], [size=0], [intr=-1], [mult=1], [nobyteacc=0] - } : bus_space_generic -attach L3i at mainbus +device L3i { [addr=-1], [size=0], [intr=-1], [mult=1], [nobyteacc=0] + } : bus_space_generic +attach L3i at mainbus file arch/arm/omap/omap2_l3i.c omap2 | omap3 # General Purpose Memory Controller # XXX some addl. chip select config parms may be desired here (e.g. timing) # XXX so far we just use the setup established by boot firmware -device gpmc { [addr=-1], [size=0], [intr=-1], [mult=1], [nobyteacc=0] - } : bus_space_generic -attach gpmc at mainbus +device gpmc { [addr=-1], [size=0], [intr=-1], [mult=1], [nobyteacc=0] + } : bus_space_generic +attach gpmc at mainbus file arch/arm/omap/omap2_gpmc.c gpmc # PRCM interface @@ -89,8 +89,8 @@ attach ohci at obio with obioohci file arch/arm/omap/obio_ohci.c obioohci -device omapfb: rasops16, rasops8, wsemuldisplaydev, vcons -attach omapfb at obio +device omapfb: rasops16, rasops8, wsemuldisplaydev, vcons +attach omapfb at obio file arch/arm/omap/omapfb.c omapfb # these bus space methods are not bus-specific ...
CVS commit: src/usr.bin/audiocfg
Module Name:src Committed By: wiz Date: Wed Sep 1 07:50:33 UTC 2010 Modified Files: src/usr.bin/audiocfg: audiocfg.1 Log Message: Mention that audiocfg also controls /dev/audioctl, /dev/mixer, and /dev/sound. Noted by mrg. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/audiocfg/audiocfg.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audiocfg/audiocfg.1 diff -u src/usr.bin/audiocfg/audiocfg.1:1.1 src/usr.bin/audiocfg/audiocfg.1:1.2 --- src/usr.bin/audiocfg/audiocfg.1:1.1 Tue Aug 31 14:57:26 2010 +++ src/usr.bin/audiocfg/audiocfg.1 Wed Sep 1 07:50:33 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: audiocfg.1,v 1.1 2010/08/31 14:57:26 wiz Exp $ +.\ $NetBSD: audiocfg.1,v 1.2 2010/09/01 07:50:33 wiz Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd August 31, 2010 +.Dd September 1, 2010 .Dt AUDIOCFG 1 .Os .Sh NAME @@ -39,11 +39,9 @@ .Sh DESCRIPTION The .Nm -utility helps maintaining a -.Pa /dev/audio -symlink. +utility helps maintaining the audio and mixer device symlinks. Run without arguments, it lists the available audio devices and shows -the current default audio device. +the currently selected default audio device. If given an .Ar index argument, that device is set as default audio device. @@ -61,8 +59,23 @@ Symlink to default audio device. .It Pa /dev/audio[0-9]* Available audio devices. +.It Pa /dev/audioctl +Symlink to default audio control device. +.It Pa /dev/audioctl[0-9]* +Available audio control devices. .It Pa /dev/drvctl Used for finding the correlating audio driver to an audio device. +.It Pa /dev/mixer +Symlink to default mixer device. +.It Pa /dev/mixer[0-9]* +Available mixer devices. +.It Pa /dev/sound +Symlink to default audio device (for the difference to +.Pa /dev/audio , +see +.Xr audio 4 ) . +.It Pa /dev/sound[0-9]* +Available audio devices. .El .Sh SEE ALSO .Xr audioplay 1 ,
CVS commit: src/usr.bin/audiocfg
Module Name:src Committed By: jmcneill Date: Wed Sep 1 09:04:16 UTC 2010 Modified Files: src/usr.bin/audiocfg: Makefile audiodev.c audiodev.h main.c Added Files: src/usr.bin/audiocfg: dtmf.c dtmf.h Log Message: add support for testing audio devices. the usage of audiocfg changes: audiocfg list audiocfg default [index] audiocfg test [index] 'list' shows the available audio devices, 'default' sets the default audio device, and 'test' will play a tone for 2 seconds on each channel. example: $ ./audiocfg list 0: [*] audio0: ICH2 AC97 (2 playback channels) 1: [ ] audio1: Pseudo Audio (2 playback channels) $ ./audiocfg test 0 testing channel 0... testing channel 1... $ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/audiocfg/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 src/usr.bin/audiocfg/audiodev.c \ src/usr.bin/audiocfg/audiodev.h src/usr.bin/audiocfg/main.c cvs rdiff -u -r0 -r1.1 src/usr.bin/audiocfg/dtmf.c \ src/usr.bin/audiocfg/dtmf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audiocfg/Makefile diff -u src/usr.bin/audiocfg/Makefile:1.2 src/usr.bin/audiocfg/Makefile:1.3 --- src/usr.bin/audiocfg/Makefile:1.2 Tue Aug 31 14:57:26 2010 +++ src/usr.bin/audiocfg/Makefile Wed Sep 1 09:04:16 2010 @@ -1,9 +1,11 @@ +# $NetBSD: Makefile,v 1.3 2010/09/01 09:04:16 jmcneill Exp $ + PROG= audiocfg -SRCS= audiodev.c drvctl.c +SRCS= audiodev.c drvctl.c dtmf.c SRCS+= main.c WARNS= 3 -LDADD+= -lprop -DPADD+= $(LIBPROP) +LDADD+= -lprop -lm +DPADD+= $(LIBPROP) $(LIBM) .include bsd.prog.mk Index: src/usr.bin/audiocfg/audiodev.c diff -u src/usr.bin/audiocfg/audiodev.c:1.1.1.1 src/usr.bin/audiocfg/audiodev.c:1.2 --- src/usr.bin/audiocfg/audiodev.c:1.1.1.1 Mon Aug 30 02:19:47 2010 +++ src/usr.bin/audiocfg/audiodev.c Wed Sep 1 09:04:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: audiodev.c,v 1.1.1.1 2010/08/30 02:19:47 mrg Exp $ */ +/* $NetBSD: audiodev.c,v 1.2 2010/09/01 09:04:16 jmcneill Exp $ */ /* * Copyright (c) 2010 Jared D. McNeill jmcne...@invisible.ca @@ -40,10 +40,42 @@ #include audiodev.h #include drvctl.h +#include dtmf.h static TAILQ_HEAD(audiodevhead, audiodev) audiodevlist = TAILQ_HEAD_INITIALIZER(audiodevlist); +#define AUDIODEV_SAMPLE_RATE 44100 + +static unsigned int +audiodev_probe_pchans(struct audiodev *adev) +{ + audio_info_t info; + unsigned int nchans = 0, n; + int error; + + AUDIO_INITINFO(info); + info.play.sample_rate = AUDIODEV_SAMPLE_RATE; + info.play.precision = 16; + info.play.encoding = AUDIO_ENCODING_SLINEAR_LE; + info.play.channels = 1; + info.mode = AUMODE_PLAY; + error = ioctl(adev-fd, AUDIO_SETINFO, info); + if (error == -1) + return 0; + nchans = 1; + + for (n = 2; n = 16; n += 2) { + info.play.channels = n; + error = ioctl(adev-fd, AUDIO_SETINFO, info); + if (error == -1) + break; + nchans = info.play.channels; + } + + return nchans; +} + static int audiodev_getinfo(struct audiodev *adev) { @@ -64,6 +96,8 @@ return -1; } + adev-pchan = audiodev_probe_pchans(adev); + return 0; } @@ -107,7 +141,7 @@ struct audiodev *adev; int fd, error; - fd = open(DRVCTLDEV, O_RDWR); + fd = open(DRVCTLDEV, O_RDONLY); if (fd == -1) { perror(open DRVCTLDEV); return -1; @@ -202,3 +236,49 @@ return 0; } + +int +audiodev_test(struct audiodev *adev, unsigned int chanmask) +{ + audio_info_t info; + int16_t *buf; + size_t buflen; + off_t off; + + AUDIO_INITINFO(info); + info.play.sample_rate = AUDIODEV_SAMPLE_RATE; + info.play.channels = adev-pchan; + info.play.precision = 16; + info.play.encoding = AUDIO_ENCODING_SLINEAR_LE; + info.mode = AUMODE_PLAY; + if (ioctl(adev-fd, AUDIO_SETINFO, info) == -1) { + perror(ioctl AUDIO_SETINFO); + return -1; + } + if (ioctl(adev-fd, AUDIO_GETINFO, info) == -1) { + perror(ioctl AUDIO_GETINFO); + return -1; + } + + dtmf_new(buf, buflen, info.play.sample_rate, 2, + adev-pchan, chanmask, 350.0, 440.0); + if (buf == NULL) + return -1; + + off = 0; + while (buflen 0) { + size_t wlen = info.play.buffer_size; + if (wlen buflen) + wlen = buflen; + write(adev-fd, (char *)buf + off, wlen); + off += wlen; + buflen -= wlen; + } + + if (ioctl(adev-fd, AUDIO_DRAIN) == -1) + perror(ioctl AUDIO_DRAIN); + + free(buf); + + return 0; +} Index: src/usr.bin/audiocfg/audiodev.h diff -u src/usr.bin/audiocfg/audiodev.h:1.1.1.1 src/usr.bin/audiocfg/audiodev.h:1.2 --- src/usr.bin/audiocfg/audiodev.h:1.1.1.1 Mon Aug 30 02:19:47 2010 +++ src/usr.bin/audiocfg/audiodev.h Wed Sep 1 09:04:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: audiodev.h,v 1.1.1.1 2010/08/30 02:19:47 mrg Exp $ */ +/* $NetBSD: audiodev.h,v 1.2 2010/09/01 09:04:16 jmcneill Exp $ */ /* * Copyright (c) 2010 Jared D. McNeill jmcne...@invisible.ca @@ -44,6 +44,8 @@ dev_t dev; bool defaultdev; + int pchan; + audio_device_t audio_device; TAILQ_ENTRY(audiodev) next; @@
CVS commit: src/usr.bin/audiocfg
Module Name:src Committed By: wiz Date: Wed Sep 1 09:17:31 UTC 2010 Modified Files: src/usr.bin/audiocfg: audiocfg.1 Log Message: Update for Jared's changes from a few minutes ago. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/audiocfg/audiocfg.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audiocfg/audiocfg.1 diff -u src/usr.bin/audiocfg/audiocfg.1:1.2 src/usr.bin/audiocfg/audiocfg.1:1.3 --- src/usr.bin/audiocfg/audiocfg.1:1.2 Wed Sep 1 07:50:33 2010 +++ src/usr.bin/audiocfg/audiocfg.1 Wed Sep 1 09:17:31 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: audiocfg.1,v 1.2 2010/09/01 07:50:33 wiz Exp $ +.\ $NetBSD: audiocfg.1,v 1.3 2010/09/01 09:17:31 wiz Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -35,23 +35,38 @@ .Nd configure default audio device .Sh SYNOPSIS .Nm -.Op index +.Cm list +.Nm +.Cm default +.Ar index +.Nm +.Cm test +.Ar index .Sh DESCRIPTION The .Nm utility helps maintaining the audio and mixer device symlinks. -Run without arguments, it lists the available audio devices and shows -the currently selected default audio device. -If given an -.Ar index -argument, that device is set as default audio device. +.Pp +Run with +.Dq Cm list , +it lists the available audio devices and shows the currently selected +default audio device. +Called with +.Dq Cm test , +it plays a tone of 2 seconds for each channel of the device with the index +.Ar index . +Called with +.Dq Cm default , +it sets the default audio device to the one with the index +.Ar index . +.Pp .Nm needs access to .Pa /dev/drvctl and write access to .Pa /dev -(when given an -.Ar index ) +(when used with +.Dq Cm default ) to work. .Sh FILES .Bl -tag -width 10n @@ -64,7 +79,7 @@ .It Pa /dev/audioctl[0-9]* Available audio control devices. .It Pa /dev/drvctl -Used for finding the correlating audio driver to an audio device. +Used for finding the corresponding audio driver to an audio device. .It Pa /dev/mixer Symlink to default mixer device. .It Pa /dev/mixer[0-9]*
CVS commit: src/usr.bin/audiocfg
Module Name:src Committed By: wiz Date: Wed Sep 1 09:18:04 UTC 2010 Modified Files: src/usr.bin/audiocfg: main.c Log Message: Index argument is not optional, make it clearer in the usage. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/audiocfg/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audiocfg/main.c diff -u src/usr.bin/audiocfg/main.c:1.2 src/usr.bin/audiocfg/main.c:1.3 --- src/usr.bin/audiocfg/main.c:1.2 Wed Sep 1 09:04:16 2010 +++ src/usr.bin/audiocfg/main.c Wed Sep 1 09:18:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.2 2010/09/01 09:04:16 jmcneill Exp $ */ +/* $NetBSD: main.c,v 1.3 2010/09/01 09:18:03 wiz Exp $ */ /* * Copyright (c) 2010 Jared D. McNeill jmcne...@invisible.ca @@ -40,8 +40,8 @@ usage(const char *p) { fprintf(stderr, usage: %s list\n, p); - fprintf(stderr,%s default [index]\n, p); - fprintf(stderr,%s test [index]\n, p); + fprintf(stderr,%s default index\n, p); + fprintf(stderr,%s test index\n, p); exit(EXIT_FAILURE); }
CVS commit: src/lib/libm/src
Module Name:src Committed By: drochner Date: Wed Sep 1 10:44:29 UTC 2010 Modified Files: src/lib/libm/src: k_standard.c Log Message: EDOM should not be set on atan2(0,0) in POSIX mode, found by Stathis Kamperis' testsuite To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libm/src/k_standard.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/src/k_standard.c diff -u src/lib/libm/src/k_standard.c:1.15 src/lib/libm/src/k_standard.c:1.16 --- src/lib/libm/src/k_standard.c:1.15 Wed Jan 27 20:23:53 2010 +++ src/lib/libm/src/k_standard.c Wed Sep 1 10:44:28 2010 @@ -12,7 +12,7 @@ #include sys/cdefs.h #if defined(LIBM_SCCS) !defined(lint) -__RCSID($NetBSD: k_standard.c,v 1.15 2010/01/27 20:23:53 drochner Exp $); +__RCSID($NetBSD: k_standard.c,v 1.16 2010/09/01 10:44:28 drochner Exp $); #endif #include math.h @@ -139,7 +139,6 @@ exc.retval = zero; if(_LIB_VERSION == _POSIX_) { exc.retval = copysign(signbit(y) ? M_PI : zero, x); - errno = EDOM; } else if (!matherr(exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2(atan2: DOMAIN error\n, 20);
CVS commit: xsrc/external/mit/xkeyboard-config/dist/symbols
Module Name:xsrc Committed By: wiz Date: Wed Sep 1 12:57:39 UTC 2010 Modified Files: xsrc/external/mit/xkeyboard-config/dist/symbols: in ir lk sy Log Message: Fix syntax error in some layout files. From Pouya D. Tafti on pkgsrc-users. Fixed upstream as seen in https://bugs.freedesktop.org/show_bug.cgi?id=29887 To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ xsrc/external/mit/xkeyboard-config/dist/symbols/in \ xsrc/external/mit/xkeyboard-config/dist/symbols/ir \ xsrc/external/mit/xkeyboard-config/dist/symbols/lk \ xsrc/external/mit/xkeyboard-config/dist/symbols/sy Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xkeyboard-config/dist/symbols/in diff -u xsrc/external/mit/xkeyboard-config/dist/symbols/in:1.1.1.3 xsrc/external/mit/xkeyboard-config/dist/symbols/in:1.2 --- xsrc/external/mit/xkeyboard-config/dist/symbols/in:1.1.1.3 Fri May 28 09:54:13 2010 +++ xsrc/external/mit/xkeyboard-config/dist/symbols/in Wed Sep 1 12:57:38 2010 @@ -85,7 +85,7 @@ key AB10 { [ U092f, U095f, slash, question ] }; // space, space, Zero-Width-Non-Joiner (ZWNJ), Zero-Width-Joiner (ZWJ): - include nbsp(zwnj3zwj4); + include nbsp(zwnj3zwj4) }; //Name : Bolnagri (Combined) @@ -1263,7 +1263,7 @@ key AB10 { [ U092F, U095F ] }; // DEVANAGARI LETTER YA; DEVANAGARI LETTER YYA // space, space, Zero-Width-Non-Joiner (ZWNJ), Zero-Width-Joiner (ZWJ): - include nbsp(zwnj3zwj4); + include nbsp(zwnj3zwj4) include group(olpc) }; Index: xsrc/external/mit/xkeyboard-config/dist/symbols/ir diff -u xsrc/external/mit/xkeyboard-config/dist/symbols/ir:1.1.1.3 xsrc/external/mit/xkeyboard-config/dist/symbols/ir:1.2 --- xsrc/external/mit/xkeyboard-config/dist/symbols/ir:1.1.1.3 Fri May 28 09:54:14 2010 +++ xsrc/external/mit/xkeyboard-config/dist/symbols/ir Wed Sep 1 12:57:38 2010 @@ -18,11 +18,11 @@ xkb_symbols pes { name[Group1]= Iran; -include ir(pes_part_basic); -include ir(pes_part_ext); +include ir(pes_part_basic) +include ir(pes_part_ext) -include nbsp(zwnj2nb3nnb4); -include level3(ralt_switch); +include nbsp(zwnj2nb3nnb4) +include level3(ralt_switch) }; @@ -30,11 +30,11 @@ xkb_symbols pes_keypad { name[Group1]= Iran - Persian, with Persian Keypad; -include ir(pes_part_basic); -include ir(pes_part_keypad); +include ir(pes_part_basic) +include ir(pes_part_keypad) -include nbsp(zwnj2nb3nnb4); -include level3(ralt_switch); +include nbsp(zwnj2nb3nnb4) +include level3(ralt_switch) }; partial hidden alphanumeric_keys Index: xsrc/external/mit/xkeyboard-config/dist/symbols/lk diff -u xsrc/external/mit/xkeyboard-config/dist/symbols/lk:1.1.1.3 xsrc/external/mit/xkeyboard-config/dist/symbols/lk:1.2 --- xsrc/external/mit/xkeyboard-config/dist/symbols/lk:1.1.1.3 Fri May 28 09:54:11 2010 +++ xsrc/external/mit/xkeyboard-config/dist/symbols/lk Wed Sep 1 12:57:38 2010 @@ -74,7 +74,7 @@ key AB10 { [ any, any, 0x0100200d, NoSymbol ] }; // Space - include nbsp(zwnj2nb3s); + include nbsp(zwnj2nb3s) include level3(ralt_switch) }; Index: xsrc/external/mit/xkeyboard-config/dist/symbols/sy diff -u xsrc/external/mit/xkeyboard-config/dist/symbols/sy:1.1.1.3 xsrc/external/mit/xkeyboard-config/dist/symbols/sy:1.2 --- xsrc/external/mit/xkeyboard-config/dist/symbols/sy:1.1.1.3 Fri May 28 09:54:12 2010 +++ xsrc/external/mit/xkeyboard-config/dist/symbols/sy Wed Sep 1 12:57:38 2010 @@ -68,7 +68,7 @@ // End Alphanumeric Section // Space -include nbsp(zwnj2); +include nbsp(zwnj2) // Begin Modifier Mappings
CVS commit: src/gnu/usr.bin/groff/tmac
Module Name:src Committed By: wiz Date: Wed Sep 1 13:01:36 UTC 2010 Modified Files: src/gnu/usr.bin/groff/tmac: mdoc.local Log Message: Add entry for libperfuse. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/gnu/usr.bin/groff/tmac/mdoc.local Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.58 src/gnu/usr.bin/groff/tmac/mdoc.local:1.59 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.58 Sat Aug 7 18:57:12 2010 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Wed Sep 1 13:01:35 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: mdoc.local,v 1.58 2010/08/07 18:57:12 wiz Exp $ +.\ $NetBSD: mdoc.local,v 1.59 2010/09/01 13:01:35 wiz Exp $ .\ .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -87,6 +87,7 @@ .ds doc-str-Lb-libiscsi iSCSI protocol library (libiscsi, \-liscsi) .ds doc-str-Lb-libnetpgpNetpgp signing, verification, encryption and decryption (libnetpgp, \-lnetpgp) .ds doc-str-Lb-libprop Property Container Object Library (libprop, \-lprop) +.ds doc-str-Lb-libperfuse PUFFS enabled relay to FUSE Library (libperfuse, \-lperfuse) .ds doc-str-Lb-libpuffs puffs Convenience Library (libpuffs, \-lpuffs) .ds doc-str-Lb-librefuseFile System in Userspace Convenience Library (librefuse, \-lrefuse) .ds doc-str-Lb-libssp Buffer Overflow Protection Library (libssp, \-lssp)
CVS commit: src/lib/libperfuse
Module Name:src Committed By: wiz Date: Wed Sep 1 13:04:11 UTC 2010 Modified Files: src/lib/libperfuse: libperfuse.3 Log Message: Some fixes. Comment out ERRORS section until it has content. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libperfuse/libperfuse.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/libperfuse.3 diff -u src/lib/libperfuse/libperfuse.3:1.1 src/lib/libperfuse/libperfuse.3:1.2 --- src/lib/libperfuse/libperfuse.3:1.1 Wed Aug 25 07:16:00 2010 +++ src/lib/libperfuse/libperfuse.3 Wed Sep 1 13:04:11 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: libperfuse.3,v 1.1 2010/08/25 07:16:00 manu Exp $ +.\ $NetBSD: libperfuse.3,v 1.2 2010/09/01 13:04:11 wiz Exp $ .\ .\ Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. .\ @@ -23,7 +23,6 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.ds str-Lb-libperfusePUFFS enabled relay to FUSE Library (libperfuse, \-lperfuse) .Dd August 12, 2010 .Dt LIBPERFUSE 2 .Os @@ -31,8 +30,9 @@ .Nm perfuse_mount , .Nm perfuse_open .Nd Request a -.Xr puffs 3 mount from -.Xr perfused 8 . +.Xr puffs 3 +mount from +.Xr perfused 8 .Sh LIBRARY .Lb libperfuse .Sh SYNOPSIS @@ -43,11 +43,11 @@ .Fn perfuse_open const char *path int flags .Sh DESCRIPTION .Fn perfuse_mount -sends a mount request to +sends a mount request to .Xr perfused 8 . It is intended as a drop-in replacement for .Xr mount 2 -for FUSE filesystems daemons and libraries, so that they can work with +for FUSE file systems daemons and libraries, so that they can work with .Xr perfused 8 . .Pp The function prototype mimics Linux's @@ -55,56 +55,61 @@ with the following arguments: .Bl -tag -width indent .It Ar source -The source fileystem that will appear in -.Xr df 1 , +The source file system that will appear in +.Xr df 1 and .Xr mount 8 -listings. Defaults to +listings. +Defaults to .Pa /dev/fuse -if NULL. +if +.Dv NULL . .It Ar dir -The filesystem mount point. +The file system mount point. .It Ar filesystemtype -The gileystem type, as displayed by -.Xr df 1 , +The file system type, as displayed by +.Xr df 1 and .Xr mount 8 . -Defaults to fuse -if NULL. +Defaults to +.Dq fuse +if +.Dv NULL . .It Ar mountflags -This contains the same value as in +This contains the same value as a .Xr mount 2 .Ar flags argument. .It Ar data -This contains the same value as in +This contains the same value as a .Xr mount 2 .Ar data argument. .El .Pp .Fn perfuse_open -is a drop-in replacement for the +is a drop-in replacement for the .Xr open 2 system call where .Pa /dev/fuse -is used. If +is used. +If .Ar path is different than .Pa /dev/fuse , -.Fn perfuse_open +.Fn perfuse_open handles control to the regular .Xr open 2 . .Sh RETURN VALUES .Fn perfuse_mount returns a file descriptor to the .Pa /dev/fuse -socket on success, and cause exit on failure. -.Sh ERRORS -.Fn perfuse_mount -will fail when one of the following occurs: -.Bl -tag -width Er -.El +socket on success, and causes exit on failure. +.\.Sh ERRORS +.\.Fn perfuse_mount +.\will fail when one of the following occurs: +.\.Bl -tag -width Er +.\.El .Sh SEE ALSO .Xd df 1 , .Xr mount 2 , @@ -113,5 +118,5 @@ .Xr perfused 8 .Sh AUTHORS The program was written by -.An Emmanuel Dreyfus +.An Emmanuel Dreyfus .Aq m...@netbsd.org .
CVS commit: src/external/bsd/ntp/include
Module Name:src Committed By: he Date: Wed Sep 1 13:46:58 UTC 2010 Modified Files: src/external/bsd/ntp/include: config.h Log Message: Vax doesn't have IEEE floating point. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/include/config.h diff -u src/external/bsd/ntp/include/config.h:1.3 src/external/bsd/ntp/include/config.h:1.4 --- src/external/bsd/ntp/include/config.h:1.3 Sun Aug 29 18:55:51 2010 +++ src/external/bsd/ntp/include/config.h Wed Sep 1 13:46:58 2010 @@ -388,7 +388,9 @@ /* #undef HAVE_HZ_IN_STRUCT_CLOCKINFO */ /* Define to 1 if you have the ieeefp.h header file. */ +#ifndef __vax__ #define HAVE_IEEEFP_H 1 +#endif /* have iflist_sysctl? */ #define HAVE_IFLIST_SYSCTL 1
CVS commit: src
Module Name:src Committed By: manu Date: Wed Sep 1 14:57:24 UTC 2010 Modified Files: src/lib/libperfuse: ops.c perfuse_if.h perfuse_priv.h subr.c src/usr.sbin/perfused: msg.c perfused.c Log Message: Build fixes for LP64 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/ops.c cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/perfuse_if.h \ src/lib/libperfuse/perfuse_priv.h cvs rdiff -u -r1.2 -r1.3 src/lib/libperfuse/subr.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/perfused/msg.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/perfused/perfused.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.4 src/lib/libperfuse/ops.c:1.5 --- src/lib/libperfuse/ops.c:1.4 Sat Aug 28 03:46:21 2010 +++ src/lib/libperfuse/ops.c Wed Sep 1 14:57:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.4 2010/08/28 03:46:21 manu Exp $ */ +/* $NetBSD: ops.c,v 1.5 2010/09/01 14:57:24 manu Exp $ */ /*- * Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. @@ -124,12 +124,12 @@ vap-va_fileid = fa-ino; vap-va_size = fa-size; vap-va_blocksize = fa-blksize; - vap-va_atime.tv_sec = (long)fa-atime; - vap-va_atime.tv_nsec = fa-atimensec; - vap-va_mtime.tv_sec = (long)fa-mtime; - vap-va_mtime.tv_nsec = fa-mtimensec; - vap-va_ctime.tv_sec = (long)fa-ctime; - vap-va_ctime.tv_nsec = fa-ctimensec; + vap-va_atime.tv_sec = (time_t)fa-atime; + vap-va_atime.tv_nsec = (long) fa-atimensec; + vap-va_mtime.tv_sec = (time_t)fa-mtime; + vap-va_mtime.tv_nsec = (long)fa-mtimensec; + vap-va_ctime.tv_sec = (time_t)fa-ctime; + vap-va_ctime.tv_nsec = (long)fa-ctimensec; vap-va_birthtime.tv_sec = 0; vap-va_birthtime.tv_nsec = 0; vap-va_gen = 0; @@ -404,14 +404,14 @@ } dents-d_fileno = fd-ino; - dents-d_reclen = reclen; + dents-d_reclen = (unsigned short)reclen; dents-d_namlen = fd-namelen; dents-d_type = fd-type; strlcpy(dents-d_name, fd-name, fd-namelen + 1); #ifdef PERFUSE_DEBUG if (perfuse_diagflags PDF_READDIR) - DPRINTF(%s: translated \%s\ ino = %lld\n, + DPRINTF(%s: translated \%s\ ino = %PRId64\n, __func__, dents-d_name, dents-d_fileno); #endif @@ -428,8 +428,10 @@ len = FUSE_DIRENT_ALIGN(sizeof(*fd) + fd-namelen); #ifdef PERFUSE_DEBUG if (perfuse_diagflags PDF_READDIR) - DPRINTF(%s: record at %lld/0x%llx length = %d/0x%x. -next record at %lld/0x%llx, max %d/0x%x\n, + DPRINTF(%s: record at %PRId64/0x%PRIx64 +length = %zd/0x%zx. +next record at %PRId64/0x%PRIx64 +max %zd/0x%zx\n, __func__, fd_offset, fd_offset, len, len, fd_offset + len, fd_offset + len, fd_len, fd_len); @@ -499,7 +501,7 @@ #ifdef PERFUSE_DEBUG if (perfuse_diagflags PDF_READDIR) - DPRINTF(%s: readoff = %lld, pnd-pnd_dirent_len = %d\n, + DPRINTF(%s: readoff = %PRId64, pnd-pnd_dirent_len = %zd\n, __func__, *readoff, pnd-pnd_dirent_len); #endif if (*readoff = pnd-pnd_dirent_len) { @@ -704,7 +706,7 @@ svfsb-f_asyncreads = ps-ps_asyncreads; svfsb-f_asyncwrites = ps-ps_asyncwrites; - svfsb-f_fsidx.__fsid_val[0] = ps-ps_fsid; + svfsb-f_fsidx.__fsid_val[0] = (int32_t)ps-ps_fsid; svfsb-f_fsidx.__fsid_val[1] = 0; svfsb-f_fsid = ps-ps_fsid; svfsb-f_namemax = MAXPATHLEN; /* XXX */ @@ -1051,7 +1053,7 @@ #ifdef PERFUSE_DEBUG if (perfuse_diagflags PDF_FH) DPRINTF(%s: opc = %p, file = \%s\, - ino = %lld, fh = 0x%llx\n, + ino = %PRId64, fh = 0x%PRIx64\n, __func__, (void *)opc, (char *)PNPATH((struct puffs_node *)opc), PERFUSE_NODE_DATA(opc)-pnd_ino, foo-fh); @@ -1125,7 +1127,7 @@ #ifdef PERFUSE_DEBUG if (perfuse_diagflags PDF_FH) - DPRINTF(%s: opc = %p, ino = %lld, fh = 0x%llx\n, + DPRINTF(%s: opc = %p, ino = %PRId64, fh = 0x%PRIx64\n, __func__, (void *)opc, pnd-pnd_ino, fh); #endif @@ -1143,7 +1145,7 @@ #ifdef PERFUSE_DEBUG if (perfuse_diagflags PDF_FH) - DPRINTF(%s: opc = %p, ino = %lld, fh = 0x%llx\n, + DPRINTF(%s: opc = %p, ino = %PRId64, fh = 0x%PRIx64\n, __func__, (void *)opc, pnd-pnd_ino, fri-fh); #endif @@ -1152,7 +1154,8 @@ out: if (error != 0) - DWARNX(%s: freed fh = 0x%llx but filesystem returned error = %d, + DWARNX(%s: freed fh = 0x%PRIx64 but filesystem + returned error = %d, __func__, fh, error); ps-ps_destroy_msg(pm); @@ -1204,8 +1207,8 @@ #ifdef PERFUSE_DEBUG if (perfuse_diagflags PDF_FH) - DPRINTF(%s: opc = %p, ino = %lld, fh = 0x%llx\n, -__func__, (void *)opc, + DPRINTF(%s: opc = %p, ino = %PRId64, +fh = 0x%PRIx64\n, __func__, (void *)opc, PERFUSE_NODE_DATA(opc)-pnd_ino, fgi-fh); #endif if ((error = XCHG_MSG(ps, pu, pm, sizeof(*fao))) != 0) { @@ -1355,13 +1358,13 @@ if (vap-va_atime.tv_sec != (time_t)PUFFS_VNOVAL) { fsi-atime = vap-va_atime.tv_sec;; - fsi-atimensec = vap-va_atime.tv_nsec;; + fsi-atimensec =
CVS commit: src/sys/arch/dreamcast/dev
Module Name:src Committed By: tsutsui Date: Wed Sep 1 15:08:22 UTC 2010 Modified Files: src/sys/arch/dreamcast/dev: gdrom.c Log Message: - use bufq(9) - account busy counter of disk(9) To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/dreamcast/dev/gdrom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/dreamcast/dev/gdrom.c diff -u src/sys/arch/dreamcast/dev/gdrom.c:1.29 src/sys/arch/dreamcast/dev/gdrom.c:1.30 --- src/sys/arch/dreamcast/dev/gdrom.c:1.29 Wed Sep 1 12:25:27 2010 +++ src/sys/arch/dreamcast/dev/gdrom.c Wed Sep 1 15:08:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gdrom.c,v 1.29 2010/09/01 12:25:27 tsutsui Exp $ */ +/* $NetBSD: gdrom.c,v 1.30 2010/09/01 15:08:22 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt @@ -33,13 +33,14 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.29 2010/09/01 12:25:27 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.30 2010/09/01 15:08:22 tsutsui Exp $); #include sys/param.h #include sys/systm.h #include sys/device.h #include sys/buf.h +#include sys/bufq.h #include sys/ioctl.h #include sys/fcntl.h #include sys/disklabel.h @@ -74,10 +75,12 @@ struct gdrom_softc { device_t sc_dev; /* generic device info */ - struct disk dkdev; /* generic disk info */ + struct disk sc_dk; /* generic disk info */ + struct bufq_state *sc_bufq; /* device buffer queue */ struct buf curbuf; /* state of current I/O operation */ int is_open, is_busy; + bool is_active; int openpart_start; /* start sector of currently open partition */ int cmd_active; @@ -126,6 +129,7 @@ int gdrom_read_sectors(struct gdrom_softc *, void *, int, int, int *); int gdrom_mount_disk(struct gdrom_softc *); int gdrom_intr(void *); +void gdrom_start(struct gdrom_softc *); int gdrom_getstat(void) { @@ -389,11 +393,13 @@ sc = device_private(self); sc-sc_dev = self; + bufq_alloc(sc-sc_bufq, disksort, BUFQ_SORT_RAWBLOCK); + /* * Initialize and attach the disk structure. */ - disk_init(sc-dkdev, device_xname(self), gdromdkdriver); - disk_attach(sc-dkdev); + disk_init(sc-sc_dk, device_xname(self), gdromdkdriver); + disk_attach(sc-sc_dk); /* * reenable disabled drive @@ -475,7 +481,7 @@ gdromstrategy(struct buf *bp) { struct gdrom_softc *sc; - int s, unit, error, resid; + int s, unit; #ifdef GDROMDEBUG printf(GDROM: strategy\n); #endif @@ -494,19 +500,10 @@ bp-b_bcount11, bp-b_bcount); #endif s = splbio(); - while (sc-is_busy) - tsleep(sc-is_busy, PRIBIO, gdbusy, 0); - sc-is_busy = 1; + bufq_put(sc-sc_bufq, bp); splx(s); - - if ((error = gdrom_read_sectors(sc, bp-b_data, bp-b_rawblkno, - bp-b_bcount 11, resid))) - bp-b_error = error; - - sc-is_busy = 0; - wakeup(sc-is_busy); - bp-b_resid = resid; - biodone(bp); + if (!sc-is_active) + gdrom_start(sc); return; done: @@ -514,6 +511,48 @@ biodone(bp); } +void +gdrom_start(struct gdrom_softc *sc) +{ + struct buf *bp; + int error, resid, s; + + sc-is_active = true; + + for (;;) { + s = splbio(); + bp = bufq_get(sc-sc_bufq); + if (bp == NULL) { + splx(s); + break; + } + + while (sc-is_busy) + tsleep(sc-is_busy, PRIBIO, gdbusy, 0); + sc-is_busy = 1; + disk_busy(sc-sc_dk); + splx(s); + + error = gdrom_read_sectors(sc, bp-b_data, bp-b_rawblkno, + bp-b_bcount 11, resid); + bp-b_error = error; + bp-b_resid = resid; + if (error != 0) + bp-b_resid = bp-b_bcount; + + sc-is_busy = 0; + wakeup(sc-is_busy); + + s = splbio(); + disk_unbusy(sc-sc_dk, bp-b_bcount - bp-b_resid, + (bp-b_flags B_READ) != 0); + splx(s); + biodone(bp); + } + + sc-is_active = false; +} + int gdromioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) {
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Wed Sep 1 15:12:16 UTC 2010 Modified Files: src/sys/kern: kern_descrip.c Log Message: Remove XXX comment. I'm not sure what it precisely means, but I'm guessing it's from a time when rump used filedesc0 for everything (and that isn't true anymore). To generate a diff of this commit: cvs rdiff -u -r1.204 -r1.205 src/sys/kern/kern_descrip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_descrip.c diff -u src/sys/kern/kern_descrip.c:1.204 src/sys/kern/kern_descrip.c:1.205 --- src/sys/kern/kern_descrip.c:1.204 Wed Aug 4 14:25:16 2010 +++ src/sys/kern/kern_descrip.c Wed Sep 1 15:12:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.204 2010/08/04 14:25:16 pooka Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.205 2010/09/01 15:12:16 pooka Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.204 2010/08/04 14:25:16 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.205 2010/09/01 15:12:16 pooka Exp $); #include sys/param.h #include sys/systm.h @@ -1248,7 +1248,6 @@ if (__predict_true(fdp == NULL)) { fdp = pool_cache_get(filedesc_cache, PR_WAITOK); } else { - /* XXXRUMP KASSERT(fdp == filedesc0); */ filedesc_ctor(NULL, fdp, PR_WAITOK); }
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Wed Sep 1 15:15:18 UTC 2010 Modified Files: src/sys/kern: kern_descrip.c Log Message: Actually, the comment probably meant would be nice to KASSERT here, but can't. So turn it into a KASSERT now that it's possible. To generate a diff of this commit: cvs rdiff -u -r1.205 -r1.206 src/sys/kern/kern_descrip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_descrip.c diff -u src/sys/kern/kern_descrip.c:1.205 src/sys/kern/kern_descrip.c:1.206 --- src/sys/kern/kern_descrip.c:1.205 Wed Sep 1 15:12:16 2010 +++ src/sys/kern/kern_descrip.c Wed Sep 1 15:15:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.205 2010/09/01 15:12:16 pooka Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.206 2010/09/01 15:15:18 pooka Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.205 2010/09/01 15:12:16 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.206 2010/09/01 15:15:18 pooka Exp $); #include sys/param.h #include sys/systm.h @@ -1248,6 +1248,7 @@ if (__predict_true(fdp == NULL)) { fdp = pool_cache_get(filedesc_cache, PR_WAITOK); } else { + KASSERT(fdp == filedesc0); filedesc_ctor(NULL, fdp, PR_WAITOK); }
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: njoly Date: Wed Sep 1 15:18:47 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Add missing .debug suffix. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.140 src/distrib/sets/lists/tests/mi:1.141 --- src/distrib/sets/lists/tests/mi:1.140 Fri Aug 27 10:01:04 2010 +++ src/distrib/sets/lists/tests/mi Wed Sep 1 15:18:47 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.140 2010/08/27 10:01:04 pooka Exp $ +# $NetBSD: mi,v 1.141 2010/09/01 15:18:47 njoly Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -291,7 +291,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/stringtests-obsolete obsolete ./usr/libdata/debug/usr/tests/lib/libc/string/t_popcount.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/lib/libdestests-lib-debug -./usr/libdata/debug/usr/tests/lib/libdes/t_destests-lib-debug debug,atf,crypto +./usr/libdata/debug/usr/tests/lib/libdes/t_des.debug tests-lib-debug debug,atf,crypto ./usr/libdata/debug/usr/tests/lib/semaphoretests-lib-debug ./usr/libdata/debug/usr/tests/lib/semaphore/pthread tests-lib-debug ./usr/libdata/debug/usr/tests/lib/semaphore/pthread/t_sem_pth.debug tests-lib-debug debug,atf
CVS commit: src/sys/arch/dreamcast/dev
Module Name:src Committed By: tsutsui Date: Wed Sep 1 15:20:12 UTC 2010 Modified Files: src/sys/arch/dreamcast/dev: gdrom.c Log Message: Replace an empty for() loop (which would be optimized out) with DELAY(1). No visible performance difference. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/dreamcast/dev/gdrom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/dreamcast/dev/gdrom.c diff -u src/sys/arch/dreamcast/dev/gdrom.c:1.30 src/sys/arch/dreamcast/dev/gdrom.c:1.31 --- src/sys/arch/dreamcast/dev/gdrom.c:1.30 Wed Sep 1 15:08:22 2010 +++ src/sys/arch/dreamcast/dev/gdrom.c Wed Sep 1 15:20:12 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gdrom.c,v 1.30 2010/09/01 15:08:22 tsutsui Exp $ */ +/* $NetBSD: gdrom.c,v 1.31 2010/09/01 15:20:12 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt @@ -33,7 +33,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.30 2010/09/01 15:08:22 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.31 2010/09/01 15:20:12 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -227,8 +227,7 @@ return -1; GDROM_COND = 0xa0; - for (i = 0; i 64; i++) - ; + DELAY(1); while ((GDROM_BUSY 0x88) != 8) ;
CVS commit: src/lib
Module Name:src Committed By: agc Date: Wed Sep 1 16:01:27 UTC 2010 Modified Files: src/lib: Makefile Log Message: Add a .WAIT statement after libmj, should fix a transient problem observed by moof. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/Makefile diff -u src/lib/Makefile:1.150 src/lib/Makefile:1.151 --- src/lib/Makefile:1.150 Sat Aug 7 21:32:28 2010 +++ src/lib/Makefile Wed Sep 1 16:01:27 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.150 2010/08/07 21:32:28 christos Exp $ +# $NetBSD: Makefile,v 1.151 2010/09/01 16:01:27 agc Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include bsd.own.mk @@ -67,8 +67,8 @@ .if (${MKCRYPTO} != no) # these depend on libcrypto*, libz and libbz2 SUBDIR+= ../crypto/external/bsd/openssh/lib -# XXX Should restructure netpgp/lib to contain libmj and libnetpgp SUBDIR+= ../crypto/external/bsd/netpgp/libmj +SUBDIR+= .WAIT SUBDIR+= ../crypto/external/bsd/netpgp/lib .endif
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: he Date: Wed Sep 1 16:02:40 UTC 2010 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add entries for the ntp.conf man page, html'ized and the two text variants. To generate a diff of this commit: cvs rdiff -u -r1.1235 -r1.1236 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1235 src/distrib/sets/lists/man/mi:1.1236 --- src/distrib/sets/lists/man/mi:1.1235 Tue Aug 24 23:55:04 2010 +++ src/distrib/sets/lists/man/mi Wed Sep 1 16:02:40 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1235 2010/08/24 23:55:04 rmind Exp $ +# $NetBSD: mi,v 1.1236 2010/09/01 16:02:40 he Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2420,6 +2420,7 @@ ./usr/share/man/cat8/nfsiod.0 man-obsolete obsolete ./usr/share/man/cat8/nis.0 man-nis-catman .cat ./usr/share/man/cat8/nologin.0 man-sysutil-catman .cat +./usr/share/man/cat8/npf.conf.0 man-npf-catman .cat ./usr/share/man/cat8/npfctl.0 man-npf-catman .cat ./usr/share/man/cat8/nqmgr.0 man-obsolete obsolete ./usr/share/man/cat8/nslookup.0 man-netutil-catman .cat @@ -4879,6 +4880,7 @@ ./usr/share/man/html8/nfsd.html man-nfsserver-htmlman html ./usr/share/man/html8/nis.html man-nis-htmlman html ./usr/share/man/html8/nologin.html man-sysutil-htmlman html +./usr/share/man/html8/npf.conf.html man-npf-htmlman html ./usr/share/man/html8/npfctl.html man-npf-htmlman html ./usr/share/man/html8/nslookup.html man-netutil-htmlman html ./usr/share/man/html8/nsupdate.html man-obsolete obsolete @@ -7560,6 +7562,7 @@ ./usr/share/man/man8/nfsiod.8 man-obsolete obsolete ./usr/share/man/man8/nis.8 man-nis-man .man ./usr/share/man/man8/nologin.8 man-sysutil-man .man +./usr/share/man/man8/npf.conf.8 man-npf-man .man ./usr/share/man/man8/npfctl.8 man-npf-man .man ./usr/share/man/man8/nqmgr.8 man-obsolete obsolete ./usr/share/man/man8/nslookup.8 man-netutil-man .man
CVS commit: src/sys/arch/dreamcast/conf
Module Name:src Committed By: he Date: Wed Sep 1 16:13:33 UTC 2010 Modified Files: src/sys/arch/dreamcast/conf: GENERIC Log Message: Bump SYMTAB_SPACE so that it fits again. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/arch/dreamcast/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/dreamcast/conf/GENERIC diff -u src/sys/arch/dreamcast/conf/GENERIC:1.95 src/sys/arch/dreamcast/conf/GENERIC:1.96 --- src/sys/arch/dreamcast/conf/GENERIC:1.95 Wed Jun 30 06:57:13 2010 +++ src/sys/arch/dreamcast/conf/GENERIC Wed Sep 1 16:13:32 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.95 2010/06/30 06:57:13 he Exp $ +# $NetBSD: GENERIC,v 1.96 2010/09/01 16:13:32 he Exp $ # # GENERIC machine description file # @@ -50,7 +50,7 @@ #options KGDB # remote debugger #options KGDB_DEVNAME=\scif\,KGDB_DEVRATE=57600 #makeoptions DEBUG=-g # compile full symbol table -options SYMTAB_SPACE=308000 +options SYMTAB_SPACE=31 #options SYSCALL_DEBUG #options UVMHIST #options UVMHIST_PRINT
CVS commit: src/sys/arch/dreamcast/dev
Module Name:src Committed By: tsutsui Date: Wed Sep 1 16:23:15 UTC 2010 Modified Files: src/sys/arch/dreamcast/dev: gdrom.c Log Message: Make local functions static, and comment out an unused function. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/dreamcast/dev/gdrom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/dreamcast/dev/gdrom.c diff -u src/sys/arch/dreamcast/dev/gdrom.c:1.32 src/sys/arch/dreamcast/dev/gdrom.c:1.33 --- src/sys/arch/dreamcast/dev/gdrom.c:1.32 Wed Sep 1 15:40:06 2010 +++ src/sys/arch/dreamcast/dev/gdrom.c Wed Sep 1 16:23:15 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gdrom.c,v 1.32 2010/09/01 15:40:06 tsutsui Exp $ */ +/* $NetBSD: gdrom.c,v 1.33 2010/09/01 16:23:15 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt @@ -33,7 +33,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.32 2010/09/01 15:40:06 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.33 2010/09/01 16:23:15 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -53,8 +53,8 @@ #include ioconf.h -int gdrommatch(device_t, cfdata_t, void *); -void gdromattach(device_t, device_t, void *); +static int gdrommatch(device_t, cfdata_t, void *); +static void gdromattach(device_t, device_t, void *); dev_type_open(gdromopen); dev_type_close(gdromclose); @@ -121,18 +121,23 @@ #define GDROM_CNTHI GDROM(0x94) #define GDROM_COND GDROM(0x9c) -int gdrom_getstat(void); -int gdrom_do_command(struct gdrom_softc *, void *, void *, unsigned int, - int *); -int gdrom_command_sense(struct gdrom_softc *, void *, void *, unsigned int, - int *); -int gdrom_read_toc(struct gdrom_softc *, struct gd_toc *); -int gdrom_read_sectors(struct gdrom_softc *, void *, int, int, int *); -int gdrom_mount_disk(struct gdrom_softc *); -int gdrom_intr(void *); -void gdrom_start(struct gdrom_softc *); +#if 0 +static int gdrom_getstat(void); +#endif +static int gdrom_do_command(struct gdrom_softc *, void *, void *, +unsigned int, int *); +static int gdrom_command_sense(struct gdrom_softc *, void *, void *, +unsigned int, int *); +static int gdrom_read_toc(struct gdrom_softc *, struct gd_toc *); +static int gdrom_read_sectors(struct gdrom_softc *, void *, int, int, +int *); +static int gdrom_mount_disk(struct gdrom_softc *); +static int gdrom_intr(void *); +static void gdrom_start(struct gdrom_softc *); -int gdrom_getstat(void) +#if 0 +int +gdrom_getstat(void) { uint8_t s1, s2, s3; @@ -150,6 +155,7 @@ else return -1; } +#endif int gdrom_intr(void *arg)
CVS commit: src/external/bsd/ntp/bin/ntpdc
Module Name:src Committed By: he Date: Wed Sep 1 16:26:11 UTC 2010 Modified Files: src/external/bsd/ntp/bin/ntpdc: Makefile Log Message: Add -lterminfo after -ledit, so that this links when doing static linking as well (found when building for the sun2 target). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/bin/ntpdc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/bin/ntpdc/Makefile diff -u src/external/bsd/ntp/bin/ntpdc/Makefile:1.2 src/external/bsd/ntp/bin/ntpdc/Makefile:1.3 --- src/external/bsd/ntp/bin/ntpdc/Makefile:1.2 Sat Aug 28 15:42:45 2010 +++ src/external/bsd/ntp/bin/ntpdc/Makefile Wed Sep 1 16:26:11 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2010/08/28 15:42:45 kardel Exp $ +# $NetBSD: Makefile,v 1.3 2010/09/01 16:26:11 he Exp $ .include bsd.own.mk @@ -11,8 +11,8 @@ ntpdc-opts.c -LDADD+= -L${LIBNTP} -lntp -L${LIBISC} -liscntp -lm -ledit -DPADD+= ${LIBISC}/libiscntp.a ${LIBNTP}/libntp.a ${LIBM} ${LIBUTIL} ${LIBEDIT} +LDADD+= -L${LIBNTP} -lntp -L${LIBISC} -liscntp -lm -ledit -lterminfo +DPADD+= ${LIBISC}/libiscntp.a ${LIBNTP}/libntp.a ${LIBM} ${LIBUTIL} ${LIBEDIT} ${LIBTERMINFO} .include ${.CURDIR}/../Makefile.inc
CVS commit: src/external/bsd/ntp/bin/ntpq
Module Name:src Committed By: he Date: Wed Sep 1 16:43:39 UTC 2010 Modified Files: src/external/bsd/ntp/bin/ntpq: Makefile Log Message: Another addition of -lterminfo after -ledit, so this links statically as well. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/bin/ntpq/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/bin/ntpq/Makefile diff -u src/external/bsd/ntp/bin/ntpq/Makefile:1.2 src/external/bsd/ntp/bin/ntpq/Makefile:1.3 --- src/external/bsd/ntp/bin/ntpq/Makefile:1.2 Sat Aug 28 15:42:45 2010 +++ src/external/bsd/ntp/bin/ntpq/Makefile Wed Sep 1 16:43:39 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2010/08/28 15:42:45 kardel Exp $ +# $NetBSD: Makefile,v 1.3 2010/09/01 16:43:39 he Exp $ # NOGCCERROR=yes @@ -12,8 +12,8 @@ ntpq-subs.c\ ntpq-opts.c -LDADD+= -L${LIBNTP} -lntp -L${LIBOPTS} -lopts -L${LIBISC} -liscntp -ledit -lm -#DPADD+= ${LIBISC}/libiscntp.a ${LIBOPTS}/libopts.a ${LIBNTP}/libntp.a ${LIBM} ${LIBUTIL} +LDADD+= -L${LIBNTP} -lntp -L${LIBOPTS} -lopts -L${LIBISC} -liscntp -ledit -lterminfo -lm +#DPADD+= ${LIBISC}/libiscntp.a ${LIBOPTS}/libopts.a ${LIBNTP}/libntp.a ${LIBEDIT} ${LIBTERMINFO} ${LIBM} .include ${.CURDIR}/../Makefile.inc
CVS commit: src/sys/arch/dreamcast/dev
Module Name:src Committed By: tsutsui Date: Wed Sep 1 16:48:00 UTC 2010 Modified Files: src/sys/arch/dreamcast/dev: gdrom.c Log Message: - misc KNF and cosmetics - use DPRINTF() style debug printf macro To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/dreamcast/dev/gdrom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/dreamcast/dev/gdrom.c diff -u src/sys/arch/dreamcast/dev/gdrom.c:1.33 src/sys/arch/dreamcast/dev/gdrom.c:1.34 --- src/sys/arch/dreamcast/dev/gdrom.c:1.33 Wed Sep 1 16:23:15 2010 +++ src/sys/arch/dreamcast/dev/gdrom.c Wed Sep 1 16:48:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gdrom.c,v 1.33 2010/09/01 16:23:15 tsutsui Exp $ */ +/* $NetBSD: gdrom.c,v 1.34 2010/09/01 16:48:00 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt @@ -33,7 +33,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.33 2010/09/01 16:23:15 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.34 2010/09/01 16:48:00 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -103,6 +103,12 @@ unsigned int leadout; }; +#ifdef GDROMDEBUG +#define DPRINTF(x) printf x +#else +#define DPRINTF(x) /**/ +#endif + #define TOC_LBA(n) ((n) 0xff00) #define TOC_ADR(n) ((n) 0x0f) #define TOC_CTRL(n) (((n) 0xf0) 4) @@ -166,22 +172,16 @@ s = splbio(); cond = GDROM_COND; -#ifdef GDROMDEBUG - printf(GDROM: cond = %x\n, cond); -#endif + DPRINTF((GDROM: cond = %x\n, cond)); if (!sc-cmd_active) { -#ifdef GDROMDEBUG - printf(GDROM: inactive IRQ!?\n); -#endif + DPRINTF((GDROM: inactive IRQ!?\n)); splx(s); return 0; } - if ((cond 8)) { + if ((cond 0x08) != 0) { int cnt = (GDROM_CNTHI 8) | GDROM_CNTLO; -#ifdef GDROMDEBUG - printf(GDROM: cnt = %d\n, cnt); -#endif + DPRINTF((GDROM: cnt = %d\n, cnt)); sc-cmd_actual += cnt; if (cnt 0 sc-cmd_result_size 0) { int subcnt = (cnt sc-cmd_result_size ? @@ -201,9 +201,9 @@ cnt -= 2; } } - while (GDROM_BUSY 0x80); + while ((GDROM_BUSY 0x80) != 0); - if ((cond 8) == 0) { + if ((cond 0x08) == 0) { sc-cmd_cond = cond; sc-cmd_active = 0; wakeup(sc-cmd_active); @@ -214,7 +214,8 @@ } -int gdrom_do_command(struct gdrom_softc *sc, void *req, void *buf, +int +gdrom_do_command(struct gdrom_softc *sc, void *req, void *buf, unsigned int nbyt, int *resid) { int i, s; @@ -230,12 +231,12 @@ sc-cmd_result_buf = buf; sc-cmd_result_size = nbyt; - if (GDSTATSTAT(GDROM_STAT) == 6) + if (GDSTATSTAT(GDROM_STAT) == 0x06) return -1; GDROM_COND = 0xa0; DELAY(1); - while ((GDROM_BUSY 0x88) != 8) + while ((GDROM_BUSY 0x88) != 0x08) ; s = splbio(); @@ -243,7 +244,7 @@ sc-cmd_actual = 0; sc-cmd_active = 1; - for (i = 0; i 6; i++) + for (i = 0; i 6; i++) GDROM_DATA = ptr[i]; while (sc-cmd_active) @@ -261,30 +262,28 @@ int gdrom_command_sense(struct gdrom_softc *sc, void *req, void *buf, unsigned int nbyt, int *resid) { - /* 76543210 76543210 - 0 0x13 - - 2- bufsz(hi) - 4 bufsz(lo) - - 6-- - 8-- - 10--*/ + /* + * 76543210 76543210 + * 0 0x13 - + * 2- bufsz(hi) + * 4 bufsz(lo) - + * 6-- + * 8-- + * 10-- + */ uint16_t sense_data[5]; uint8_t cmd[12]; - int sense_key, sense_specific; + int cond, sense_key, sense_specific; - int cond = gdrom_do_command(sc, req, buf, nbyt, resid); + cond = gdrom_do_command(sc, req, buf, nbyt, resid); if (cond 0) { -#ifdef GDROMDEBUG - printf(GDROM: not ready (2:58)\n); -#endif + DPRINTF((GDROM: not ready (2:58)\n)); return EIO; } if ((cond 1) == 0) { -#ifdef GDROMDEBUG - printf(GDROM: no sense. 0:0\n); -#endif + DPRINTF((GDROM: no sense. 0:0\n)); return 0; } @@ -298,29 +297,27 @@ sense_key = sense_data[1] 0xf; sense_specific = sense_data[4]; if (sense_key == 11 sense_specific == 0) { -#ifdef GDROMDEBUG - printf(GDROM: aborted (ignored). 0:0\n); -#endif + DPRINTF((GDROM: aborted (ignored). 0:0\n)); return 0; } -#ifdef GDROMDEBUG - printf(GDROM: SENSE %d:, sense_key); - printf(GDROM: %d\n, sense_specific); -#endif + DPRINTF((GDROM: SENSE %d:, sense_key)); + DPRINTF((GDROM: %d\n, sense_specific)); return sense_key == 0 ? 0 : EIO; } int gdrom_read_toc(struct gdrom_softc *sc, struct gd_toc *toc) { - /* 76543210 76543210 - 0 0x14 - - 2- bufsz(hi) - 4 bufsz(lo) - - 6-- - 8-- - 10--*/ + /* + * 76543210 76543210 + * 0 0x14 - + * 2- bufsz(hi) + * 4 bufsz(lo) - + * 6-- + * 8-- + * 10-- + */ uint8_t cmd[12]; memset(cmd, 0, sizeof(cmd)); @@ -335,24 +332,26 @@ int gdrom_read_sectors(struct
CVS commit: src/sys
Module Name:src Committed By: chs Date: Wed Sep 1 16:56:20 UTC 2010 Modified Files: src/sys/miscfs/genfs: genfs_io.c genfs_node.h genfs_vnops.c src/sys/ufs/ufs: ufs_inode.c src/sys/uvm: uvm_pager.h Log Message: replace the earlier workaround for PR 40389 with a better fix. the earlier change caused data corruption by freeing pages without invaliding their mappings. instead of the trylock/retry, just take the genfs-node lock before calling VOP_GETPAGES() and pass a new flag to tell it that we're already holding this lock. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/miscfs/genfs/genfs_io.c cvs rdiff -u -r1.19 -r1.20 src/sys/miscfs/genfs/genfs_node.h cvs rdiff -u -r1.182 -r1.183 src/sys/miscfs/genfs/genfs_vnops.c cvs rdiff -u -r1.82 -r1.83 src/sys/ufs/ufs/ufs_inode.c cvs rdiff -u -r1.38 -r1.39 src/sys/uvm/uvm_pager.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/miscfs/genfs/genfs_io.c diff -u src/sys/miscfs/genfs/genfs_io.c:1.39 src/sys/miscfs/genfs/genfs_io.c:1.40 --- src/sys/miscfs/genfs/genfs_io.c:1.39 Thu Aug 19 02:10:02 2010 +++ src/sys/miscfs/genfs/genfs_io.c Wed Sep 1 16:56:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_io.c,v 1.39 2010/08/19 02:10:02 pooka Exp $ */ +/* $NetBSD: genfs_io.c,v 1.40 2010/09/01 16:56:19 chs Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.39 2010/08/19 02:10:02 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.40 2010/09/01 16:56:19 chs Exp $); #include sys/param.h #include sys/systm.h @@ -125,7 +125,6 @@ int i, error, npages; const int flags = ap-a_flags; struct vnode * const vp = ap-a_vp; - struct genfs_node * const gp = VTOG(vp); struct uvm_object * const uobj = vp-v_uobj; kauth_cred_t const cred = curlwp-l_cred; /* XXXUBC curlwp */ const bool async = (flags PGO_SYNCIO) == 0; @@ -133,6 +132,7 @@ bool has_trans = false; const bool overwrite = (flags PGO_OVERWRITE) != 0; const bool blockalloc = memwrite (flags PGO_NOBLOCKALLOC) == 0; + const bool glocked = (flags PGO_GLOCKHELD) != 0; UVMHIST_FUNC(genfs_getpages); UVMHIST_CALLED(ubchist); UVMHIST_LOG(ubchist, vp %p off 0x%x/%x count %d, @@ -211,6 +211,7 @@ int nfound; struct vm_page *pg; + KASSERT(!glocked); npages = *ap-a_count; #if defined(DEBUG) for (i = 0; i npages; i++) { @@ -303,14 +304,19 @@ * check if our idea of v_size is still valid. */ - if (blockalloc) { - rw_enter(gp-g_glock, RW_WRITER); - } else { - rw_enter(gp-g_glock, RW_READER); + KASSERT(!glocked || genfs_node_wrlocked(vp)); + if (!glocked) { + if (blockalloc) { + genfs_node_wrlock(vp); + } else { + genfs_node_rdlock(vp); + } } mutex_enter(uobj-vmobjlock); if (vp-v_size origvsize) { - genfs_node_unlock(vp); + if (!glocked) { + genfs_node_unlock(vp); + } if (pgs != pgs_onstack) kmem_free(pgs, pgs_size); goto startover; @@ -318,7 +324,9 @@ if (uvn_findpages(uobj, origoffset, npages, pgs[ridx], async ? UFP_NOWAIT : UFP_ALL) != orignmempages) { - genfs_node_unlock(vp); + if (!glocked) { + genfs_node_unlock(vp); + } KASSERT(async != 0); genfs_rel_pages(pgs[ridx], orignmempages); mutex_exit(uobj-vmobjlock); @@ -339,7 +347,9 @@ } } if (i == npages) { - genfs_node_unlock(vp); + if (!glocked) { + genfs_node_unlock(vp); + } UVMHIST_LOG(ubchist, returning cached pages, 0,0,0,0); npages += ridx; goto out; @@ -350,7 +360,9 @@ */ if (overwrite) { - genfs_node_unlock(vp); + if (!glocked) { + genfs_node_unlock(vp); + } UVMHIST_LOG(ubchist, PGO_OVERWRITE,0,0,0,0); for (i = 0; i npages; i++) { @@ -386,7 +398,9 @@ npgs = npages; if (uvn_findpages(uobj, startoffset, npgs, pgs, async ? UFP_NOWAIT : UFP_ALL) != npages) { - genfs_node_unlock(vp); + if (!glocked) { +genfs_node_unlock(vp); + } KASSERT(async != 0); genfs_rel_pages(pgs, npages); mutex_exit(uobj-vmobjlock); @@ -584,7 +598,9 @@ nestiobuf_done(mbp, skipbytes, error); if (async) { UVMHIST_LOG(ubchist, returning 0 (async),0,0,0,0); - genfs_node_unlock(vp); + if (!glocked) { + genfs_node_unlock(vp); + } error = 0; goto out_err_free; } @@ -635,7 +651,9 @@ } } } - genfs_node_unlock(vp); + if (!glocked) { + genfs_node_unlock(vp); + } putiobuf(mbp); } Index: src/sys/miscfs/genfs/genfs_node.h diff -u src/sys/miscfs/genfs/genfs_node.h:1.19 src/sys/miscfs/genfs/genfs_node.h:1.20 --- src/sys/miscfs/genfs/genfs_node.h:1.19 Wed Jan 27 15:52:31 2010 +++ src/sys/miscfs/genfs/genfs_node.h Wed Sep 1 16:56:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_node.h,v 1.19 2010/01/27 15:52:31 uebayasi Exp $ */ +/* $NetBSD: genfs_node.h,v 1.20 2010/09/01 16:56:19 chs Exp $ */ /* * Copyright (c) 2001 Chuck Silvers. @@ -93,5 +93,6 @@ void
CVS commit: src/sys/arch/dreamcast/dev/g2
Module Name:src Committed By: tsutsui Date: Wed Sep 1 17:06:00 UTC 2010 Modified Files: src/sys/arch/dreamcast/dev/g2: g2rtc.c Log Message: - split device_t/softc - allocate struct todr_chip_handle in per-device softc - some cosmetics To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/dreamcast/dev/g2/g2rtc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/dreamcast/dev/g2/g2rtc.c diff -u src/sys/arch/dreamcast/dev/g2/g2rtc.c:1.4 src/sys/arch/dreamcast/dev/g2/g2rtc.c:1.5 --- src/sys/arch/dreamcast/dev/g2/g2rtc.c:1.4 Sat Dec 12 14:44:09 2009 +++ src/sys/arch/dreamcast/dev/g2/g2rtc.c Wed Sep 1 17:06:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: g2rtc.c,v 1.4 2009/12/12 14:44:09 tsutsui Exp $ */ +/* $NetBSD: g2rtc.c,v 1.5 2010/09/01 17:06:00 tsutsui Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: g2rtc.c,v 1.4 2009/12/12 14:44:09 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: g2rtc.c,v 1.5 2010/09/01 17:06:00 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -46,36 +46,30 @@ #define G2RTC_OFFSET (20 * SECYR + 5 * SECDAY) struct g2rtc_softc { - struct device sc_dev; + device_t sc_dev; bus_space_tag_t sc_bt; bus_space_handle_t sc_bh; + struct todr_chip_handle sc_tch; }; /* autoconf glue */ -static int g2rtc_match(struct device *, struct cfdata *, void *); -static void g2rtc_attach(struct device *, struct device *, void *); +static int g2rtc_match(device_t, cfdata_t, void *); +static void g2rtc_attach(device_t, device_t, void *); -CFATTACH_DECL(g2rtc, sizeof(struct g2rtc_softc), - g2rtc_match, g2rtc_attach, NULL, NULL); +CFATTACH_DECL_NEW(g2rtc, sizeof(struct g2rtc_softc), +g2rtc_match, g2rtc_attach, NULL, NULL); /* todr(9) methods */ static int g2rtc_todr_gettime(todr_chip_handle_t, struct timeval *); static int g2rtc_todr_settime(todr_chip_handle_t, struct timeval *); -static struct todr_chip_handle g2rtc_todr_handle = { - .cookie = NULL, /* set on attach */ - .todr_gettime = g2rtc_todr_gettime, - .todr_settime = g2rtc_todr_settime, -}; - - static inline uint32_t g2rtc_read(bus_space_tag_t, bus_space_handle_t); static int -g2rtc_match(struct device *parent, struct cfdata *cf, void *aux) +g2rtc_match(device_t parent, cfdata_t cf, void *aux) { static int g2rtc_matched = 0; @@ -88,22 +82,26 @@ static void -g2rtc_attach(struct device *parent, struct device *self, void *aux) +g2rtc_attach(device_t parent, device_t self, void *aux) { - struct g2rtc_softc *sc = (void *)self; + struct g2rtc_softc *sc = device_private(self); struct g2bus_attach_args *ga = aux; + todr_chip_handle_t tch; + sc-sc_dev = self; sc-sc_bt = ga-ga_memt; if (bus_space_map(sc-sc_bt, G2RTC_REG_BASE, G2RTC_REG_SIZE, 0, - sc-sc_bh) != 0) - { + sc-sc_bh) != 0) { printf(: unable to map registers\n); return; } printf(: time-of-day clock\n); - g2rtc_todr_handle.cookie = sc; - todr_attach(g2rtc_todr_handle); + tch = sc-sc_tch; + tch-cookie = sc; + tch-todr_gettime = g2rtc_todr_gettime, + tch-todr_settime = g2rtc_todr_settime, + todr_attach(tch); } @@ -112,7 +110,7 @@ { return ((bus_space_read_4(bt, bh, 0) 0x) 16) - | (bus_space_read_4(bt, bh, 4) 0x); + | (bus_space_read_4(bt, bh, 4) 0x); } @@ -173,5 +171,4 @@ } return EIO; - }
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Wed Sep 1 17:25:58 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: tst src/crypto/external/bsd/netpgp/dist/src/hkpd: Makefile hkpd.c main.c src/crypto/external/bsd/netpgp/dist/src/lib: create.c keyring.c netpgp.c src/crypto/external/bsd/netpgp/dist/src/netpgp: netpgp.c src/crypto/external/bsd/netpgp/dist/src/netpgpverify: verify.c Log Message: Various minor changes to netpgp: + be smarter when checking for a null id + add test for rubbish being returned when listing specific keys in netpgpkeys(1) + take the public key from the pubring, not the secring when exporting keys + allow hkpd to serve ssh keys in pgp format + test on whether a seckey is needed, not on a userid needed, for ssh keys To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/crypto/external/bsd/netpgp/dist/tst cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile \ src/crypto/external/bsd/netpgp/dist/src/hkpd/main.c cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c cvs rdiff -u -r1.33 -r1.34 \ src/crypto/external/bsd/netpgp/dist/src/lib/create.c cvs rdiff -u -r1.45 -r1.46 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c cvs rdiff -u -r1.70 -r1.71 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c cvs rdiff -u -r1.13 -r1.14 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c cvs rdiff -u -r1.14 -r1.15 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/verify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/tst diff -u src/crypto/external/bsd/netpgp/dist/tst:1.28 src/crypto/external/bsd/netpgp/dist/tst:1.29 --- src/crypto/external/bsd/netpgp/dist/tst:1.28 Sat Aug 7 04:27:00 2010 +++ src/crypto/external/bsd/netpgp/dist/tst Wed Sep 1 17:25:57 2010 @@ -36,7 +36,7 @@ su root -c make install' passed=0 -total=34 +total=35 rm -f passed date passed echo == sign/verify 180938 file @@ -181,5 +181,8 @@ echo user sshkey \$sshkey\ = netpgpkey \$netpgpkey\ [ $sshkey = $netpgpkey ] passed=$(expr $passed + 1) echo 34 $passed passed +echo == single key listing +/usr/bin/netpgpkeys -l agc passed=$(expr $passed + 1) +echo 35 $passed passed rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig g g.asc g2 a2 a3 a4 a5 h h.sig i i.asc echo Passed ${passed}/${total} tests Index: src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile diff -u src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile:1.2 src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile:1.3 --- src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile:1.2 Tue Mar 16 00:22:52 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile Wed Sep 1 17:25:57 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2010/03/16 00:22:52 agc Exp $ +# $NetBSD: Makefile,v 1.3 2010/09/01 17:25:57 agc Exp $ PROG=hkpd SRCS=hkpd.c main.c @@ -9,3 +9,11 @@ WARNS=0 # anything over 0 will fail at the link stage with IDEA errors .include bsd.prog.mk + +t: ${PROG} + ./${PROG} -D + sleep 1 + ftp -o- 'http://localhost:11371/pks/lookup?op=indexsearch=agcoptions=json' + ftp -o- 'http://localhost:11371/pks/lookup?op=getsearch=agcoptions=json' + ftp -o- 'http://localhost:11371/pks/lookup?op=getsearch=agcoptions=mr' + pkill hkpd Index: src/crypto/external/bsd/netpgp/dist/src/hkpd/main.c diff -u src/crypto/external/bsd/netpgp/dist/src/hkpd/main.c:1.2 src/crypto/external/bsd/netpgp/dist/src/hkpd/main.c:1.3 --- src/crypto/external/bsd/netpgp/dist/src/hkpd/main.c:1.2 Tue Mar 16 00:22:52 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpd/main.c Wed Sep 1 17:25:57 2010 @@ -92,7 +92,7 @@ host = strdup(localhost); daemonise = 1; family = strdup(46); - while ((i = getopt(argc, argv, DH:Vf:h:p:v:)) != -1) { + while ((i = getopt(argc, argv, DH:S:Vf:h:p:v:)) != -1) { switch(i) { case 'D': daemonise = 0; @@ -100,6 +100,10 @@ case 'H': set_homedir(netpgp, optarg, NULL, 0); break; + case 'S': + netpgp_setvar(netpgp, ssh keys, 1); + netpgp_setvar(netpgp, sshkeyfile, optarg); + break; case 'V': printf(%s: Version %d\n, *argv, HKPD_VERSION); exit(EXIT_SUCCESS); Index: src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c diff -u src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c:1.4 src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c:1.5 --- src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c:1.4 Tue Mar 16 04:14:29 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c Wed Sep 1 17:25:57 2010 @@ -31,7 +31,6 @@ #include sys/param.h #include sys/socket.h #include sys/stat.h -#include sys/param.h #include sys/select.h #include netinet/in.h @@ -78,7 +77,7 @@ /* make into html */ static int -htmlify(char *buf, size_t size, const int code, const int get, const char *title, const int mr, const char
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Sep 1 19:13:39 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: rumpkern.ifspec Log Message: Rewrite rump process and lwp allocation routines now that I have some idea of how they should be done. This change essentially moves the responsibility of pid/lwpid management from the application side into the rump kernel. It also introduces clear rules on what happens when, i.e. introduces semantics (these semantics will be documented on the man page, and more importantly in atf tests). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/librump/rumpkern/rumpkern.ifspec Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rumpkern.ifspec diff -u src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.5 src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.6 --- src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.5 Wed Apr 14 14:12:48 2010 +++ src/sys/rump/librump/rumpkern/rumpkern.ifspec Wed Sep 1 19:13:38 2010 @@ -1,4 +1,4 @@ -; $NetBSD: rumpkern.ifspec,v 1.5 2010/04/14 14:12:48 pooka Exp $ +; $NetBSD: rumpkern.ifspec,v 1.6 2010/09/01 19:13:38 pooka Exp $ NAME|kern PUBHDR|include/rump/rumpkern_if_pub.h @@ -21,16 +21,16 @@ size_t |uio_free |struct uio * struct kauth_cred*|cred_create |uid_t, gid_t, size_t, gid_t * -struct kauth_cred*|cred_suserget|void void |cred_put |struct kauth_cred * -; lwp interfaces. these need much love -struct lwp * |newproc_switch |void -struct lwp * |lwp_alloc |pid_t, lwpid_t -struct lwp * |lwp_alloc_and_switch |pid_t, lwpid_t -struct lwp * |lwp_curlwp |void -void |lwp_switch |struct lwp * -void |lwp_release |struct lwp * +; lwp and proc creation / switching interfaces +int |lwproc_newproc |void +int |lwproc_newlwp |pid_t +void |lwproc_switch |struct lwp * +void |lwproc_releaselwp |void +struct lwp * |lwproc_curlwp |void + +void |allbetsareoff_setid |pid_t, int int |sysproxy_set |rump_sysproxy_t, void * int |sysproxy_socket_setup_client |int
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: tron Date: Wed Sep 1 19:28:52 UTC 2010 Modified Files: src/distrib/sets/lists/man: mi Log Message: Mark npf.conf(8) (moved to section 5) as obsolete instead of simply removing it. The file will now properly get deleted instead of breaking incremental builds. To generate a diff of this commit: cvs rdiff -u -r1.1236 -r1.1237 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1236 src/distrib/sets/lists/man/mi:1.1237 --- src/distrib/sets/lists/man/mi:1.1236 Wed Sep 1 16:02:40 2010 +++ src/distrib/sets/lists/man/mi Wed Sep 1 19:28:51 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1236 2010/09/01 16:02:40 he Exp $ +# $NetBSD: mi,v 1.1237 2010/09/01 19:28:51 tron Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2420,7 +2420,7 @@ ./usr/share/man/cat8/nfsiod.0 man-obsolete obsolete ./usr/share/man/cat8/nis.0 man-nis-catman .cat ./usr/share/man/cat8/nologin.0 man-sysutil-catman .cat -./usr/share/man/cat8/npf.conf.0 man-npf-catman .cat +./usr/share/man/cat8/npf.conf.0 man-obsolete obsolete ./usr/share/man/cat8/npfctl.0 man-npf-catman .cat ./usr/share/man/cat8/nqmgr.0 man-obsolete obsolete ./usr/share/man/cat8/nslookup.0 man-netutil-catman .cat @@ -4880,7 +4880,7 @@ ./usr/share/man/html8/nfsd.html man-nfsserver-htmlman html ./usr/share/man/html8/nis.html man-nis-htmlman html ./usr/share/man/html8/nologin.html man-sysutil-htmlman html -./usr/share/man/html8/npf.conf.html man-npf-htmlman html +./usr/share/man/html8/npf.conf.html man-obsolete obsolete ./usr/share/man/html8/npfctl.html man-npf-htmlman html ./usr/share/man/html8/nslookup.html man-netutil-htmlman html ./usr/share/man/html8/nsupdate.html man-obsolete obsolete @@ -7562,7 +7562,7 @@ ./usr/share/man/man8/nfsiod.8 man-obsolete obsolete ./usr/share/man/man8/nis.8 man-nis-man .man ./usr/share/man/man8/nologin.8 man-sysutil-man .man -./usr/share/man/man8/npf.conf.8 man-npf-man .man +./usr/share/man/man8/npf.conf.8 man-obsolete obsolete ./usr/share/man/man8/npfctl.8 man-npf-man .man ./usr/share/man/man8/nqmgr.8 man-obsolete obsolete ./usr/share/man/man8/nslookup.8 man-netutil-man .man
CVS commit: src/sys/rump/librump
Module Name:src Committed By: pooka Date: Wed Sep 1 19:32:11 UTC 2010 Modified Files: src/sys/rump/librump: makerumpif.sh Log Message: Print generated filenames so i remember which ones to commit. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/makerumpif.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/makerumpif.sh diff -u src/sys/rump/librump/makerumpif.sh:1.4 src/sys/rump/librump/makerumpif.sh:1.5 --- src/sys/rump/librump/makerumpif.sh:1.4 Thu Oct 15 00:29:19 2009 +++ src/sys/rump/librump/makerumpif.sh Wed Sep 1 19:32:11 2010 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp $ +# $NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp $ # # Copyright (c) 2009 Antti Kantee. All rights reserved. # @@ -67,9 +67,9 @@ ' ${1} | awk -F\| -v rumptop=${RUMPTOP} ' function fileheaders(file, srcstr) { - printf(/*\t$NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp $\t*/\n\n) file + printf(/*\t$NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp $\t*/\n\n) file printf(/*\n * Automatically generated. DO NOT EDIT.\n) file - genstr = $NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp $ + genstr = $NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp $ gsub(\\$, , genstr) printf( * from: %s\n, srcstr) file printf( * by: %s\n, genstr) file @@ -91,9 +91,9 @@ } $1 == NAME{myname = $2;next} -$1 == PUBHDR{pubhdr = rumptop / $2;next} -$1 == PRIVHDR{privhdr = rumptop / $2;next} -$1 == WRAPPERS{gencalls = rumptop / $2;next} +$1 == PUBHDR{pubhdr = rumptop / $2;print pubhdr;next} +$1 == PRIVHDR{privhdr = rumptop / $2;print privhdr;next} +$1 == WRAPPERS{gencalls = rumptop / $2;print gencalls;next} /^;/{next} /\\$/{sub(\\\n, );getline nextline;$0 = $0 nextline}
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Wed Sep 1 19:33:05 UTC 2010 Modified Files: src/sys/rump/include/rump: rumpkern_if_pub.h src/sys/rump/librump/rumpkern: rumpkern_if_priv.h rumpkern_if_wrappers.c Log Message: regen: new lwp/proc interfaces To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/include/rump/rumpkern_if_pub.h cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h \ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rumpkern_if_pub.h diff -u src/sys/rump/include/rump/rumpkern_if_pub.h:1.8 src/sys/rump/include/rump/rumpkern_if_pub.h:1.9 --- src/sys/rump/include/rump/rumpkern_if_pub.h:1.8 Mon Jul 19 15:38:28 2010 +++ src/sys/rump/include/rump/rumpkern_if_pub.h Wed Sep 1 19:33:04 2010 @@ -1,9 +1,9 @@ -/* $NetBSD: rumpkern_if_pub.h,v 1.8 2010/07/19 15:38:28 pooka Exp $ */ +/* $NetBSD: rumpkern_if_pub.h,v 1.9 2010/09/01 19:33:04 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.5 2010/04/14 14:12:48 pooka Exp - * by: NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.6 2010/09/01 19:13:38 pooka Exp + * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp */ void rump_pub_reboot(int); @@ -16,14 +16,13 @@ off_t rump_pub_uio_getoff(struct uio *); size_t rump_pub_uio_free(struct uio *); struct kauth_cred* rump_pub_cred_create(uid_t, gid_t, size_t, gid_t *); -struct kauth_cred* rump_pub_cred_suserget(void); void rump_pub_cred_put(struct kauth_cred *); -struct lwp * rump_pub_newproc_switch(void); -struct lwp * rump_pub_lwp_alloc(pid_t, lwpid_t); -struct lwp * rump_pub_lwp_alloc_and_switch(pid_t, lwpid_t); -struct lwp * rump_pub_lwp_curlwp(void); -void rump_pub_lwp_switch(struct lwp *); -void rump_pub_lwp_release(struct lwp *); +int rump_pub_lwproc_newproc(void); +int rump_pub_lwproc_newlwp(pid_t); +void rump_pub_lwproc_switch(struct lwp *); +void rump_pub_lwproc_releaselwp(void); +struct lwp * rump_pub_lwproc_curlwp(void); +void rump_pub_allbetsareoff_setid(pid_t, int); int rump_pub_sysproxy_set(rump_sysproxy_t, void *); int rump_pub_sysproxy_socket_setup_client(int); int rump_pub_sysproxy_socket_setup_server(int); Index: src/sys/rump/librump/rumpkern/rumpkern_if_priv.h diff -u src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.7 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.8 --- src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.7 Wed Apr 14 14:14:52 2010 +++ src/sys/rump/librump/rumpkern/rumpkern_if_priv.h Wed Sep 1 19:33:05 2010 @@ -1,9 +1,9 @@ -/* $NetBSD: rumpkern_if_priv.h,v 1.7 2010/04/14 14:14:52 pooka Exp $ */ +/* $NetBSD: rumpkern_if_priv.h,v 1.8 2010/09/01 19:33:05 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.4 2010/03/05 18:41:46 pooka Exp - * by: NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.6 2010/09/01 19:13:38 pooka Exp + * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp */ void rump_reboot(int); @@ -16,14 +16,13 @@ off_t rump_uio_getoff(struct uio *); size_t rump_uio_free(struct uio *); struct kauth_cred* rump_cred_create(uid_t, gid_t, size_t, gid_t *); -struct kauth_cred* rump_cred_suserget(void); void rump_cred_put(struct kauth_cred *); -struct lwp * rump_newproc_switch(void); -struct lwp * rump_lwp_alloc(pid_t, lwpid_t); -struct lwp * rump_lwp_alloc_and_switch(pid_t, lwpid_t); -struct lwp * rump_lwp_curlwp(void); -void rump_lwp_switch(struct lwp *); -void rump_lwp_release(struct lwp *); +int rump_lwproc_newproc(void); +int rump_lwproc_newlwp(pid_t); +void rump_lwproc_switch(struct lwp *); +void rump_lwproc_releaselwp(void); +struct lwp * rump_lwproc_curlwp(void); +void rump_allbetsareoff_setid(pid_t, int); int rump_sysproxy_set(rump_sysproxy_t, void *); int rump_sysproxy_socket_setup_client(int); int rump_sysproxy_socket_setup_server(int); Index: src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c diff -u src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.7 src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.8 --- src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.7 Wed Apr 14 14:14:52 2010 +++ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c Wed Sep 1 19:33:05 2010 @@ -1,9 +1,9 @@ -/* $NetBSD: rumpkern_if_wrappers.c,v 1.7 2010/04/14 14:14:52 pooka Exp $ */ +/* $NetBSD: rumpkern_if_wrappers.c,v 1.8 2010/09/01 19:33:05 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.4 2010/03/05 18:41:46 pooka Exp - * by: NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.6 2010/09/01 19:13:38 pooka Exp + * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01
CVS commit: src/sys
Module Name:src Committed By: pooka Date: Wed Sep 1 19:37:59 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c rump.c rump_private.h scheduler.c sysproxy_socket.c threads.c src/sys/sys: lwp.h Added Files: src/sys/rump/librump/rumpkern: lwproc.c Log Message: Implement rump_lwproc: the new lwp/proc management routines for rump. These move the management of the pid/lwpid space from the application into the kernel, make code more robust, and make it possible to attach multiple lwp's to non-proc0 processes. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.144 -r1.145 src/sys/rump/librump/rumpkern/emul.c cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.183 -r1.184 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.54 -r1.55 src/sys/rump/librump/rumpkern/rump_private.h cvs rdiff -u -r1.18 -r1.19 src/sys/rump/librump/rumpkern/scheduler.c cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpkern/sysproxy_socket.c cvs rdiff -u -r1.11 -r1.12 src/sys/rump/librump/rumpkern/threads.c cvs rdiff -u -r1.137 -r1.138 src/sys/sys/lwp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.95 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.96 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.95 Mon Aug 30 09:44:40 2010 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Sep 1 19:37:58 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.95 2010/08/30 09:44:40 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.96 2010/09/01 19:37:58 pooka Exp $ # .include ${RUMPTOP}/Makefile.rump @@ -15,9 +15,9 @@ # # Source modules, first the ones specifically implemented for librump. # -SRCS= rump.c rumpcopy.c emul.c intr.c klock.c kobj_rename.c \ - ltsleep.c memalloc.c scheduler.c signals.c sleepq.c \ - sysproxy_socket.c threads.c vm.c +SRCS= rump.c rumpcopy.c emul.c intr.c lwproc.c klock.c \ + kobj_rename.c ltsleep.c memalloc.c scheduler.c \ + signals.c sleepq.c sysproxy_socket.c threads.c vm.c SRCS+= compat.c # Multiprocessor or uniprocessor locking. TODO: select right Index: src/sys/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.144 src/sys/rump/librump/rumpkern/emul.c:1.145 --- src/sys/rump/librump/rumpkern/emul.c:1.144 Wed Jun 23 08:36:03 2010 +++ src/sys/rump/librump/rumpkern/emul.c Wed Sep 1 19:37:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.144 2010/06/23 08:36:03 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.145 2010/09/01 19:37:58 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.144 2010/06/23 08:36:03 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.145 2010/09/01 19:37:58 pooka Exp $); #include sys/param.h #include sys/null.h @@ -158,6 +158,25 @@ (*l-l_syncobj-sobj_unsleep)(l, cleanup); } +void +lwp_update_creds(struct lwp *l) +{ + struct proc *p; + kauth_cred_t oldcred; + + p = l-l_proc; + oldcred = l-l_cred; + l-l_prflag = ~LPR_CRMOD; + + mutex_enter(p-p_lock); + kauth_cred_hold(p-p_cred); + l-l_cred = p-p_cred; + mutex_exit(p-p_lock); + + if (oldcred != NULL) + kauth_cred_free(oldcred); +} + vaddr_t calc_cache_size(struct vm_map *map, int pct, int va_pct) { Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.183 src/sys/rump/librump/rumpkern/rump.c:1.184 --- src/sys/rump/librump/rumpkern/rump.c:1.183 Mon Aug 30 10:49:40 2010 +++ src/sys/rump/librump/rumpkern/rump.c Wed Sep 1 19:37:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.183 2010/08/30 10:49:40 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.184 2010/09/01 19:37:58 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.183 2010/08/30 10:49:40 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.184 2010/09/01 19:37:58 pooka Exp $); #include sys/systm.h #define ELFSIZE ARCH_ELFSIZE @@ -303,11 +303,12 @@ kauth_init(); rump_susercred = rump_cred_create(0, 0, 0, NULL); - l-l_cred = rump_cred_suserget(); - l-l_proc = proc0; - procinit(); proc0_init(); + + l-l_proc = proc0; + lwp_update_creds(l); + lwpinit_specificdata(); lwp_initspecific(lwp0); @@ -483,138 +484,6 @@ return resid; } -static pid_t nextpid = 1; -struct lwp * -rump_newproc_switch() -{ - struct lwp *l; - pid_t mypid; - - mypid = atomic_inc_uint_nv(nextpid); - if (__predict_false(mypid == 0)) - mypid = atomic_inc_uint_nv(nextpid); - - l = rump_lwp_alloc(mypid, 0); - rump_lwp_switch(l); - - return l; -} - -struct lwp * -rump_lwp_alloc_and_switch(pid_t pid, lwpid_t lid) -{ - struct lwp *l; -
CVS commit: src/lib
Module Name:src Committed By: pooka Date: Wed Sep 1 19:40:35 UTC 2010 Modified Files: src/lib/libp2k: p2k.c src/lib/libukfs: ukfs.c Log Message: update to new rump proc/lwp interfaces To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/libp2k/p2k.c cvs rdiff -u -r1.52 -r1.53 src/lib/libukfs/ukfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libp2k/p2k.c diff -u src/lib/libp2k/p2k.c:1.41 src/lib/libp2k/p2k.c:1.42 --- src/lib/libp2k/p2k.c:1.41 Thu Jun 24 13:03:05 2010 +++ src/lib/libp2k/p2k.c Wed Sep 1 19:40:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: p2k.c,v 1.41 2010/06/24 13:03:05 hannken Exp $ */ +/* $NetBSD: p2k.c,v 1.42 2010/09/01 19:40:35 pooka Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. @@ -141,7 +141,7 @@ cred = cred_create(pcn-pcn_cred); /* LINTED: prehistoric types in first two args */ return rump_pub_makecn(pcn-pcn_nameiop, pcn-pcn_flags | myflags, - pcn-pcn_name, pcn-pcn_namelen, cred, rump_pub_lwp_curlwp()); + pcn-pcn_name, pcn-pcn_namelen, cred, rump_pub_lwproc_curlwp()); } static __inline void @@ -158,15 +158,7 @@ lwpid_t lid; puffs_cc_getcaller(puffs_cc_getcc(pu), pid, lid); - rump_pub_lwp_alloc_and_switch(pid, lid); -} - -/*ARGSUSED*/ -static void -clearlwp(struct puffs_usermount *pu) -{ - - rump_pub_lwp_release(rump_pub_lwp_curlwp()); + rump_pub_allbetsareoff_setid(pid, lid); } static __inline struct p2k_vp_hash * @@ -372,6 +364,8 @@ if (p2m) rump_init(); + rump_pub_lwproc_newproc(); + return p2m; } @@ -463,7 +457,7 @@ puffs_setfhsize(pu, 0, PUFFS_FHFLAG_PASSTHROUGH); puffs_setstacksize(pu, PUFFS_STACKSIZE_MIN); puffs_fakecc = 1; - puffs_set_prepost(pu, makelwp, clearlwp); + puffs_set_prepost(pu, makelwp, NULL); puffs_set_errnotify(pu, p2k_errcatcher); puffs_setspecific(pu, p2m); @@ -568,11 +562,14 @@ { struct p2k_mount *p2m = puffs_getspecific(pu); struct ukfs *fs = p2m-p2m_ukfs; + struct lwp *l; int error = 0; - rump_pub_lwp_release(rump_pub_lwp_curlwp()); /* ukfs curlwp tricks */ - rump_pub_vp_rele(p2m-p2m_rvp); + + l = rump_pub_lwproc_curlwp(); + rump_pub_lwproc_switch(NULL); /* ukfs curlwp tricks */ + if (fs) { if (ukfs_release(fs, 0) != 0) { ukfs_release(fs, UKFS_RELFLAG_FORCE); @@ -580,6 +577,7 @@ } } p2m-p2m_ukfs = NULL; + rump_pub_lwproc_switch(l); if (p2m-p2m_hasdebug) { printf(-- rump kernel event counters --\n); @@ -587,7 +585,6 @@ printf(-- end of event counters --\n); } - rump_pub_lwp_alloc_and_switch(0, 0); return error; } Index: src/lib/libukfs/ukfs.c diff -u src/lib/libukfs/ukfs.c:1.52 src/lib/libukfs/ukfs.c:1.53 --- src/lib/libukfs/ukfs.c:1.52 Mon Jul 19 15:35:38 2010 +++ src/lib/libukfs/ukfs.c Wed Sep 1 19:40:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ukfs.c,v 1.52 2010/07/19 15:35:38 pooka Exp $ */ +/* $NetBSD: ukfs.c,v 1.53 2010/09/01 19:40:34 pooka Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. @@ -74,7 +74,6 @@ void *ukfs_specific; pthread_spinlock_t ukfs_spin; - pid_t ukfs_nextpid; struct vnode *ukfs_cdir; int ukfs_devfd; char *ukfs_devpath; @@ -124,26 +123,12 @@ #define pthread_spin_destroy(a) #endif -static pid_t -nextpid(struct ukfs *ukfs) -{ - pid_t npid; - - pthread_spin_lock(ukfs-ukfs_spin); - if (ukfs-ukfs_nextpid == 0) - ukfs-ukfs_nextpid++; - npid = ukfs-ukfs_nextpid++; - pthread_spin_unlock(ukfs-ukfs_spin); - - return npid; -} - static void precall(struct ukfs *ukfs) { struct vnode *rvp, *cvp; - rump_pub_lwp_alloc_and_switch(nextpid(ukfs), 1); + rump_pub_lwproc_newproc(); rvp = ukfs_getrvp(ukfs); pthread_spin_lock(ukfs-ukfs_spin); cvp = ukfs-ukfs_cdir; @@ -160,7 +145,8 @@ rvp = ukfs_getrvp(ukfs); rump_pub_rcvp_set(NULL, rvp); rump_pub_vp_rele(rvp); - rump_pub_lwp_release(rump_pub_lwp_curlwp()); + + rump_pub_lwproc_releaselwp(); } struct ukfs_part { @@ -685,19 +671,19 @@ mntflag = 0; if (flags UKFS_RELFLAG_FORCE) mntflag = MNT_FORCE; - rump_pub_lwp_alloc_and_switch(nextpid(fs), 1); + rump_pub_lwproc_newproc(); rump_pub_vp_rele(fs-ukfs_rvp); fs-ukfs_rvp = NULL; rv = rump_sys_unmount(fs-ukfs_mountpath, mntflag); if (rv == -1) { error = errno; rump_pub_vfs_root(fs-ukfs_mp, fs-ukfs_rvp, 0); - rump_pub_lwp_release(rump_pub_lwp_curlwp()); + rump_pub_lwproc_releaselwp(); ukfs_chdir(fs, fs-ukfs_mountpath); errno = error; return -1; } - rump_pub_lwp_release(rump_pub_lwp_curlwp()); + rump_pub_lwproc_releaselwp(); } if (fs-ukfs_devpath) { @@ -773,7 +759,7 @@ struct kauth_cred *cred; uio = rump_pub_uio_setup(buf, bufsize, *off, RUMPUIO_READ); - cred = rump_pub_cred_suserget(); + cred = rump_pub_cred_create(0, 0, 0, NULL); rv = RUMP_VOP_READDIR(vp, uio, cred, eofflag, NULL, NULL); rump_pub_cred_put(cred); RUMP_VOP_UNLOCK(vp);
CVS commit: src/tests
Module Name:src Committed By: pooka Date: Wed Sep 1 19:41:28 UTC 2010 Modified Files: src/tests/fs/common: fstest_puffs.c src/tests/fs/tmpfs: t_renamerace.c src/tests/fs/vfs: t_renamerace.c src/tests/syscall: t_cmsg.c Log Message: update to new rump lwp/proc interfaces To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/common/fstest_puffs.c cvs rdiff -u -r1.8 -r1.9 src/tests/fs/tmpfs/t_renamerace.c cvs rdiff -u -r1.11 -r1.12 src/tests/fs/vfs/t_renamerace.c cvs rdiff -u -r1.14 -r1.15 src/tests/syscall/t_cmsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/common/fstest_puffs.c diff -u src/tests/fs/common/fstest_puffs.c:1.2 src/tests/fs/common/fstest_puffs.c:1.3 --- src/tests/fs/common/fstest_puffs.c:1.2 Fri Jul 30 16:15:05 2010 +++ src/tests/fs/common/fstest_puffs.c Wed Sep 1 19:41:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fstest_puffs.c,v 1.2 2010/07/30 16:15:05 pooka Exp $ */ +/* $NetBSD: fstest_puffs.c,v 1.3 2010/09/01 19:41:27 pooka Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -72,8 +72,7 @@ phdr = (void *)buf; preq = (void *)buf; - /* use static thread id */ - rump_pub_lwp_alloc_and_switch(0, 10); + rump_pub_lwproc_newlwp(0); for (;;) { ssize_t n; @@ -114,8 +113,7 @@ size_t toread; int comfd, puffsfd; - /* use static thread id */ - rump_pub_lwp_alloc_and_switch(0, 11); + rump_pub_lwproc_newlwp(0); comfd = args-pta_servfd; puffsfd = args-pta_rumpfd; Index: src/tests/fs/tmpfs/t_renamerace.c diff -u src/tests/fs/tmpfs/t_renamerace.c:1.8 src/tests/fs/tmpfs/t_renamerace.c:1.9 --- src/tests/fs/tmpfs/t_renamerace.c:1.8 Wed Jul 14 21:39:31 2010 +++ src/tests/fs/tmpfs/t_renamerace.c Wed Sep 1 19:41:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_renamerace.c,v 1.8 2010/07/14 21:39:31 pooka Exp $ */ +/* $NetBSD: t_renamerace.c,v 1.9 2010/09/01 19:41:27 pooka Exp $ */ /* * Modified for rump and atf from a program supplied @@ -33,13 +33,14 @@ } static volatile int quittingtime = 0; +static pid_t wrkpid; static void * r2w1(void *arg) { int fd; - rump_pub_lwp_alloc_and_switch(0, 0); + rump_pub_lwproc_newlwp(wrkpid); fd = rump_sys_open(/file, O_CREAT | O_RDWR, 0777); if (fd == -1) @@ -61,7 +62,7 @@ { int fd; - rump_pub_lwp_alloc_and_switch(0, 0); + rump_pub_lwproc_newlwp(wrkpid); while (!quittingtime) { fd = rump_sys_open(/dir/file1, O_RDWR); @@ -104,6 +105,8 @@ if (rump_sys_mkdir(/dir, 0777) == -1) atf_tc_fail_errno(cannot create directory); + RZ(rump_pub_lwproc_newproc()); + RL(wrkpid = rump_sys_getpid()); pthread_create(pt[0], NULL, r2w1, NULL); pthread_create(pt[1], NULL, r2w2, NULL); Index: src/tests/fs/vfs/t_renamerace.c diff -u src/tests/fs/vfs/t_renamerace.c:1.11 src/tests/fs/vfs/t_renamerace.c:1.12 --- src/tests/fs/vfs/t_renamerace.c:1.11 Thu Aug 26 18:06:44 2010 +++ src/tests/fs/vfs/t_renamerace.c Wed Sep 1 19:41:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_renamerace.c,v 1.11 2010/08/26 18:06:44 pooka Exp $ */ +/* $NetBSD: t_renamerace.c,v 1.12 2010/09/01 19:41:28 pooka Exp $ */ /* * Modified for rump and atf from a program supplied @@ -25,13 +25,14 @@ #include ../../h_macros.h static volatile int quittingtime; +pid_t wrkpid; static void * w1(void *arg) { int fd; - rump_pub_lwp_alloc_and_switch(0, 10); + rump_pub_lwproc_newlwp(wrkpid); while (!quittingtime) { fd = rump_sys_open(rename.test1, @@ -49,7 +50,7 @@ w1_dirs(void *arg) { - rump_pub_lwp_alloc_and_switch(0, 10); + rump_pub_lwproc_newlwp(wrkpid); while (!quittingtime) { if (rump_sys_mkdir(rename.test1, 0777) == -1) @@ -64,7 +65,7 @@ w2(void *arg) { - rump_pub_lwp_alloc_and_switch(0, 11); + rump_pub_lwproc_newlwp(wrkpid); while (!quittingtime) { rump_sys_rename(rename.test1, rename.test2); @@ -123,6 +124,9 @@ FSTYPE_MSDOS(tc)) atf_tc_expect_signal(-1, PR kern/43626); + RZ(rump_pub_lwproc_newproc()); + RL(wrkpid = rump_sys_getpid()); + RL(rump_sys_chdir(mp)); pthread_create(pt1, NULL, w1_dirs, NULL); pthread_create(pt2, NULL, w2, NULL); Index: src/tests/syscall/t_cmsg.c diff -u src/tests/syscall/t_cmsg.c:1.14 src/tests/syscall/t_cmsg.c:1.15 --- src/tests/syscall/t_cmsg.c:1.14 Fri Aug 27 10:03:14 2010 +++ src/tests/syscall/t_cmsg.c Wed Sep 1 19:41:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_cmsg.c,v 1.14 2010/08/27 10:03:14 pgoyette Exp $ */ +/* $NetBSD: t_cmsg.c,v 1.15 2010/09/01 19:41:28 pooka Exp $ */ #include sys/types.h #include sys/mount.h @@ -92,7 +92,8 @@ rump_init(); /* create first (non-proc0) process to be used in test */ - l1 = rump_pub_newproc_switch(); + RZ(rump_pub_lwproc_newproc()); + l1 = rump_pub_lwproc_curlwp(); /* create unix socket and bind it to a path */ memset(sun, 0, sizeof(sun)); @@ -108,7 +109,8 @@ atf_tc_fail_errno(socket 1 listen); /* create second process for test */ - l2 =
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Wed Sep 1 19:46:15 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: version.h Log Message: Bump version number for latest changes To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 \ src/crypto/external/bsd/netpgp/dist/src/lib/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/version.h diff -u src/crypto/external/bsd/netpgp/dist/src/lib/version.h:1.39 src/crypto/external/bsd/netpgp/dist/src/lib/version.h:1.40 --- src/crypto/external/bsd/netpgp/dist/src/lib/version.h:1.39 Fri Aug 13 18:29:41 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/version.h Wed Sep 1 19:46:14 2010 @@ -58,7 +58,7 @@ #endif /* development versions have .99 suffix */ -#define NETPGP_BASE_VERSION 3.99.9 +#define NETPGP_BASE_VERSION 3.99.10 #define NETPGP_VERSION_CAT(a, b) NetPGP portable a /[ b ] #define NETPGP_VERSION_STRING \
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Sep 1 19:57:52 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: sysproxy_socket.c Log Message: use curlwp To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpkern/sysproxy_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/sysproxy_socket.c diff -u src/sys/rump/librump/rumpkern/sysproxy_socket.c:1.8 src/sys/rump/librump/rumpkern/sysproxy_socket.c:1.9 --- src/sys/rump/librump/rumpkern/sysproxy_socket.c:1.8 Wed Sep 1 19:37:59 2010 +++ src/sys/rump/librump/rumpkern/sysproxy_socket.c Wed Sep 1 19:57:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysproxy_socket.c,v 1.8 2010/09/01 19:37:59 pooka Exp $ */ +/* $NetBSD: sysproxy_socket.c,v 1.9 2010/09/01 19:57:52 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysproxy_socket.c,v 1.8 2010/09/01 19:37:59 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: sysproxy_socket.c,v 1.9 2010/09/01 19:57:52 pooka Exp $); #include sys/param.h #include sys/kernel.h @@ -372,7 +372,7 @@ struct sysproxy_qent *qent = get_qent(); struct rumprpc_sysresp resp; struct sysent *callp; - struct lwp *mylwp, *l; + struct lwp *mylwp; resp.rpc_head.rpch_flen = sizeof(resp); resp.rpc_head.rpch_reqno = req-rpc_head.rpch_reqno; @@ -392,7 +392,7 @@ rump_set_vmspace(rump_sysproxy_vmspace); resp.rpc_retval = 0; /* default */ - resp.rpc_error = callp-sy_call(l, (void *)req-rpc_data, + resp.rpc_error = callp-sy_call(curlwp, (void *)req-rpc_data, resp.rpc_retval); rump_lwproc_releaselwp(); rump_lwproc_switch(mylwp);
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Sep 1 21:16:56 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: lwproc.c Log Message: proper panic for trying to release implicit lwp To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpkern/lwproc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/lwproc.c diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.1 src/sys/rump/librump/rumpkern/lwproc.c:1.2 --- src/sys/rump/librump/rumpkern/lwproc.c:1.1 Wed Sep 1 19:37:58 2010 +++ src/sys/rump/librump/rumpkern/lwproc.c Wed Sep 1 21:16:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: lwproc.c,v 1.1 2010/09/01 19:37:58 pooka Exp $ */ +/* $NetBSD: lwproc.c,v 1.2 2010/09/01 21:16:56 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lwproc.c,v 1.1 2010/09/01 19:37:58 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: lwproc.c,v 1.2 2010/09/01 21:16:56 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -320,6 +320,9 @@ struct proc *p; struct lwp *l = curlwp; + if (l-l_refcnt == 0 l-l_flag LW_WEXIT) + panic(releasing non-pertinent lwp); + p = l-l_proc; mutex_enter(p-p_lock); KASSERT(l-l_refcnt != 0);
CVS commit: src/tests/rump/rumpkern
Module Name:src Committed By: pooka Date: Wed Sep 1 21:18:14 UTC 2010 Modified Files: src/tests/rump/rumpkern: Makefile Added Files: src/tests/rump/rumpkern: t_lwproc.c Log Message: tests for rump_lwproc To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/rump/rumpkern/Makefile cvs rdiff -u -r0 -r1.1 src/tests/rump/rumpkern/t_lwproc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/Makefile diff -u src/tests/rump/rumpkern/Makefile:1.7 src/tests/rump/rumpkern/Makefile:1.8 --- src/tests/rump/rumpkern/Makefile:1.7 Mon May 31 23:36:12 2010 +++ src/tests/rump/rumpkern/Makefile Wed Sep 1 21:18:14 2010 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.7 2010/05/31 23:36:12 pooka Exp $ +# $NetBSD: Makefile,v 1.8 2010/09/01 21:18:14 pooka Exp $ .include bsd.own.mk TESTSDIR= ${TESTSBASE}/rump/rumpkern -TESTS_C= t_modcmd +TESTS_C= t_lwproc +TESTS_C+= t_modcmd TESTS_C+= t_modlinkset TESTS_C+= t_threads TESTS_C+= t_tsleep Added files: Index: src/tests/rump/rumpkern/t_lwproc.c diff -u /dev/null src/tests/rump/rumpkern/t_lwproc.c:1.1 --- /dev/null Wed Sep 1 21:18:14 2010 +++ src/tests/rump/rumpkern/t_lwproc.c Wed Sep 1 21:18:14 2010 @@ -0,0 +1,218 @@ +/* $NetBSD: t_lwproc.c,v 1.1 2010/09/01 21:18:14 pooka Exp $ */ + +/* + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND + * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include sys/types.h +#include sys/wait.h + +#include rump/rump.h +#include rump/rump_syscalls.h + +#include atf-c.h +#include err.h +#include errno.h +#include stdio.h +#include stdlib.h +#include string.h +#include unistd.h +#include util.h + +#include ../../h_macros.h + +ATF_TC(makelwp); +ATF_TC_HEAD(makelwp, tc) +{ + + atf_tc_set_md_var(tc, descr, tests that lwps can be attached to + processes); +} + +ATF_TC_BODY(makelwp, tc) +{ + struct lwp *l; + pid_t pid; + + rump_init(); + RZ(rump_pub_lwproc_newlwp(0)); + ATF_REQUIRE_EQ(rump_pub_lwproc_newlwp(37), ESRCH); + l = rump_pub_lwproc_curlwp(); + + RZ(rump_pub_lwproc_newproc()); + ATF_REQUIRE(rump_pub_lwproc_curlwp() != l); + l = rump_pub_lwproc_curlwp(); + + RZ(rump_pub_lwproc_newlwp(rump_sys_getpid())); + ATF_REQUIRE(rump_pub_lwproc_curlwp() != l); + + pid = rump_sys_getpid(); + ATF_REQUIRE(pid != -1 pid != 0); +} + +ATF_TC(proccreds); +ATF_TC_HEAD(proccreds, tc) +{ + + atf_tc_set_md_var(tc, descr, check that procs have different creds); +} + +ATF_TC_BODY(proccreds, tc) +{ + struct lwp *l1, *l2; + + rump_init(); + RZ(rump_pub_lwproc_newproc()); + l1 = rump_pub_lwproc_curlwp(); + + RZ(rump_pub_lwproc_newproc()); + l2 = rump_pub_lwproc_curlwp(); + + RL(rump_sys_setuid(22)); + ATF_REQUIRE_EQ(rump_sys_getuid(), 22); + + rump_pub_lwproc_switch(l1); + ATF_REQUIRE_EQ(rump_sys_getuid(), 0); /* from parent, proc0 */ + RL(rump_sys_setuid(11)); + ATF_REQUIRE_EQ(rump_sys_getuid(), 11); + + rump_pub_lwproc_switch(l2); + ATF_REQUIRE_EQ(rump_sys_getuid(), 22); + rump_pub_lwproc_newlwp(rump_sys_getpid()); + ATF_REQUIRE_EQ(rump_sys_getuid(), 22); +} + + +ATF_TC(inherit); +ATF_TC_HEAD(inherit, tc) +{ + + atf_tc_set_md_var(tc, descr, new processes inherit creds from + parents); +} + +ATF_TC_BODY(inherit, tc) +{ + + rump_init(); + + RZ(rump_pub_lwproc_newproc()); + RL(rump_sys_setuid(66)); + ATF_REQUIRE_EQ(rump_sys_getuid(), 66); + + RZ(rump_pub_lwproc_newproc()); + ATF_REQUIRE_EQ(rump_sys_getuid(), 66); + + /* release lwp and proc */ + rump_pub_lwproc_releaselwp(); + ATF_REQUIRE_EQ(rump_sys_getuid(), 0); +} + +ATF_TC(lwps); +ATF_TC_HEAD(lwps, tc) +{ + + atf_tc_set_md_var(tc, descr, proc can hold
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: pooka Date: Wed Sep 1 21:19:37 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi Log Message: +tp To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.141 src/distrib/sets/lists/tests/mi:1.142 --- src/distrib/sets/lists/tests/mi:1.141 Wed Sep 1 15:18:47 2010 +++ src/distrib/sets/lists/tests/mi Wed Sep 1 21:19:37 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.141 2010/09/01 15:18:47 njoly Exp $ +# $NetBSD: mi,v 1.142 2010/09/01 21:19:37 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -360,6 +360,7 @@ ./usr/libdata/debug/usr/tests/rump/modautoloadtests-syscall-debug ./usr/libdata/debug/usr/tests/rump/modautoload/t_modautoload.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpkerntests-syscall-debug +./usr/libdata/debug/usr/tests/rump/rumpkern/t_lwproc.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpkern/t_modcmd.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpkern/t_modlinkset.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpkern/t_threads.debug tests-syscall-debug debug,atf @@ -1533,6 +1534,7 @@ ./usr/tests/rump/modautoload/t_modautoload tests-rump-tests atf ./usr/tests/rump/rumpkern tests-rump-tests ./usr/tests/rump/rumpkern/Atffile tests-rump-tests atf +./usr/tests/rump/rumpkern/t_lwproc tests-rump-tests atf ./usr/tests/rump/rumpkern/t_modcmd tests-rump-tests atf ./usr/tests/rump/rumpkern/t_modlinkset tests-rump-tests atf ./usr/tests/rump/rumpkern/t_threads tests-rump-tests atf
CVS commit: src/usr.bin/audiocfg
Module Name:src Committed By: jmcneill Date: Wed Sep 1 21:54:00 UTC 2010 Modified Files: src/usr.bin/audiocfg: dtmf.c Log Message: use htole16 to ensure that the pcm stream is slinear16_le on big endian hosts To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/audiocfg/dtmf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audiocfg/dtmf.c diff -u src/usr.bin/audiocfg/dtmf.c:1.1 src/usr.bin/audiocfg/dtmf.c:1.2 --- src/usr.bin/audiocfg/dtmf.c:1.1 Wed Sep 1 09:04:16 2010 +++ src/usr.bin/audiocfg/dtmf.c Wed Sep 1 21:54:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dtmf.c,v 1.1 2010/09/01 09:04:16 jmcneill Exp $ */ +/* $NetBSD: dtmf.c,v 1.2 2010/09/01 21:54:00 jmcneill Exp $ */ /* * Copyright (c) 2010 Jared D. McNeill jmcne...@invisible.ca @@ -26,6 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include sys/endian.h + #include fcntl.h #include math.h #include stdio.h @@ -50,9 +52,10 @@ for (c = 0; c channels; c++) { if ((chanmask (1 c)) == 0) continue; - buf[c] = + buf[c] = htole16( (sin(i * PI2 * (freq1 / sample_rate)) + - sin(i * PI2 * (freq2 / sample_rate))) * 16383; + sin(i * PI2 * (freq2 / sample_rate))) * 16383 + ); } buf += channels; }
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Thu Sep 2 01:55:31 UTC 2010 Modified Files: src/sys/dev/pci/hdaudio: files.hdaudio hdaudio.c hdaudio_afg.c Added Files: src/sys/dev/pci/hdaudio: hdaudio_ids.c hdaudio_ids.h Log Message: add a list of codec id-name mappings. they are printed at attach time and exported via the AUDIO_GETDEV ioctl To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/hdaudio/files.hdaudio cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/hdaudio/hdaudio.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/hdaudio/hdaudio_afg.c cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/hdaudio/hdaudio_ids.c \ src/sys/dev/pci/hdaudio/hdaudio_ids.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/hdaudio/files.hdaudio diff -u src/sys/dev/pci/hdaudio/files.hdaudio:1.2 src/sys/dev/pci/hdaudio/files.hdaudio:1.3 --- src/sys/dev/pci/hdaudio/files.hdaudio:1.2 Tue Sep 8 09:50:56 2009 +++ src/sys/dev/pci/hdaudio/files.hdaudio Thu Sep 2 01:55:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.hdaudio,v 1.2 2009/09/08 09:50:56 jmcneill Exp $ +# $NetBSD: files.hdaudio,v 1.3 2010/09/02 01:55:31 jmcneill Exp $ # # Intel High Definition Audio (Revision 1.0) @@ -6,6 +6,7 @@ define hdaudiobus {[nid = -1]} device hdaudio: hdaudiobus file dev/pci/hdaudio/hdaudio.c hdaudio +file dev/pci/hdaudio/hdaudio_ids.c hdaudio device hdafg: audiobus, auconv, aurateconv, mulaw attach hdafg at hdaudiobus Index: src/sys/dev/pci/hdaudio/hdaudio.c diff -u src/sys/dev/pci/hdaudio/hdaudio.c:1.7 src/sys/dev/pci/hdaudio/hdaudio.c:1.8 --- src/sys/dev/pci/hdaudio/hdaudio.c:1.7 Sat Aug 7 16:24:19 2010 +++ src/sys/dev/pci/hdaudio/hdaudio.c Thu Sep 2 01:55:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio.c,v 1.7 2010/08/07 16:24:19 jmcneill Exp $ */ +/* $NetBSD: hdaudio.c,v 1.8 2010/09/02 01:55:31 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdaudio.c,v 1.7 2010/08/07 16:24:19 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: hdaudio.c,v 1.8 2010/09/02 01:55:31 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -619,7 +619,7 @@ aprint_normal(%s at %s, type, pnp); } - aprint_normal( vendor 0x%04X product 0x%04X nid 0x%02X, + aprint_debug( vendor 0x%04X product 0x%04X nid 0x%02X, vendor, product, nid); return UNCONF; Index: src/sys/dev/pci/hdaudio/hdaudio_afg.c diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.26 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.27 --- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.26 Thu Aug 19 18:06:37 2010 +++ src/sys/dev/pci/hdaudio/hdaudio_afg.c Thu Sep 2 01:55:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio_afg.c,v 1.26 2010/08/19 18:06:37 jmcneill Exp $ */ +/* $NetBSD: hdaudio_afg.c,v 1.27 2010/09/02 01:55:31 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.26 2010/08/19 18:06:37 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.27 2010/09/02 01:55:31 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -79,6 +79,7 @@ #include dev/pci/hdaudio/hdaudioreg.h #include dev/pci/hdaudio/hdaudio_mixer.h #include dev/pci/hdaudio/hdaudioio.h +#include dev/pci/hdaudio/hdaudio_ids.h #ifndef AUFMT_SURROUND_7_1 #define AUFMT_SURROUND_7_1 (AUFMT_DOLBY_5_1|AUFMT_SIDE_LEFT|AUFMT_SIDE_RIGHT) @@ -331,12 +332,6 @@ hdaudio_afg_childdet ); -static const struct audio_device hdaudio_afg_audio_device = { - HD Audio, - 1.0, - hdaudio -}; - static int hdaudio_afg_query_encoding(void *, struct audio_encoding *); static int hdaudio_afg_set_params(void *, int, int, audio_params_t *, @@ -3163,6 +3158,7 @@ struct hdaudio_afg_softc *sc = device_private(self); audio_params_t defparams; prop_dictionary_t args = opaque; + char vendor[16], product[16]; uint64_t fgptr = 0; uint8_t nid = 0; int err; @@ -3180,8 +3176,15 @@ sc-sc_config = prop_dictionary_get(args, pin-config); if (sc-sc_config prop_object_type(sc-sc_config) != PROP_TYPE_ARRAY) sc-sc_config = NULL; - hda_print1(sc, (%s configuration)\n, sc-sc_config ? - custom : firmware); + + prop_dictionary_get_uint16(args, vendor-id, sc-sc_vendor); + prop_dictionary_get_uint16(args, product-id, sc-sc_product); + hdaudio_id2name(sc-sc_vendor, HDA_PRODUCT_ANY, + vendor, sizeof(vendor)); + hdaudio_id2name(sc-sc_vendor, sc-sc_product, + product, sizeof(product)); + hda_print1(sc, : %s %s%s\n, vendor, product, + sc-sc_config ? (custom configuration) : ); rv = prop_dictionary_get_uint64(args, function-group, fgptr); if (rv == false || fgptr == 0) { @@ -3193,8 +3196,6 @@ hda_error(sc, missing node-id property\n); return; } - prop_dictionary_get_uint16(args, vendor-id,
CVS commit: src/usr.bin/audiocfg
Module Name:src Committed By: jmcneill Date: Thu Sep 2 02:08:30 UTC 2010 Modified Files: src/usr.bin/audiocfg: main.c Log Message: print the version field from AUDIO_GETDEV if present To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/audiocfg/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audiocfg/main.c diff -u src/usr.bin/audiocfg/main.c:1.3 src/usr.bin/audiocfg/main.c:1.4 --- src/usr.bin/audiocfg/main.c:1.3 Wed Sep 1 09:18:03 2010 +++ src/usr.bin/audiocfg/main.c Thu Sep 2 02:08:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.3 2010/09/01 09:18:03 wiz Exp $ */ +/* $NetBSD: main.c,v 1.4 2010/09/02 02:08:30 jmcneill Exp $ */ /* * Copyright (c) 2010 Jared D. McNeill jmcne...@invisible.ca @@ -62,9 +62,12 @@ n = audiodev_count(); for (i = 0; i n; i++) { adev = audiodev_get(i); - printf(%u: [%c] %s: %s (%u playback channel%s)\n, - i, adev-defaultdev ? '*' : ' ', - adev-xname, adev-audio_device.name, + printf(%u: [%c] %s: , + i, adev-defaultdev ? '*' : ' ', adev-xname); + printf(%s, adev-audio_device.name); + if (strlen(adev-audio_device.version) 0) +printf( %s, adev-audio_device.version); + printf(, %u playback channel%s\n, adev-pchan, adev-pchan == 1 ? : s); } } else if (strcmp(argv[1], default) == 0 argc == 3) {
CVS commit: src/sys/arch/sparc/stand/common
Module Name:src Committed By: uwe Date: Thu Sep 2 03:14:43 UTC 2010 Modified Files: src/sys/arch/sparc/stand/common: promdev.c Log Message: Fix printf formats in -DDEBUG_PROM to make it compile. XXX: print daddr_t after casting it to int since libsa is not built with LIBSA_PRINTF_LONGLONG_SUPPORT by default. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sparc/stand/common/promdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/stand/common/promdev.c diff -u src/sys/arch/sparc/stand/common/promdev.c:1.25 src/sys/arch/sparc/stand/common/promdev.c:1.26 --- src/sys/arch/sparc/stand/common/promdev.c:1.25 Wed Aug 25 20:16:49 2010 +++ src/sys/arch/sparc/stand/common/promdev.c Thu Sep 2 03:14:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: promdev.c,v 1.25 2010/08/25 20:16:49 christos Exp $ */ +/* $NetBSD: promdev.c,v 1.26 2010/09/02 03:14:42 uwe Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -304,7 +304,7 @@ dblk += doffset; #endif #ifdef DEBUG_PROM - printf(promstrategy: size=%d dblk=%d\n, size, dblk); + printf(promstrategy: size=%zd dblk=%d\n, size, (int)dblk); #endif #define prom_bread(fd, nblk, dblk, buf) \ @@ -326,7 +326,7 @@ *rsize = dbtob(n); #ifdef DEBUG_PROM - printf(rsize = %x\n, *rsize); + printf(rsize = %zx\n, *rsize); #endif return (error); } @@ -343,7 +343,7 @@ dblk += doffset; #endif #ifdef DEBUG_PROM - printf(promstrategy: size=%d dblk=%d\n, size, dblk); + printf(promstrategy: size=%zd dblk=%d\n, size, (int)dblk); #endif #ifndef BOOTXX /* We know it's a block device, so save some space */ @@ -356,7 +356,7 @@ : prom_write(fd, buf, size); #ifdef DEBUG_PROM - printf(rsize = %x\n, *rsize); + printf(rsize = %zx\n, *rsize); #endif return (error); } @@ -382,7 +382,7 @@ dblk += doffset; #endif #ifdef DEBUG_PROM - printf(prom_strategy: size=%d dblk=%d\n, size, dblk); + printf(prom_strategy: size=%zd dblk=%d\n, size, (int)dblk); #endif dmabuf = dvma_mapin(buf, size); @@ -396,7 +396,7 @@ dvma_mapout(dmabuf, size); #ifdef DEBUG_PROM - printf(disk_strategy: xcnt = %x\n, xcnt); + printf(disk_strategy: xcnt = %zx\n, xcnt); #endif if (xcnt = 0) @@ -622,7 +622,7 @@ printf(d_dmabytes=%d\n, dip-d_dmabytes); printf(d_localbytes=%d\n, dip-d_localbytes); printf(d_stdcount=%d\n, dip-d_stdcount); - printf(d_stdaddrs[%d]=%x\n, bp-ctlrNum, dip-d_stdaddrs[bp-ctlrNum]); + printf(d_stdaddrs[%d]=%lx\n, bp-ctlrNum, dip-d_stdaddrs[bp-ctlrNum]); printf(d_devtype=%d\n, dip-d_devtype); printf(d_maxiobytes=%d\n, dip-d_maxiobytes); #endif @@ -643,7 +643,7 @@ si-si_devaddr = oldmon_mapin(dip-d_stdaddrs[si-si_ctlr], dip-d_devbytes, dip-d_devtype); #ifdef DEBUG_PROM - printf(prom_iopen: devaddr=0x%x pte=0x%x\n, + printf(prom_iopen: devaddr=%p pte=0x%x\n, si-si_devaddr, getpte4((u_long)si-si_devaddr ~PGOFSET)); #endif @@ -652,14 +652,14 @@ if (dip-d_dmabytes) { si-si_dmaaddr = dvma_alloc(dip-d_dmabytes); #ifdef DEBUG_PROM - printf(prom_iopen: dmaaddr=0x%x\n, si-si_dmaaddr); + printf(prom_iopen: dmaaddr=%p\n, si-si_dmaaddr); #endif } if (dip-d_localbytes) { si-si_devdata = alloc(dip-d_localbytes); #ifdef DEBUG_PROM - printf(prom_iopen: devdata=0x%x\n, si-si_devdata); + printf(prom_iopen: devdata=%p\n, si-si_devdata); #endif }
CVS commit: src/crypto/external/bsd/netpgp
Module Name:src Committed By: agc Date: Thu Sep 2 05:58:01 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/hkpd: Makefile Added Files: src/crypto/external/bsd/netpgp/dist/src/hkpclient: hkpc.1 hkpc.c hkpc.h main.c src/crypto/external/bsd/netpgp/dist/src/hkpd: hkpd.1 src/crypto/external/bsd/netpgp/hkpc: Makefile src/crypto/external/bsd/netpgp/hkpd: Makefile Removed Files: src/crypto/external/bsd/netpgp/dist/src/hkpd: hkpd.8 Log Message: Update hkpd to return its information in JSON (via libmj). Add a C HKP client. Provide reachover Makefiles for each, but do not hook them up to the build just yet. The HKP client and server can be embedded in other programs. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1 \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.c \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.h \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/main.c cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.1 cvs rdiff -u -r1.2 -r0 src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.8 cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/netpgp/hkpc/Makefile cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/netpgp/hkpd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile diff -u src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile:1.3 src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile:1.4 --- src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile:1.3 Wed Sep 1 17:25:57 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile Thu Sep 2 05:58:01 2010 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.3 2010/09/01 17:25:57 agc Exp $ +# $NetBSD: Makefile,v 1.4 2010/09/02 05:58:01 agc Exp $ PROG=hkpd SRCS=hkpd.c main.c CPPFLAGS+=-g # -DHAVE_CONFIG_H=1 LDFLAGS+=-g LDADD+= -lnetpgp -MAN=hkpd.8 +MAN=hkpd.1 WARNS=0 # anything over 0 will fail at the link stage with IDEA errors .include bsd.prog.mk Added files: Index: src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1 diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1:1.1 --- /dev/null Thu Sep 2 05:58:01 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1 Thu Sep 2 05:58:01 2010 @@ -0,0 +1,123 @@ +.\ $NetBSD: hkpc.1,v 1.1 2010/09/02 05:58:01 agc Exp $ +.\ +.\ Copyright (c) 2010 The NetBSD Foundation, Inc. +.\ All rights reserved. +.\ +.\ This manual page is derived from software contributed to +.\ The NetBSD Foundation by Alistair Crooks (a...@netbsd.org). +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\ POSSIBILITY OF SUCH DAMAGE. +.\ +.Dd September 1, 2010 +.Dt HKPC 1 +.Os +.Sh NAME +.Nm hkpc +.Nd retrieve public key information via HKP +.Sh SYNOPSIS +.Nm +.Op Fl f address-family +.Op Fl h hostname +.Op Fl p port +.Cm [get|index|vindex] +userid... +.Sh DESCRIPTION +The +.Nm +command retrieves public key information from the key server daemon +using the HKP protocol. +The +.Xr hkpd 8 +is normally used to retrieve public key information. +.Pp +Three types of information can be retrieved from the server: +.Bl -tag -width vindex +.It get +The public key, base64-encoded, corresponding to the given userid +is returned. +The userid can be a numeric value, a unique part of the human +identifier, or left blank. +The first matching key will be returned, in a format suitable for +importing to a keyring via the +.Xr netpgpkeys 1 +command. +.It