From owner-svn-src-user@FreeBSD.ORG Wed Sep 12 13:31:17 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FE7A106564A; Wed, 12 Sep 2012 13:31:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05CE68FC08; Wed, 12 Sep 2012 13:31:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CDVG2I076865; Wed, 12 Sep 2012 13:31:16 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CDVGIV076835; Wed, 12 Sep 2012 13:31:16 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209121331.q8CDVGIV076835@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 12 Sep 2012 13:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240394 - in user/des: bsddom bsddom/idl bsddom/idl/REC-DOM-Level-2-Core-20001113 bsddom/m4 election election/db evilhttpd fetch fetch/include fetch/include/Fetch fetch/lib fmerge grok ... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:31:17 -0000 Author: des Date: Wed Sep 12 13:31:16 2012 New Revision: 240394 URL: http://svn.freebsd.org/changeset/base/240394 Log: Move the src tinderbox code from projcvs. Added: user/des/bsddom/ user/des/bsddom/Makefile.am (contents, props changed) user/des/bsddom/autogen.sh (contents, props changed) user/des/bsddom/configure.ac (contents, props changed) user/des/bsddom/idl/ user/des/bsddom/idl/REC-DOM-Level-2-Core-20001113/ user/des/bsddom/m4/ user/des/election/ user/des/election/db/ user/des/evilhttpd/ user/des/fetch/Makefile.am (contents, props changed) user/des/fetch/autogen.sh (contents, props changed) user/des/fetch/configure.ac (contents, props changed) user/des/fetch/include/Fetch/ user/des/fetch/include/Fetch.hh (contents, props changed) user/des/fetch/include/Fetch/Client.hh (contents, props changed) user/des/fetch/include/Fetch/Document.hh (contents, props changed) user/des/fetch/include/Fetch/URL.hh (contents, props changed) user/des/fetch/include/Fetch/UserAgent.hh (contents, props changed) user/des/fetch/include/Makefile.am (contents, props changed) user/des/fetch/lib/Makefile.am (contents, props changed) user/des/fetch/lib/URL.cc (contents, props changed) user/des/grok/ user/des/refetch/Makefile.am (contents, props changed) user/des/refetch/autogen.sh (contents, props changed) user/des/refetch/configure.ac (contents, props changed) user/des/refetch/include/ user/des/refetch/include/Fetch/ user/des/refetch/include/Fetch/Client.hh (contents, props changed) user/des/refetch/include/Fetch/Document.hh (contents, props changed) user/des/refetch/include/Fetch/URL.hh (contents, props changed) user/des/refetch/include/Fetch/UserAgent.hh (contents, props changed) user/des/refetch/include/refetch/ user/des/refetch/lib/refetch/pURL.cc (contents, props changed) user/des/refetch/lib/refetch/pURL.hh (contents, props changed) user/des/struct/ user/des/struct/struct.cfg user/des/struct/struct.pl (contents, props changed) user/des/tinderbox/Makefile (contents, props changed) user/des/tinderbox/etc/ user/des/tinderbox/etc/Makefile (contents, props changed) user/des/tinderbox/etc/default.rc user/des/tinderbox/etc/head.rc user/des/tinderbox/etc/releng_4.rc user/des/tinderbox/etc/releng_5.rc user/des/tinderbox/etc/releng_6.rc user/des/tinderbox/etc/releng_7.rc user/des/tinderbox/etc/releng_8.rc user/des/tinderbox/etc/releng_9.rc user/des/tinderbox/etc/update_head.rc user/des/tinderbox/etc/update_releng_4.rc user/des/tinderbox/etc/update_releng_5.rc user/des/tinderbox/etc/update_releng_6.rc user/des/tinderbox/etc/update_releng_7.rc user/des/tinderbox/etc/update_releng_8.rc user/des/tinderbox/etc/update_releng_9.rc user/des/tinderbox/tbmaster.1 (contents, props changed) user/des/tinderbox/tbmaster.pl (contents, props changed) user/des/tinderbox/tinderbox.1 (contents, props changed) user/des/tinderbox/tinderbox.pl (contents, props changed) user/des/tinderbox/www/ user/des/tinderbox/www/Makefile (contents, props changed) user/des/tinderbox/www/favicon.ico (contents, props changed) user/des/tinderbox/www/index.cgi user/des/tinderbox/www/tb.css user/des/tinderbox/www/valid-css.png (contents, props changed) user/des/tinderbox/www/valid-xhtml10.png (contents, props changed) Directory Properties: user/des/fetch/ (props changed) user/des/fetch/bin/ (props changed) user/des/fetch/include/ (props changed) user/des/fetch/lib/ (props changed) user/des/refetch/ (props changed) user/des/refetch/bin/ (props changed) user/des/refetch/lib/ (props changed) user/des/refetch/lib/fetch/ (props changed) user/des/refetch/lib/refetch/ (props changed) user/des/tinderbox/ (props changed) Modified: user/des/fmerge/Makefile user/des/sizes/sizes.c Added: user/des/bsddom/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/bsddom/Makefile.am Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,5 @@ +# $Id$ + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = include lib Added: user/des/bsddom/autogen.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/bsddom/autogen.sh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $Id$ +# + +aclocal -I m4 +libtoolize --copy --force +autoheader +automake --add-missing --copy --foreign +autoconf Added: user/des/bsddom/configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/bsddom/configure.ac Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,26 @@ +dnl $Id$ + +AC_PREREQ([2.62]) +AC_REVISION([$Id$]) +AC_INIT([refetch], [trunk], [des@des.no]) +AC_CONFIG_SRCDIR([include/refetch.hh]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign]) +AM_CONFIG_HEADER([config.h]) + +AC_LANG(C) +AC_LANG(C++) +AC_PROG_CC +AC_PROG_CXX +AC_PROG_CPP +AC_PROG_LIBTOOL +AC_PROG_INSTALL + +AC_CONFIG_FILES([ + Makefile + include/Makefile + lib/Makefile + lib/fetch/Makefile + lib/refetch/Makefile +]) +AC_OUTPUT Added: user/des/fetch/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/Makefile.am Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,5 @@ +# $Id$ + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = include lib Added: user/des/fetch/autogen.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/autogen.sh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $Id$ +# + +aclocal -I m4 +libtoolize --copy --force +autoheader +automake --add-missing --copy --foreign +autoconf Added: user/des/fetch/configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/configure.ac Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,22 @@ +dnl $Id$ + +AC_PREREQ([2.62]) +AC_REVISION([$Id$]) +AC_INIT([Fetch], [trunk], [des@des.no]) +AC_CONFIG_SRCDIR([include/Fetch.hh]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign]) +AM_CONFIG_HEADER([config.h]) + +AC_LANG(C++) +AC_PROG_CXX +AC_PROG_CPP +AC_PROG_LIBTOOL +AC_PROG_INSTALL + +AC_CONFIG_FILES([ + Makefile + include/Makefile + lib/Makefile +]) +AC_OUTPUT Added: user/des/fetch/include/Fetch.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/include/Fetch.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef FETCH_HH_INCLUDED +#define FETCH_HH_INCLUDED + +#include +#include +#include + +#endif Added: user/des/fetch/include/Fetch/Client.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/include/Fetch/Client.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef CLIENT_HH_INCLUDED +#define CLIENT_HH_INCLUDED + +namespace Fetch { + + class Document; + class URL; + + class Client { + public: + virtual ~Client() = 0; + + virtual Document *getDocument(URL *); + }; + +} + +#endif Added: user/des/fetch/include/Fetch/Document.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/include/Fetch/Document.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef DOCUMENT_HH_INCLUDED +#define DOCUMENT_HH_INCLUDED + +namespace Fetch { + + class Document { + public: + virtual ~Document() = 0; + }; +} + +#endif Added: user/des/fetch/include/Fetch/URL.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/include/Fetch/URL.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef URL_HH_INCLUDED +#define URL_HH_INCLUDED + +namespace Fetch { + + class URL { + public: + virtual ~URL() = 0; + + virtual bool isValid(); + virtual const char *toString(); + virtual const char *getMethod(); + virtual const char *getUser(); + virtual const char *getPassword(); + virtual const char *getHost(); + virtual unsigned int getPort(); + virtual const char *getPath(); + virtual const char *getQuery(); + }; + +} + +#endif Added: user/des/fetch/include/Fetch/UserAgent.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/include/Fetch/UserAgent.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef USERAGENT_HH_INCLUDED +#define USERAGENT_HH_INCLUDED + +namespace Fetch { + + class URL; + + class UserAgent { + public: + virtual ~UserAgent() = 0; + + virtual URL *parseURL(const char *); + }; + + extern "C" newUserAgent(); + +} + +#endif Added: user/des/fetch/include/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/include/Makefile.am Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,8 @@ +# $Id$ + +include_HEADERS = \ + Fetch.hh \ + Fetch/Client.hh \ + Fetch/Document.hh \ + Fetch/URL.hh \ + Fetch/UserAgent.hh Added: user/des/fetch/lib/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/lib/Makefile.am Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,7 @@ +# $Id$ + +INCLUDES = $(top_srcdir)/include + +lib_LTLIBRARIES = libFetch.la + +libFetch_la_SOURCES = Added: user/des/fetch/lib/URL.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/fetch/lib/URL.cc Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,100 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "fetchxx.hh" + +using namespace fetchxx; + +class pURL { + friend class URL; +private: + pURL(); + pURL(const pURL &); + ~pURL(); + + bool valid; + std::string method; + std::string user; + std::string password; + std::string host; + unsigned int port; + std::string path; + std::string query; +}; + +pURL::pURL(): + valid(0), + port(0) +{ +} + +pURL::pURL(const pURL &other): + valid(other.valid), + method(other.method), + user(other.user), + password(other.password), + host(other.host), + port(other.port), + path(other.path), + query(other.query) +{ +} + +/* + * + */ +URL::URL(): + p(new pURL()) +{ +} + +URL::URL(const std::string &str): + p(new pURL()) +{ + parse(str); +} + +URL::URL(const URL &url): + p(new pURL(url.p)); +{ +} + +URL::~URL() +{ + delete p; +} + +bool +URL::parse(const std::string &str) +{ +} Modified: user/des/fmerge/Makefile ============================================================================== --- user/des/fmerge/Makefile Wed Sep 12 13:06:57 2012 (r240393) +++ user/des/fmerge/Makefile Wed Sep 12 13:31:16 2012 (r240394) @@ -2,5 +2,4 @@ SCRIPTS = fmerge.pl -.include "${.CURDIR}/../Makefile.inc" .include Added: user/des/refetch/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/Makefile.am Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,5 @@ +# $Id$ + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = include lib Added: user/des/refetch/autogen.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/autogen.sh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $Id$ +# + +aclocal -I m4 +libtoolize --copy --force +autoheader +automake --add-missing --copy --foreign +autoconf Added: user/des/refetch/configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/configure.ac Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,26 @@ +dnl $Id$ + +AC_PREREQ([2.62]) +AC_REVISION([$Id$]) +AC_INIT([refetch], [trunk], [des@des.no]) +AC_CONFIG_SRCDIR([include/refetch.hh]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign]) +AM_CONFIG_HEADER([config.h]) + +AC_LANG(C) +AC_LANG(C++) +AC_PROG_CC +AC_PROG_CXX +AC_PROG_CPP +AC_PROG_LIBTOOL +AC_PROG_INSTALL + +AC_CONFIG_FILES([ + Makefile + include/Makefile + lib/Makefile + lib/fetch/Makefile + lib/refetch/Makefile +]) +AC_OUTPUT Added: user/des/refetch/include/Fetch/Client.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/include/Fetch/Client.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef CLIENT_HH_INCLUDED +#define CLIENT_HH_INCLUDED + +namespace Fetch { + + class Document; + class URL; + + class Client { + public: + virtual ~Client() = 0; + + virtual Document *getDocument(URL *); + }; + +} + +#endif Added: user/des/refetch/include/Fetch/Document.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/include/Fetch/Document.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef DOCUMENT_HH_INCLUDED +#define DOCUMENT_HH_INCLUDED + +namespace Fetch { + + class Document { + public: + virtual ~Document() = 0; + }; +} + +#endif Added: user/des/refetch/include/Fetch/URL.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/include/Fetch/URL.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef FETCH_URL_HH_INCLUDED +#define FETCH_URL_HH_INCLUDED + +namespace Fetch { + + class URL { + public: + virtual ~URL() = 0; + + virtual bool isValid() = 0; + virtual const char *toString() = 0; + virtual const char *getMethod() = 0; + virtual const char *getUser() = 0; + virtual const char *getPassword() = 0; + virtual const char *getHost() = 0; + virtual unsigned int getPort() = 0; + virtual const char *getPath() = 0; + virtual const char *getQuery() = 0; + }; + +} + +#endif Added: user/des/refetch/include/Fetch/UserAgent.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/include/Fetch/UserAgent.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2010 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef USERAGENT_HH_INCLUDED +#define USERAGENT_HH_INCLUDED + +namespace Fetch { + + class URL; + + class UserAgent { + public: + virtual ~UserAgent() = 0; + + virtual URL *parseURL(const char *); + }; + + extern "C" newUserAgent(); + +} + +#endif Added: user/des/refetch/lib/refetch/pURL.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/lib/refetch/pURL.cc Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2011 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#include "pURL.hh" + +using namespace Fetch; + Added: user/des/refetch/lib/refetch/pURL.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/refetch/lib/refetch/pURL.hh Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2011 Dag-Erling Coïdan Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef PURL_HH_INCLUDED +#define PURL_HH_INCLUDED + +#include + +namespace Fetch { + class pURL: public URL { + public: + virtual ~pURL(); + + virtual bool isValid(); + virtual const char *toString(); + virtual const char *getMethod(); + virtual const char *getUser(); + virtual const char *getPassword(); + virtual const char *getHost(); + virtual unsigned int getPort(); + virtual const char *getPath(); + virtual const char *getQuery(); + }; +}; + +#endif Modified: user/des/sizes/sizes.c ============================================================================== --- user/des/sizes/sizes.c Wed Sep 12 13:06:57 2012 (r240393) +++ user/des/sizes/sizes.c Wed Sep 12 13:31:16 2012 (r240394) @@ -27,6 +27,11 @@ * $FreeBSD$ */ +#include +#include +#include +#include + #include #include #include @@ -76,7 +81,7 @@ typedef void (*func_ptr)(void); #define describe(type) \ do { \ struct s_##t { char bump; type t; }; \ - printf("%-12s %12zd %12zd\n", #type, \ + printf("%-20s %12zd %12zd\n", #type, \ sizeof(type) * 8, \ offsetof(struct s_##t, t) * 8); \ } while (0) @@ -84,8 +89,8 @@ typedef void (*func_ptr)(void); static void sizes(void) { - printf("type size alignment\n"); - printf("--------------------------------------\n"); + printf("type size alignment\n"); + printf("----------------------------------------------\n"); describe(char); describe(short); describe(int); @@ -102,6 +107,11 @@ sizes(void) describe(func_ptr); describe(wchar_t); describe(sig_atomic_t); + describe(socklen_t); + describe(struct sockaddr); + describe(struct sockaddr_un); + describe(struct sockaddr_in); + describe(struct sockaddr_in6); } int Added: user/des/struct/struct.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/struct/struct.cfg Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,14 @@ +/*-*- c -*-*/ +/* + * $FreeBSD$ + */ + +#include +#include +#include +#include + +struct passwd; +struct group; +struct dirent; +struct sigaction; Added: user/des/struct/struct.pl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/struct/struct.pl Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,114 @@ +#!/usr/bin/perl -w +#- +# Copyright (c) 2009 Dag-Erling Coïdan Smørgrav +# 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 +# in this position and unchanged. +# 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 AUTHOR 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 AUTHOR 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. +# +# $FreeBSD$ +# + +use strict; +use warnings; +use FileHandle; +use IPC::Open2; + +my %struct; + +# sub read_machdep($) +# { +# my ($fn) = @_; + +# open(my $fh, "<", $fn) +# or die("$fn: $!\n"); + +# close($fh); +# } + +sub read_config($) +{ + my ($fn) = @_; + + open(my $fh, "<", $fn) + or die("$fn: $!\n"); + local $/; + my $config = <$fh>; + close($fh); + + $config =~ s/\/\*.*?\*\// /gs; + $config =~ s/\/\/.*$//gm; + my @cpp; + foreach (split("\n", $config)) { + s/\s+$//; + s/\s+/ /g; + next unless m/./; + if (m/^#/) { + push(@cpp, $_); + } elsif (m/^struct ([A-Za-z_][0-9A-Za-z_]*);$/) { + die("struct $1 specified more than once\n") + if (exists($struct{$1})); + $struct{$1} = [ @cpp ]; + } else { + die("syntax error in $fn: $_\n"); + } + } +} + +sub parse_struct($@) +{ + my ($struct, @cpp) = @_; + + $SIG{'PIPE'} = sub { die("SIGPIPE from cpp\n"); }; + my $pid = open2(my $out, my $in, "cpp"); + foreach (@cpp) { + print($in "$_\n"); + } + close($in); + local $/; + my $c = <$out>; + close($out); + waitpid($pid, 0); + my $status = $? >> 8; + die("exit code $status from cpp\n") + if ($status != 0); + $c =~ s/^#.*$//gm; + $c =~ s/\s+/ /gs; + while ($c =~ m/\G.*?\btypedef\s+((?:(?:struct|union)(?:\s+[A-Za-z_][0-9A-Za-z_]*|\s*{.*?})|[A-Za-z_][0-9A-Za-z_]*)(?:\s*\*)?)\s*([A-Za-z_][0-9A-Za-z_]*);/g) { + print("typedef $1 $2;\n"); + } + $c =~ m/\bstruct $struct ?({.*?}) ?;/ + or die("struct $struct not found in cpp output\n"); + my $struct_def = $1; + print("struct $struct $struct_def;\n"); +} + +MAIN:{ + foreach my $arg (@ARGV) { + read_config($arg); + foreach (sort(keys(%struct))) { + parse_struct($_, @{$struct{$_}}); + } + } +} + +1; Added: user/des/tinderbox/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/tinderbox/Makefile Wed Sep 12 13:31:16 2012 (r240394) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +BINDIR ?= ${HOME}/bin +BINOWN ?= ${USER} +BINGRP ?= ${USER} +SCRIPTS = tbmaster.pl tinderbox.pl + +MANDIR ?= ${HOME}/man/man *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Sep 12 13:34:24 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F1401065672; Wed, 12 Sep 2012 13:34:24 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1856F8FC08; Wed, 12 Sep 2012 13:34:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CDYNxw077373; Wed, 12 Sep 2012 13:34:23 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CDYNJb077367; Wed, 12 Sep 2012 13:34:23 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209121334.q8CDYNJb077367@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 12 Sep 2012 13:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240395 - in user/des: bsddom election evilhttpd fetch grok X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:34:24 -0000 Author: des Date: Wed Sep 12 13:34:23 2012 New Revision: 240395 URL: http://svn.freebsd.org/changeset/base/240395 Log: Remove accidentally committed crap. Added: user/des/grok/Makefile user/des/grok/grok.c user/des/grok/grok.h user/des/grok/index.c user/des/grok/search.c user/des/grok/version.h Deleted: user/des/bsddom/ user/des/election/ user/des/evilhttpd/ user/des/fetch/ Added: user/des/grok/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/grok/Makefile Wed Sep 12 13:34:23 2012 (r240395) @@ -0,0 +1,11 @@ +# $Id$ + +PROG = grok +SRCS = grok.c +SRCS += index.c index_dir.c index_file.c +SRCS += search.c +MAN = + +WARNS ?= 6 + +.include Added: user/des/grok/grok.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/grok/grok.c Wed Sep 12 13:34:23 2012 (r240395) @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 2011 Dag-Erling Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "grok.h" + +static char cwd[MAXPATHLEN]; + +const char *corpusdir; /* where the corpus is */ +const char *indexdir; /* where our index is */ +int verbose; /* verbosity level */ + +void +grok_version(void) +{ + + fprintf(stderr, "grok %8lu\n", GROK_VERSION); + fprintf(stderr, "%s\n", GROK_COPYRIGHT); +} + +void +grok_usage(void) +{ + + fprintf(stderr, "usage: %s [-Vv] [-c corpus] [-i index]\n", + getprogname()); +} + +int +grok_opt(int opt, const char *arg) +{ + + switch (opt) { + case 'c': + corpusdir = arg; + break; + case 'i': + indexdir = arg; + break; + case 'V': + grok_version(); + exit(0); + case 'v': + verbose++; + break; + default: + return (0); + } + return (1); +} + +int +main(int argc, char *argv[]) +{ + + setlocale(LC_CTYPE, ""); + + /* default corpus and index dir are cwd */ + if (getcwd(cwd, sizeof(cwd)) == NULL) + err(1, "getcwd()"); + corpusdir = indexdir = cwd; + + if (strstr(getprogname(), "index") != NULL) + index_main(argc, argv); + else + search_main(argc, argv); + + /* not reached */ + exit(1); +} Added: user/des/grok/grok.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/grok/grok.h Wed Sep 12 13:34:23 2012 (r240395) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2011 Dag-Erling Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef GROK_H_INCLUDED +#define GROK_H_INCLUDED + +#include + +#include "version.h" + +void grok_version(void); +void grok_usage(void); + +#define GROK_OPTS "c:i:Vv" +int grok_opt(int, const char *); + +extern const char *corpusdir; +extern const char *indexdir; +extern int verbose; + +int index_main(int, char **); +int search_main(int, char **); + +#ifdef WEOF /* we have */ + +#define WBOW ((wint_t)-3) /* beginning-of-word */ +#define WEOW ((wint_t)-2) /* end-of-word */ + +struct grok_node { + wint_t ch; /* can be a character, WBOW or WEOW */ + unsigned int child; /* first child, if any, or 0 */ + unsigned int sibling; /* next sibling, if any, or 0 */ + +}; +#endif + +#endif Added: user/des/grok/index.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/grok/index.c Wed Sep 12 13:34:23 2012 (r240395) @@ -0,0 +1,84 @@ +/*- + * Copyright (c) 2011 Dag-Erling Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#include +#include +#include + +#include "grok.h" +#include "index.h" + +struct grok_filter *filter_list; +struct grok_filter default_filter_list[] = { + { .type = FILTER_EXCLUDE, .pattern = "*/.svn/*" }, + { .type = FILTER_EXCLUDE, .pattern = "*/CVS/*" }, + { .type = FILTER_EXCLUDE, .pattern = "*.uue" }, + { .type = FILTER_EXCLUDE, .pattern = "*.b64" }, + { .type = FILTER_EXCLUDE, .pattern = "*~" }, + { .type = FILTER_EXCLUDE, .pattern = "*.orig" }, + { .type = FILTER_EXCLUDE, .pattern = "*.rej" }, +}; + +int skip_comments; +int include_binary; + +static void +usage(void) +{ + + grok_usage(); + exit(1); +} + +int +index_main(int argc, char *argv[]) +{ + int opt; + + while ((opt = getopt(argc, argv, GROK_OPTS "C")) != -1) + switch (opt) { + case 'b': + include_binary = 1; + break; + case 'C': + skip_comments = 1; + break; + default: + if (!grok_opt(opt, optarg)) + usage(); + } + + argc -= optind; + argv += optind; + + while (argc--) + add_file_to_index(*argv++); + + exit(0); +} Added: user/des/grok/search.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/grok/search.c Wed Sep 12 13:34:23 2012 (r240395) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2011 Dag-Erling Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#include +#include +#include + +#include "grok.h" + +static void +usage(void) +{ + + grok_version(); + exit(1); +} + +int +search_main(int argc, char *argv[]) +{ + int opt; + + while ((opt = getopt(argc, argv, GROK_OPTS)) != -1) + switch (opt) { + default: + if (!grok_opt(opt, optarg)) + usage(); + } + + argc -= optind; + argv += optind; + + if (argc == 0) + usage(); + + exit(0); +} Added: user/des/grok/version.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/grok/version.h Wed Sep 12 13:34:23 2012 (r240395) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2011 Dag-Erling Smørgrav + * 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 + * in this position and unchanged. + * 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 AUTHOR 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 AUTHOR 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. + * + * $Id$ + */ + +#ifndef VERSION_H_INCLUDED +#define VERSION_H_INCLUDED + +#define GROK_COPYRIGHT "Copyright (c) 2011 Dag-Erling Smørgrav" +#define GROK_VERSION 20111014LU + +#endif From owner-svn-src-user@FreeBSD.ORG Wed Sep 12 13:35:17 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E417E1065673; Wed, 12 Sep 2012 13:35:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6E838FC14; Wed, 12 Sep 2012 13:35:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CDZHbc077539; Wed, 12 Sep 2012 13:35:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CDZHw7077538; Wed, 12 Sep 2012 13:35:17 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209121335.q8CDZHw7077538@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 12 Sep 2012 13:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240396 - user/des/grok X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:35:18 -0000 Author: des Date: Wed Sep 12 13:35:17 2012 New Revision: 240396 URL: http://svn.freebsd.org/changeset/base/240396 Log: Remove accidentally committed crap. Deleted: user/des/grok/ From owner-svn-src-user@FreeBSD.ORG Wed Sep 12 13:38:02 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA5861065673; Wed, 12 Sep 2012 13:38:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5ED48FC12; Wed, 12 Sep 2012 13:38:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CDc2dS078169; Wed, 12 Sep 2012 13:38:02 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CDc2dl078167; Wed, 12 Sep 2012 13:38:02 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209121338.q8CDc2dl078167@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 12 Sep 2012 13:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240397 - user/des/sizes X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:38:02 -0000 Author: des Date: Wed Sep 12 13:38:02 2012 New Revision: 240397 URL: http://svn.freebsd.org/changeset/base/240397 Log: Revert accidental commit Modified: user/des/sizes/sizes.c Modified: user/des/sizes/sizes.c ============================================================================== --- user/des/sizes/sizes.c Wed Sep 12 13:35:17 2012 (r240396) +++ user/des/sizes/sizes.c Wed Sep 12 13:38:02 2012 (r240397) @@ -27,11 +27,6 @@ * $FreeBSD$ */ -#include -#include -#include -#include - #include #include #include @@ -81,7 +76,7 @@ typedef void (*func_ptr)(void); #define describe(type) \ do { \ struct s_##t { char bump; type t; }; \ - printf("%-20s %12zd %12zd\n", #type, \ + printf("%-12s %12zd %12zd\n", #type, \ sizeof(type) * 8, \ offsetof(struct s_##t, t) * 8); \ } while (0) @@ -89,8 +84,8 @@ typedef void (*func_ptr)(void); static void sizes(void) { - printf("type size alignment\n"); - printf("----------------------------------------------\n"); + printf("type size alignment\n"); + printf("--------------------------------------\n"); describe(char); describe(short); describe(int); @@ -107,11 +102,6 @@ sizes(void) describe(func_ptr); describe(wchar_t); describe(sig_atomic_t); - describe(socklen_t); - describe(struct sockaddr); - describe(struct sockaddr_un); - describe(struct sockaddr_in); - describe(struct sockaddr_in6); } int From owner-svn-src-user@FreeBSD.ORG Wed Sep 12 13:39:58 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF826106566B; Wed, 12 Sep 2012 13:39:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B29328FC08; Wed, 12 Sep 2012 13:39:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CDdwtu078428; Wed, 12 Sep 2012 13:39:58 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CDdw4k078426; Wed, 12 Sep 2012 13:39:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209121339.q8CDdw4k078426@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 12 Sep 2012 13:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240398 - user/des/fmerge X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:39:59 -0000 Author: des Date: Wed Sep 12 13:39:58 2012 New Revision: 240398 URL: http://svn.freebsd.org/changeset/base/240398 Log: Revert accidental commit Modified: user/des/fmerge/Makefile Modified: user/des/fmerge/Makefile ============================================================================== --- user/des/fmerge/Makefile Wed Sep 12 13:38:02 2012 (r240397) +++ user/des/fmerge/Makefile Wed Sep 12 13:39:58 2012 (r240398) @@ -2,4 +2,5 @@ SCRIPTS = fmerge.pl +.include "${.CURDIR}/../Makefile.inc" .include From owner-svn-src-user@FreeBSD.ORG Wed Sep 12 13:43:43 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C28C1065674; Wed, 12 Sep 2012 13:43:43 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DBA58FC12; Wed, 12 Sep 2012 13:43:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CDhhrs079059; Wed, 12 Sep 2012 13:43:43 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CDhhxC079056; Wed, 12 Sep 2012 13:43:43 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209121343.q8CDhhxC079056@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 12 Sep 2012 13:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240399 - user/des/svnsup/bin/distill X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:43:43 -0000 Author: des Date: Wed Sep 12 13:43:42 2012 New Revision: 240399 URL: http://svn.freebsd.org/changeset/base/240399 Log: Add support for Subversion 1.7 while retaining backward compatibility with 1.6. Modified: user/des/svnsup/bin/distill/distill.c user/des/svnsup/bin/distill/distill.h Modified: user/des/svnsup/bin/distill/distill.c ============================================================================== --- user/des/svnsup/bin/distill/distill.c Wed Sep 12 13:39:58 2012 (r240398) +++ user/des/svnsup/bin/distill/distill.c Wed Sep 12 13:43:42 2012 (r240399) @@ -61,7 +61,11 @@ distill(const char *url, unsigned long r SVNSUP_APR_ERROR(status, "apr_pool_create()"); /* canonicalize URL */ +#if SVN_VER_MAJOR == 1 && SVN_VER_MINOR < 7 url = svn_path_canonicalize(url, pool); +#else + url = svn_uri_canonicalize(url, pool); +#endif /* set up our authentication system */ /* XXX check for errors */ @@ -74,9 +78,22 @@ distill(const char *url, unsigned long r /* open a connection to the repo */ config = apr_hash_make(pool); +#if SVN_VER_MAJOR == 1 && SVN_VER_MINOR < 7 error = svn_ra_open3(&ra_session, url, NULL, &ra_callbacks, NULL, config, pool); SVNSUP_SVN_ERROR(error, "svn_ra_open3()"); +#else + for (;;) { + const char *curl = NULL; + error = svn_ra_open4(&ra_session, &curl, url, NULL, + &ra_callbacks, NULL, config, pool); + if (curl == NULL) + break; + SVNSUP_DEBUG("redirected to %s\n", curl); + url = curl; + } + SVNSUP_SVN_ERROR(error, "svn_ra_open3()"); +#endif /* get repo uuid */ error = svn_ra_get_uuid2(ra_session, &uuid, pool); Modified: user/des/svnsup/bin/distill/distill.h ============================================================================== --- user/des/svnsup/bin/distill/distill.h Wed Sep 12 13:39:58 2012 (r240398) +++ user/des/svnsup/bin/distill/distill.h Wed Sep 12 13:43:42 2012 (r240399) @@ -42,6 +42,7 @@ #include #include #include +#include #include "svnsup/svnsup.h" From owner-svn-src-user@FreeBSD.ORG Fri Sep 14 18:57:08 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58EB4106566B; Fri, 14 Sep 2012 18:57:08 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1418FC0C; Fri, 14 Sep 2012 18:57:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EIv8FD086811; Fri, 14 Sep 2012 18:57:08 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EIv75n086793; Fri, 14 Sep 2012 18:57:07 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209141857.q8EIv75n086793@svn.freebsd.org> From: Matt Jacob Date: Fri, 14 Sep 2012 18:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240511 - in user/mjacob/sys: amd64/amd64 amd64/conf arm/arm arm/broadcom/bcm2835 arm/conf arm/include arm/mv arm/mv/armadaxp boot/arm/uboot boot/common boot/fdt/dts boot/i386/libi386 b... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 18:57:08 -0000 Author: mjacob Date: Fri Sep 14 18:57:07 2012 New Revision: 240511 URL: http://svn.freebsd.org/changeset/base/240511 Log: IFC Added: user/mjacob/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c - copied unchanged from r240510, head/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c user/mjacob/sys/boot/fdt/dts/db78460.dts - copied unchanged from r240510, head/sys/boot/fdt/dts/db78460.dts user/mjacob/sys/cddl/compat/opensolaris/sys/assfail.h - copied unchanged from r240510, head/sys/cddl/compat/opensolaris/sys/assfail.h user/mjacob/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu - copied unchanged from r240510, head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu user/mjacob/sys/net/if_pflog.h - copied unchanged from r240510, head/sys/net/if_pflog.h user/mjacob/sys/net/if_pfsync.h - copied unchanged from r240510, head/sys/net/if_pfsync.h user/mjacob/sys/net/pf_mtag.h - copied unchanged from r240510, head/sys/net/pf_mtag.h user/mjacob/sys/net/pfvar.h - copied unchanged from r240510, head/sys/net/pfvar.h user/mjacob/sys/netpfil/ - copied from r240510, head/sys/netpfil/ Deleted: user/mjacob/sys/boot/fdt/dts/db88f78160.dts user/mjacob/sys/cam/scsi/scsi_low_pisa.c user/mjacob/sys/cam/scsi/scsi_low_pisa.h user/mjacob/sys/compat/netbsd/physio_proc.h user/mjacob/sys/contrib/pf/ user/mjacob/sys/netinet/ipfw/ Modified: user/mjacob/sys/amd64/amd64/pmap.c user/mjacob/sys/amd64/amd64/trap.c user/mjacob/sys/amd64/conf/GENERIC user/mjacob/sys/arm/arm/cpufunc.c user/mjacob/sys/arm/arm/identcpu.c user/mjacob/sys/arm/arm/pmap-v6.c user/mjacob/sys/arm/arm/pmap.c user/mjacob/sys/arm/broadcom/bcm2835/files.bcm2835 user/mjacob/sys/arm/conf/ARMADAXP user/mjacob/sys/arm/conf/RPI-B user/mjacob/sys/arm/include/armreg.h user/mjacob/sys/arm/include/intr.h user/mjacob/sys/arm/mv/armadaxp/armadaxp.c user/mjacob/sys/arm/mv/common.c user/mjacob/sys/arm/mv/mpic.c user/mjacob/sys/arm/mv/mv_pci.c user/mjacob/sys/arm/mv/mvreg.h user/mjacob/sys/arm/mv/mvvar.h user/mjacob/sys/arm/mv/mvwin.h user/mjacob/sys/arm/mv/timer.c user/mjacob/sys/boot/arm/uboot/Makefile user/mjacob/sys/boot/common/load_elf.c user/mjacob/sys/boot/common/module.c user/mjacob/sys/boot/common/part.c user/mjacob/sys/boot/i386/libi386/pxe.c user/mjacob/sys/boot/i386/libi386/pxe.h user/mjacob/sys/boot/i386/loader/conf.c user/mjacob/sys/boot/i386/loader/main.c user/mjacob/sys/boot/powerpc/uboot/Makefile user/mjacob/sys/boot/sparc64/loader/main.c user/mjacob/sys/boot/uboot/common/main.c user/mjacob/sys/boot/uboot/lib/Makefile user/mjacob/sys/boot/uboot/lib/devicename.c user/mjacob/sys/boot/uboot/lib/disk.c user/mjacob/sys/boot/uboot/lib/libuboot.h user/mjacob/sys/boot/zfs/zfs.c user/mjacob/sys/boot/zfs/zfsimpl.c user/mjacob/sys/cam/scsi/scsi_low.c user/mjacob/sys/cam/scsi/scsi_low.h user/mjacob/sys/cddl/boot/zfs/zfsimpl.h user/mjacob/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c user/mjacob/sys/cddl/compat/opensolaris/sys/debug.h user/mjacob/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c user/mjacob/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h user/mjacob/sys/compat/linux/linux_file.c user/mjacob/sys/conf/Makefile.amd64 user/mjacob/sys/conf/Makefile.arm user/mjacob/sys/conf/Makefile.powerpc user/mjacob/sys/conf/files user/mjacob/sys/conf/files.amd64 user/mjacob/sys/conf/files.i386 user/mjacob/sys/conf/kern.mk user/mjacob/sys/conf/kern.pre.mk user/mjacob/sys/conf/kmod.mk user/mjacob/sys/conf/options.amd64 user/mjacob/sys/conf/options.i386 user/mjacob/sys/contrib/altq/altq/altq_cbq.c user/mjacob/sys/contrib/altq/altq/altq_hfsc.c user/mjacob/sys/contrib/altq/altq/altq_priq.c user/mjacob/sys/contrib/altq/altq/altq_subr.c user/mjacob/sys/dev/acpica/acpi_hpet.c user/mjacob/sys/dev/ahci/ahci.c user/mjacob/sys/dev/ath/ath_hal/ah.c user/mjacob/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c user/mjacob/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c user/mjacob/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c user/mjacob/sys/dev/ath/ath_hal/ar5416/ar5416reg.h user/mjacob/sys/dev/ath/ath_hal/ar9002/ar9280.c user/mjacob/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c user/mjacob/sys/dev/ath/if_ath.c user/mjacob/sys/dev/ath/if_ath_tx.c user/mjacob/sys/dev/ath/if_ath_tx_ht.c user/mjacob/sys/dev/ct/bshw_machdep.c user/mjacob/sys/dev/ct/ct.c user/mjacob/sys/dev/ct/ct_isa.c user/mjacob/sys/dev/ct/ct_machdep.h user/mjacob/sys/dev/ct/ctvar.h user/mjacob/sys/dev/cxgbe/common/common.h user/mjacob/sys/dev/cxgbe/firmware/t4fw_interface.h user/mjacob/sys/dev/cxgbe/osdep.h user/mjacob/sys/dev/cxgbe/t4_l2t.h user/mjacob/sys/dev/cxgbe/t4_main.c user/mjacob/sys/dev/cxgbe/tom/t4_ddp.c user/mjacob/sys/dev/fdt/fdt_common.c user/mjacob/sys/dev/fdt/fdt_common.h user/mjacob/sys/dev/fdt/fdt_pci.c user/mjacob/sys/dev/hwpmc/hwpmc_arm.c user/mjacob/sys/dev/hwpmc/hwpmc_x86.c user/mjacob/sys/dev/isp/isp_pci.c user/mjacob/sys/dev/ixgbe/ixgbe.c user/mjacob/sys/dev/ixgbe/ixgbe_osdep.h user/mjacob/sys/dev/ncv/ncr53c500.c user/mjacob/sys/dev/ncv/ncr53c500_pccard.c user/mjacob/sys/dev/ncv/ncr53c500hw.h user/mjacob/sys/dev/ncv/ncr53c500var.h user/mjacob/sys/dev/nsp/nsp.c user/mjacob/sys/dev/nsp/nsp_pccard.c user/mjacob/sys/dev/nsp/nspvar.h user/mjacob/sys/dev/pci/pcireg.h user/mjacob/sys/dev/random/ivy.c user/mjacob/sys/dev/random/probe.c user/mjacob/sys/dev/stg/tmc18c30.c user/mjacob/sys/dev/stg/tmc18c30_isa.c user/mjacob/sys/dev/stg/tmc18c30_pccard.c user/mjacob/sys/dev/stg/tmc18c30_pci.c user/mjacob/sys/dev/stg/tmc18c30_subr.c user/mjacob/sys/dev/stg/tmc18c30var.h user/mjacob/sys/dev/usb/controller/at91dci.c user/mjacob/sys/dev/usb/controller/at91dci_atmelarm.c user/mjacob/sys/dev/usb/controller/dwc_otg.c user/mjacob/sys/dev/usb/controller/dwc_otg.h user/mjacob/sys/dev/usb/controller/dwc_otgreg.h user/mjacob/sys/dev/usb/controller/usb_controller.c user/mjacob/sys/dev/usb/serial/ufoma.c user/mjacob/sys/dev/virtio/virtio.h user/mjacob/sys/dev/virtio/virtqueue.c user/mjacob/sys/fs/deadfs/dead_vnops.c user/mjacob/sys/fs/ext2fs/ext2_inode.c user/mjacob/sys/fs/nandfs/bmap.c user/mjacob/sys/fs/nfs/nfs_commonport.c user/mjacob/sys/fs/nfs/nfscl.h user/mjacob/sys/fs/nfsclient/nfs_clrpcops.c user/mjacob/sys/fs/ntfs/ntfs_vfsops.c user/mjacob/sys/fs/nullfs/null.h user/mjacob/sys/fs/nullfs/null_subr.c user/mjacob/sys/fs/nullfs/null_vfsops.c user/mjacob/sys/fs/nullfs/null_vnops.c user/mjacob/sys/geom/mirror/g_mirror.c user/mjacob/sys/geom/raid/g_raid.c user/mjacob/sys/geom/raid/g_raid.h user/mjacob/sys/geom/raid/md_ddf.c user/mjacob/sys/geom/raid/md_intel.c user/mjacob/sys/geom/raid/md_jmicron.c user/mjacob/sys/geom/raid/md_nvidia.c user/mjacob/sys/geom/raid/md_promise.c user/mjacob/sys/geom/raid/md_sii.c user/mjacob/sys/geom/raid/tr_concat.c user/mjacob/sys/geom/raid/tr_raid0.c user/mjacob/sys/geom/raid/tr_raid1.c user/mjacob/sys/geom/raid/tr_raid1e.c user/mjacob/sys/geom/raid/tr_raid5.c user/mjacob/sys/geom/raid3/g_raid3.c user/mjacob/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c user/mjacob/sys/i386/conf/GENERIC user/mjacob/sys/i386/i386/pmap.c user/mjacob/sys/i386/i386/trap.c user/mjacob/sys/i386/xen/pmap.c user/mjacob/sys/ia64/ia32/ia32_trap.c user/mjacob/sys/ia64/ia64/trap.c user/mjacob/sys/kern/kern_condvar.c user/mjacob/sys/kern/kern_exit.c user/mjacob/sys/kern/kern_fork.c user/mjacob/sys/kern/kern_lock.c user/mjacob/sys/kern/kern_mutex.c user/mjacob/sys/kern/kern_rmlock.c user/mjacob/sys/kern/kern_rwlock.c user/mjacob/sys/kern/kern_sig.c user/mjacob/sys/kern/kern_sx.c user/mjacob/sys/kern/kern_thread.c user/mjacob/sys/kern/subr_sleepqueue.c user/mjacob/sys/kern/subr_syscall.c user/mjacob/sys/kern/subr_trap.c user/mjacob/sys/kern/subr_turnstile.c user/mjacob/sys/kern/vfs_lookup.c user/mjacob/sys/kern/vfs_mount.c user/mjacob/sys/kern/vfs_subr.c user/mjacob/sys/mips/mips/pmap.c user/mjacob/sys/mips/mips/trap.c user/mjacob/sys/modules/Makefile user/mjacob/sys/modules/cxgbe/firmware/Makefile user/mjacob/sys/modules/dummynet/Makefile user/mjacob/sys/modules/ipfw/Makefile user/mjacob/sys/modules/ipfw_nat/Makefile user/mjacob/sys/modules/pf/Makefile user/mjacob/sys/modules/pflog/Makefile user/mjacob/sys/modules/pfsync/Makefile user/mjacob/sys/modules/scsi_low/Makefile user/mjacob/sys/net/if.c user/mjacob/sys/netgraph/ng_ipfw.c user/mjacob/sys/netinet/in_gif.c user/mjacob/sys/netinet/ip_icmp.c user/mjacob/sys/netinet/raw_ip.c user/mjacob/sys/netinet/sctp_asconf.c user/mjacob/sys/netinet/sctp_pcb.c user/mjacob/sys/netinet/sctputil.c user/mjacob/sys/netinet/tcp_subr.c user/mjacob/sys/netinet6/icmp6.c user/mjacob/sys/netinet6/in6_gif.c user/mjacob/sys/netipsec/ipsec_input.c user/mjacob/sys/netipsec/ipsec_output.c user/mjacob/sys/netipsec/key.c user/mjacob/sys/netipsec/xform_ipip.c user/mjacob/sys/powerpc/aim/trap.c user/mjacob/sys/powerpc/booke/trap.c user/mjacob/sys/powerpc/wii/wii_bus.c user/mjacob/sys/sparc64/sparc64/trap.c user/mjacob/sys/sys/cdefs.h user/mjacob/sys/sys/mbuf.h user/mjacob/sys/sys/mount.h user/mjacob/sys/sys/param.h user/mjacob/sys/sys/queue.h Directory Properties: user/mjacob/sys/ (props changed) user/mjacob/sys/boot/ (props changed) user/mjacob/sys/cddl/contrib/opensolaris/ (props changed) user/mjacob/sys/conf/ (props changed) Modified: user/mjacob/sys/amd64/amd64/pmap.c ============================================================================== --- user/mjacob/sys/amd64/amd64/pmap.c Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/amd64/amd64/pmap.c Fri Sep 14 18:57:07 2012 (r240511) @@ -4998,7 +4998,7 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t si void pmap_unmapdev(vm_offset_t va, vm_size_t size) { - vm_offset_t base, offset, tmpva; + vm_offset_t base, offset; /* If we gave a direct map region in pmap_mapdev, do nothing */ if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) @@ -5006,9 +5006,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); - for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE) - pmap_kremove(tmpva); - pmap_invalidate_range(kernel_pmap, va, tmpva); kmem_free(kernel_map, base, size); } Modified: user/mjacob/sys/amd64/amd64/trap.c ============================================================================== --- user/mjacob/sys/amd64/amd64/trap.c Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/amd64/amd64/trap.c Fri Sep 14 18:57:07 2012 (r240511) @@ -632,7 +632,6 @@ trap(struct trapframe *frame) user: userret(td, frame); - mtx_assert(&Giant, MA_NOTOWNED); KASSERT(PCB_USER_FPU(td->td_pcb), ("Return from trap with kernel FPU ctx leaked")); userout: Modified: user/mjacob/sys/amd64/conf/GENERIC ============================================================================== --- user/mjacob/sys/amd64/conf/GENERIC Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/amd64/conf/GENERIC Fri Sep 14 18:57:07 2012 (r240511) @@ -293,7 +293,7 @@ device wpi # Intel 3945ABG wireless NI device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG -options IVY_RNG # Intel Bull Mountain RNG +options RDRAND_RNG # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Modified: user/mjacob/sys/arm/arm/cpufunc.c ============================================================================== --- user/mjacob/sys/arm/arm/cpufunc.c Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/arm/cpufunc.c Fri Sep 14 18:57:07 2012 (r240511) @@ -1415,6 +1415,7 @@ set_cpufuncs() #if defined(CPU_MV_PJ4B) if (cputype == CPU_ID_MV88SV581X_V6 || cputype == CPU_ID_MV88SV581X_V7 || + cputype == CPU_ID_MV88SV584X_V7 || cputype == CPU_ID_ARM_88SV581X_V6 || cputype == CPU_ID_ARM_88SV581X_V7) { if (cpu_pfr(0) & ARM_PFR0_THUMBEE_MASK) @@ -1425,8 +1426,8 @@ set_cpufuncs() get_cachetype_cp15(); pmap_pte_init_mmu_v6(); goto out; - } else if (cputype == CPU_ID_ARM_88SV584X || - cputype == CPU_ID_MV88SV584X) { + } else if (cputype == CPU_ID_ARM_88SV584X_V6 || + cputype == CPU_ID_MV88SV584X_V6) { cpufuncs = pj4bv6_cpufuncs; get_cachetype_cp15(); pmap_pte_init_mmu_v6(); Modified: user/mjacob/sys/arm/arm/identcpu.c ============================================================================== --- user/mjacob/sys/arm/arm/identcpu.c Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/arm/identcpu.c Fri Sep 14 18:57:07 2012 (r240511) @@ -321,9 +321,11 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_ARM_88SV581X_V7, CPU_CLASS_MARVELL, "Sheeva 88SV581x", generic_steppings }, - { CPU_ID_MV88SV584X, CPU_CLASS_MARVELL, "Sheeva 88SV584x", + { CPU_ID_MV88SV584X_V6, CPU_CLASS_MARVELL, "Sheeva 88SV584x", generic_steppings }, - { CPU_ID_ARM_88SV584X, CPU_CLASS_MARVELL, "Sheeva 88SV584x", + { CPU_ID_ARM_88SV584X_V6, CPU_CLASS_MARVELL, "Sheeva 88SV584x", + generic_steppings }, + { CPU_ID_MV88SV584X_V7, CPU_CLASS_MARVELL, "Sheeva 88SV584x", generic_steppings }, { 0, CPU_CLASS_NONE, NULL, NULL } Modified: user/mjacob/sys/arm/arm/pmap-v6.c ============================================================================== --- user/mjacob/sys/arm/arm/pmap-v6.c Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/arm/pmap-v6.c Fri Sep 14 18:57:07 2012 (r240511) @@ -153,10 +153,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -164,12 +166,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -400,6 +400,7 @@ static vm_offset_t pmap_kernel_l2ptp_kva static vm_paddr_t pmap_kernel_l2ptp_phys; static struct vm_object pvzone_obj; static int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0; +static struct rwlock pvh_global_lock; int l1_mem_types[] = { ARM_L1S_STRONG_ORD, @@ -613,7 +614,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse l1idx = L1_IDX(va); PMAP_ASSERT_LOCKED(pm); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if ((l2 = pm->pm_l2[L2_IDX(l1idx)]) == NULL) { /* * No mapping at this address, as there is @@ -622,19 +623,19 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse */ again_l2table: PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); if ((l2 = pmap_alloc_l2_dtable()) == NULL) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); return (NULL); } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (pm->pm_l2[L2_IDX(l1idx)] != NULL) { PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); uma_zfree(l2table_zone, l2); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); l2 = pm->pm_l2[L2_IDX(l1idx)]; if (l2 == NULL) @@ -666,16 +667,16 @@ again_l2table: */ again_ptep: PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); ptep = (void*)uma_zalloc(l2zone, M_NOWAIT|M_USE_RESERVE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (l2b->l2b_kva != 0) { /* We lost the race. */ PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); uma_zfree(l2zone, ptep); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (l2b->l2b_kva == 0) goto again_ptep; @@ -851,7 +852,7 @@ pmap_clearbit(struct vm_page *pg, u_int u_int oflags; int count = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if (maskbits & PVF_WRITE) maskbits |= PVF_MOD; @@ -861,7 +862,7 @@ pmap_clearbit(struct vm_page *pg, u_int pg->md.pvh_attrs &= ~(maskbits & (PVF_MOD | PVF_REF)); if (TAILQ_EMPTY(&pg->md.pv_list)) { - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (0); } @@ -917,7 +918,7 @@ pmap_clearbit(struct vm_page *pg, u_int if (maskbits & PVF_WRITE) vm_page_aflag_clear(pg, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -927,15 +928,15 @@ pmap_clearbit(struct vm_page *pg, u_int * pmap_remove_pv: remove a mappiing from a vm_page list * * NOTE: pmap_enter_pv expects to lock the pvh itself - * pmap_remove_pv expects te caller to lock the pvh before calling + * pmap_remove_pv expects the caller to lock the pvh before calling */ /* - * pmap_enter_pv: enter a mapping onto a vm_page lst + * pmap_enter_pv: enter a mapping onto a vm_page's PV list * - * => caller should hold the proper lock on pmap_main_lock + * => caller should hold the proper lock on pvh_global_lock * => caller should have pmap locked - * => we will gain the lock on the vm_page and allocate the new pv_entry + * => we will (someday) gain the lock on the vm_page's PV list * => caller should adjust ptp's wire_count before calling * => caller should not adjust pmap's wire_count */ @@ -944,7 +945,7 @@ pmap_enter_pv(struct vm_page *pg, struct vm_offset_t va, u_int flags) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_ASSERT_LOCKED(pm); pve->pv_pmap = pm; @@ -970,7 +971,7 @@ pmap_find_pv(struct vm_page *pg, pmap_t { struct pv_entry *pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pg->md.pv_list, pv_list) if (pm == pv->pv_pmap && va == pv->pv_va) break; @@ -1031,7 +1032,7 @@ static void pmap_nuke_pv(struct vm_page *pg, pmap_t pm, struct pv_entry *pve) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_ASSERT_LOCKED(pm); TAILQ_REMOVE(&pg->md.pv_list, pve, pv_list); @@ -1064,7 +1065,7 @@ pmap_remove_pv(struct vm_page *pg, pmap_ { struct pv_entry *pve; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); pve = TAILQ_FIRST(&pg->md.pv_list); while (pve) { @@ -1096,7 +1097,7 @@ pmap_modify_pv(struct vm_page *pg, pmap_ u_int flags, oflags; PMAP_ASSERT_LOCKED(pm); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if ((npv = pmap_find_pv(pg, pm, va)) == NULL) return (0); @@ -1210,7 +1211,7 @@ pmap_fault_fixup(pmap_t pm, vm_offset_t int rv = 0; l1idx = L1_IDX(va); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); /* @@ -1374,7 +1375,7 @@ pmap_fault_fixup(pmap_t pm, vm_offset_t rv = 1; out: - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pm); return (rv); } @@ -1682,6 +1683,11 @@ pmap_bootstrap(vm_offset_t firstaddr, vm TAILQ_INIT(&kernel_pmap->pm_pvlist); /* + * Initialize the global pv list lock. + */ + rw_init_flags(&pvh_global_lock, "pmap pv global", RW_RECURSE); + + /* * Reserve some special page table entries/VA space for temporary * mapping of pages. */ @@ -1946,7 +1952,7 @@ pmap_remove_pages(pmap_t pmap) vm_page_t m; pt_entry_t *pt; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { if (pv->pv_flags & PVF_WIRED) { @@ -1969,7 +1975,7 @@ pmap_remove_pages(pmap_t pmap) pmap_free_pv_entry(pv); pmap_free_l2_bucket(pmap, l2b, 1); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); cpu_tlb_flushID(); cpu_cpwait(); PMAP_UNLOCK(pmap); @@ -2326,7 +2332,7 @@ pmap_remove_all(vm_page_t m) if (TAILQ_EMPTY(&m->md.pv_list)) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); pmap_remove_write(m); curpm = vmspace_pmap(curproc->p_vmspace); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { @@ -2356,7 +2362,7 @@ pmap_remove_all(vm_page_t m) cpu_tlb_flushD(); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } int @@ -2444,7 +2450,7 @@ pmap_protect(pmap_t pm, vm_offset_t sva, return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); /* @@ -2506,7 +2512,7 @@ pmap_protect(pmap_t pm, vm_offset_t sva, if (PV_BEEN_REFD(flags)) cpu_tlb_flushD(); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pm); } @@ -2530,11 +2536,11 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t prot, boolean_t wired) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); pmap_enter_locked(pmap, va, m, prot, wired, M_WAITOK); PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -2554,7 +2560,7 @@ pmap_enter_locked(pmap_t pmap, vm_offset u_char user; PMAP_ASSERT_LOCKED(pmap); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if (va == vector_page) { pa = systempage.pv_pa; m = NULL; @@ -2594,9 +2600,9 @@ do_l2b_alloc: if (l2b == NULL) { if (flags & M_WAITOK) { PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); goto do_l2b_alloc; } @@ -2789,7 +2795,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { pmap_enter_locked(pmap, start + ptoa(diff), m, prot & @@ -2797,7 +2803,7 @@ pmap_enter_object(pmap_t pmap, vm_offset m = TAILQ_NEXT(m, listq); } PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -2813,12 +2819,12 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); pmap_enter_locked(pmap, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE, M_NOWAIT); PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -2835,7 +2841,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse pt_entry_t *ptep, pte; vm_page_t pg; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); l2b = pmap_get_l2_bucket(pmap, va); KASSERT(l2b, ("No l2b bucket in pmap_change_wiring")); @@ -2844,7 +2850,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse pg = PHYS_TO_VM_PAGE(l2pte_pa(pte)); if (pg) pmap_modify_pv(pg, pmap, va, PVF_WIRED, wired); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3091,7 +3097,7 @@ pmap_remove(pmap_t pm, vm_offset_t sva, * we lock in the pmap => pv_head direction */ - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); total = 0; while (sva < eva) { @@ -3170,7 +3176,7 @@ pmap_remove(pmap_t pm, vm_offset_t sva, pmap_free_l2_bucket(pm, l2b, mappings); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); if (flushall) cpu_tlb_flushID(); PMAP_UNLOCK(pm); @@ -3323,7 +3329,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (pv->pv_pmap == pmap) { rv = TRUE; @@ -3334,7 +3340,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p break; } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -3353,11 +3359,11 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) if ((pv->pv_flags & PVF_WIRED) != 0) count++; - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } Modified: user/mjacob/sys/arm/arm/pmap.c ============================================================================== --- user/mjacob/sys/arm/arm/pmap.c Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/arm/pmap.c Fri Sep 14 18:57:07 2012 (r240511) @@ -1588,11 +1588,11 @@ pmap_clearbit(struct vm_page *pg, u_int */ /* - * pmap_enter_pv: enter a mapping onto a vm_page lst + * pmap_enter_pv: enter a mapping onto a vm_page's PV list * * => caller should hold the proper lock on pvh_global_lock * => caller should have pmap locked - * => we will gain the lock on the vm_page and allocate the new pv_entry + * => we will (someday) gain the lock on the vm_page's PV list * => caller should adjust ptp's wire_count before calling * => caller should not adjust pmap's wire_count */ @@ -1600,33 +1600,26 @@ static void pmap_enter_pv(struct vm_page *pg, struct pv_entry *pve, pmap_t pm, vm_offset_t va, u_int flags) { - int km; rw_assert(&pvh_global_lock, RA_WLOCKED); - + PMAP_ASSERT_LOCKED(pm); if (pg->md.pv_kva != 0) { - /* PMAP_ASSERT_LOCKED(pmap_kernel()); */ - pve->pv_pmap = pmap_kernel(); + pve->pv_pmap = kernel_pmap; pve->pv_va = pg->md.pv_kva; pve->pv_flags = PVF_WRITE | PVF_UNMAN; - pg->md.pv_kva = 0; - - if (!(km = PMAP_OWNED(pmap_kernel()))) - PMAP_LOCK(pmap_kernel()); + if (pm != kernel_pmap) + PMAP_LOCK(kernel_pmap); TAILQ_INSERT_HEAD(&pg->md.pv_list, pve, pv_list); - TAILQ_INSERT_HEAD(&pve->pv_pmap->pm_pvlist, pve, pv_plist); - PMAP_UNLOCK(pmap_kernel()); + TAILQ_INSERT_HEAD(&kernel_pmap->pm_pvlist, pve, pv_plist); + if (pm != kernel_pmap) + PMAP_UNLOCK(kernel_pmap); + pg->md.pv_kva = 0; if ((pve = pmap_get_pv_entry()) == NULL) panic("pmap_kenter_pv: no pv entries"); - if (km) - PMAP_LOCK(pmap_kernel()); } - - PMAP_ASSERT_LOCKED(pm); pve->pv_pmap = pm; pve->pv_va = va; pve->pv_flags = flags; - TAILQ_INSERT_HEAD(&pg->md.pv_list, pve, pv_list); TAILQ_INSERT_HEAD(&pm->pm_pvlist, pve, pv_plist); pg->md.pvh_attrs |= flags & (PVF_REF | PVF_MOD); Copied: user/mjacob/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c (from r240510, head/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/mjacob/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c Fri Sep 14 18:57:07 2012 (r240511, copy of r240510, head/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c) @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2012 Hans Petter Selasky. 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 AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include + +static device_probe_t dwc_otg_probe; +static device_attach_t dwc_otg_attach; +static device_detach_t dwc_otg_detach; + +struct dwc_otg_super_softc { + struct dwc_otg_softc sc_otg; /* must be first */ +}; + +static int +dwc_otg_probe(device_t dev) +{ + if (!ofw_bus_is_compatible(dev, "synopsys,designware-hs-otg2")) + return (ENXIO); + + device_set_desc(dev, "DWC OTG 2.0 integrated USB controller"); + + return (0); +} + +static int +dwc_otg_attach(device_t dev) +{ + struct dwc_otg_super_softc *sc = device_get_softc(dev); + int err; + int rid; + + /* initialise some bus fields */ + sc->sc_otg.sc_bus.parent = dev; + sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; + sc->sc_otg.sc_bus.devices_max = DWC_OTG_MAX_DEVICES; + + /* get all DMA memory */ + if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, + USB_GET_DMA_TAG(dev), NULL)) { + return (ENOMEM); + } + rid = 0; + sc->sc_otg.sc_io_res = + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + + if (!(sc->sc_otg.sc_io_res)) { + err = ENOMEM; + goto error; + } + sc->sc_otg.sc_io_tag = rman_get_bustag(sc->sc_otg.sc_io_res); + sc->sc_otg.sc_io_hdl = rman_get_bushandle(sc->sc_otg.sc_io_res); + sc->sc_otg.sc_io_size = rman_get_size(sc->sc_otg.sc_io_res); + + rid = 0; + sc->sc_otg.sc_irq_res = + bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); + if (sc->sc_otg.sc_irq_res == NULL) + goto error; + + sc->sc_otg.sc_bus.bdev = device_add_child(dev, "usbus", -1); + if (sc->sc_otg.sc_bus.bdev == NULL) + goto error; + + device_set_ivars(sc->sc_otg.sc_bus.bdev, &sc->sc_otg.sc_bus); + + err = bus_setup_intr(dev, sc->sc_otg.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)dwc_otg_interrupt, sc, &sc->sc_otg.sc_intr_hdl); + if (err) { + sc->sc_otg.sc_intr_hdl = NULL; + goto error; + } + err = dwc_otg_init(&sc->sc_otg); + if (err == 0) { + err = device_probe_and_attach(sc->sc_otg.sc_bus.bdev); + } + if (err) + goto error; + + + return (0); + +error: + dwc_otg_detach(dev); + return (ENXIO); +} + +static int +dwc_otg_detach(device_t dev) +{ + struct dwc_otg_super_softc *sc = device_get_softc(dev); + device_t bdev; + int err; + + if (sc->sc_otg.sc_bus.bdev) { + bdev = sc->sc_otg.sc_bus.bdev; + device_detach(bdev); + device_delete_child(dev, bdev); + } + /* during module unload there are lots of children leftover */ + device_delete_children(dev); + + if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) { + /* + * only call dwc_otg_uninit() after dwc_otg_init() + */ + dwc_otg_uninit(&sc->sc_otg); + + err = bus_teardown_intr(dev, sc->sc_otg.sc_irq_res, + sc->sc_otg.sc_intr_hdl); + sc->sc_otg.sc_intr_hdl = NULL; + } + /* free IRQ channel, if any */ + if (sc->sc_otg.sc_irq_res) { + bus_release_resource(dev, SYS_RES_IRQ, 0, + sc->sc_otg.sc_irq_res); + sc->sc_otg.sc_irq_res = NULL; + } + /* free memory resource, if any */ + if (sc->sc_otg.sc_io_res) { + bus_release_resource(dev, SYS_RES_MEMORY, 0, + sc->sc_otg.sc_io_res); + sc->sc_otg.sc_io_res = NULL; + } + usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL); + + return (0); +} + +static device_method_t dwc_otg_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, dwc_otg_probe), + DEVMETHOD(device_attach, dwc_otg_attach), + DEVMETHOD(device_detach, dwc_otg_detach), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + + DEVMETHOD_END +}; + +static driver_t dwc_otg_driver = { + .name = "dwcotg", + .methods = dwc_otg_methods, + .size = sizeof(struct dwc_otg_super_softc), +}; + +static devclass_t dwc_otg_devclass; + +DRIVER_MODULE(dwcotg, simplebus, dwc_otg_driver, dwc_otg_devclass, 0, 0); +MODULE_DEPEND(dwcotg, usb, 1, 1, 1); Modified: user/mjacob/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- user/mjacob/sys/arm/broadcom/bcm2835/files.bcm2835 Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/broadcom/bcm2835/files.bcm2835 Fri Sep 14 18:57:07 2012 (r240511) @@ -8,6 +8,7 @@ arm/broadcom/bcm2835/bcm2835_systimer.c arm/broadcom/bcm2835/bcm2835_wdog.c standard arm/broadcom/bcm2835/bus_space.c optional fdt arm/broadcom/bcm2835/common.c optional fdt +arm/broadcom/bcm2835/dwc_otg_brcm.c optional dwcotg arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard Modified: user/mjacob/sys/arm/conf/ARMADAXP ============================================================================== --- user/mjacob/sys/arm/conf/ARMADAXP Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/conf/ARMADAXP Fri Sep 14 18:57:07 2012 (r240511) @@ -96,7 +96,10 @@ options HZ=1000 options DEVICE_POLLING device vlan +#PCI/PCIE +device pci + #FDT options FDT options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=db88f78160.dts +makeoptions FDT_DTS_FILE=db78460.dts Modified: user/mjacob/sys/arm/conf/RPI-B ============================================================================== --- user/mjacob/sys/arm/conf/RPI-B Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/conf/RPI-B Fri Sep 14 18:57:07 2012 (r240511) @@ -59,6 +59,7 @@ options SYSVMSG #SYSV-style message q options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev +#options ROOTDEVNAME=\"ufs:/dev/da0s1a\" options PREEMPTION @@ -85,15 +86,20 @@ options INVARIANT_SUPPORT #Extra sanity device md device random # Entropy device -# Not yet: USB support -# device usb -# options USB_DEBUG - - -# Not yet: USB Ethernet support, requires miibus -# device mii -# device smc -# device smcphy +# USB support +device usb +options USB_DEBUG +device dwcotg #DWC OTG controller + +# USB storage support +device scbus +device da +device umass + +# USB ethernet support +device smcphy +device mii +device smsc # Flattened Device Tree options FDT Modified: user/mjacob/sys/arm/include/armreg.h ============================================================================== --- user/mjacob/sys/arm/include/armreg.h Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/include/armreg.h Fri Sep 14 18:57:07 2012 (r240511) @@ -170,11 +170,12 @@ #define CPU_ID_MV88SV581X_V6 0x560F5810 /* Marvell Sheeva 88SV581x v6 Core */ #define CPU_ID_MV88SV581X_V7 0x561F5810 /* Marvell Sheeva 88SV581x v7 Core */ -#define CPU_ID_MV88SV584X 0x561F5840 /* Marvell Sheeva 88SV584x v6 Core */ +#define CPU_ID_MV88SV584X_V6 0x561F5840 /* Marvell Sheeva 88SV584x v6 Core */ +#define CPU_ID_MV88SV584X_V7 0x562F5840 /* Marvell Sheeva 88SV584x v7 Core */ /* Marvell's CPUIDs with ARM ID in implementor field */ #define CPU_ID_ARM_88SV581X_V6 0x410fb760 /* Marvell Sheeva 88SV581x v6 Core */ #define CPU_ID_ARM_88SV581X_V7 0x413FC080 /* Marvell Sheeva 88SV581x v7 Core */ -#define CPU_ID_ARM_88SV584X 0x410FB024 /* Marvell Sheeva 88SV584x v6 Core */ +#define CPU_ID_ARM_88SV584X_V6 0x410FB020 /* Marvell Sheeva 88SV584x v6 Core */ #define CPU_ID_FA526 0x66015260 #define CPU_ID_FA626TE 0x66056260 Modified: user/mjacob/sys/arm/include/intr.h ============================================================================== --- user/mjacob/sys/arm/include/intr.h Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/include/intr.h Fri Sep 14 18:57:07 2012 (r240511) @@ -54,6 +54,13 @@ #define NIRQ 128 #elif defined(CPU_ARM11) #define NIRQ 128 +#elif defined(SOC_MV_ARMADAXP) +#define MAIN_IRQ_NUM 116 +#define ERR_IRQ_NUM 32 +#define ERR_IRQ (MAIN_IRQ_NUM) +#define MSI_IRQ_NUM 32 +#define MSI_IRQ (ERR_IRQ + ERR_IRQ_NUM) +#define NIRQ (MAIN_IRQ_NUM + ERR_IRQ_NUM + MSI_IRQ_NUM) #else #define NIRQ 32 #endif Modified: user/mjacob/sys/arm/mv/armadaxp/armadaxp.c ============================================================================== --- user/mjacob/sys/arm/mv/armadaxp/armadaxp.c Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/mv/armadaxp/armadaxp.c Fri Sep 14 18:57:07 2012 (r240511) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -43,31 +44,119 @@ __FBSDID("$FreeBSD$"); #include +#define CPU_FREQ_FIELD(sar) (((0x01 & (sar >> 52)) << 3) | \ + (0x07 & (sar >> 21))) +#define FAB_FREQ_FIELD(sar) (((0x01 & (sar >> 51)) << 4) | \ + (0x0F & (sar >> 24))) + +static uint32_t count_l2clk(void); + +/* XXX Make gpio driver optional and remove it */ struct resource_spec mv_gpio_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { -1, 0 } }; +struct vco_freq_ratio { + uint8_t vco_cpu; /* VCO to CLK0(CPU) clock ratio */ + uint8_t vco_l2c; /* VCO to NB(L2 cache) clock ratio */ + uint8_t vco_hcl; /* VCO to HCLK(DDR controller) clock ratio */ + uint8_t vco_ddr; /* VCO to DR(DDR memory) clock ratio */ +}; + +static struct vco_freq_ratio freq_conf_table[] = { +/*00*/ { 1, 1, 4, 2 }, +/*01*/ { 1, 2, 2, 2 }, +/*02*/ { 2, 2, 6, 3 }, +/*03*/ { 2, 2, 3, 3 }, +/*04*/ { 1, 2, 3, 3 }, +/*05*/ { 1, 2, 4, 2 }, +/*06*/ { 1, 1, 2, 2 }, +/*07*/ { 2, 3, 6, 6 }, +/*08*/ { 2, 3, 5, 5 }, +/*09*/ { 1, 2, 6, 3 }, +/*10*/ { 2, 4, 10, 5 }, +/*11*/ { 1, 3, 6, 6 }, +/*12*/ { 1, 2, 5, 5 }, +/*13*/ { 1, 3, 6, 3 }, +/*14*/ { 1, 2, 5, 5 }, +/*15*/ { 2, 2, 5, 5 }, +/*16*/ { 1, 1, 3, 3 }, +/*17*/ { 2, 5, 10, 10 }, +/*18*/ { 1, 3, 8, 4 }, +/*19*/ { 1, 1, 2, 1 }, +/*20*/ { 2, 3, 6, 3 }, +/*21*/ { 1, 2, 8, 4 }, +/*22*/ { 2, 5, 10, 5 } +}; + +static uint16_t cpu_clock_table[] = { + 1000, 1066, 1200, 1333, 1500, 1666, 1800, 2000, 600, 667, 800, 1600, + 2133, 2200, 2400 }; + uint32_t get_tclk(void) { + uint32_t cputype; - return (TCLK_200MHZ); + cputype = cpufunc_id(); + cputype &= CPU_ID_CPU_MASK; + + if (cputype == CPU_ID_MV88SV584X_V7) + return (TCLK_250MHZ); + else + return (TCLK_200MHZ); } -uint32_t -get_l2clk(void) +static uint32_t +count_l2clk(void) { + uint64_t sar_reg; + uint32_t freq_vco, freq_l2clk; + uint8_t sar_cpu_freq, sar_fab_freq, array_size; + + /* Get value of the SAR register and process it */ + sar_reg = get_sar_value(); + sar_cpu_freq = CPU_FREQ_FIELD(sar_reg); + sar_fab_freq = FAB_FREQ_FIELD(sar_reg); + + /* Check if CPU frequency field has correct value */ + array_size = sizeof(cpu_clock_table) / sizeof(cpu_clock_table[0]); + if (sar_cpu_freq >= array_size) + panic("Reserved value in cpu frequency configuration field: " + "%d", sar_cpu_freq); + + /* Check if fabric frequency field has correct value */ + array_size = sizeof(freq_conf_table) / sizeof(freq_conf_table[0]); + if (sar_fab_freq >= array_size) + panic("Reserved value in fabric frequency configuration field: " + "%d", sar_fab_freq); + + /* Get CPU clock frequency */ + freq_vco = cpu_clock_table[sar_cpu_freq] * + freq_conf_table[sar_fab_freq].vco_cpu; + + /* Get L2CLK clock frequency */ + freq_l2clk = freq_vco / freq_conf_table[sar_fab_freq].vco_l2c; + + /* Round L2CLK value to integer MHz */ + if (((freq_vco % freq_conf_table[sar_fab_freq].vco_l2c) * 10 / + freq_conf_table[sar_fab_freq].vco_l2c) >= 5) + freq_l2clk++; - return (TCLK_667MHZ); + return (freq_l2clk * 1000000); } -int -fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, vm_offset_t io_va, - vm_offset_t mem_va) +uint32_t +get_l2clk(void) { + static uint32_t l2clk_freq = 0; + + /* If get_l2clk is called first time get L2CLK value from register */ + if (l2clk_freq == 0) + l2clk_freq = count_l2clk(); - return (0); + return (l2clk_freq); } Modified: user/mjacob/sys/arm/mv/common.c ============================================================================== --- user/mjacob/sys/arm/mv/common.c Fri Sep 14 18:45:14 2012 (r240510) +++ user/mjacob/sys/arm/mv/common.c Fri Sep 14 18:57:07 2012 (r240511) @@ -249,12 +249,47 @@ write_cpu_ctrl(uint32_t reg, uint32_t va bus_space_write_4(fdtbus_bs_tag, MV_CPU_CONTROL_BASE, reg, val); } +#if defined(SOC_MV_ARMADAXP) +uint32_t +read_cpu_mp_clocks(uint32_t reg) +{ + *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***