From owner-svn-src-stable-7@FreeBSD.ORG Sun Dec 16 16:56:00 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08DF7F8B; Sun, 16 Dec 2012 16:56:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DC7B08FC18; Sun, 16 Dec 2012 16:55:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGtx4g014712; Sun, 16 Dec 2012 16:55:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGtxOk014710; Sun, 16 Dec 2012 16:55:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161655.qBGGtxOk014710@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244299 - stable/7/usr.bin/cut X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 16:56:00 -0000 Author: eadler Date: Sun Dec 16 16:55:59 2012 New Revision: 244299 URL: http://svnweb.freebsd.org/changeset/base/244299 Log: MFC r236866,r236867: - Consistenly mention columns and fields - Add -b to short error messages Approved by: kevlo Approved by: cperciva (implicit) Modified: stable/7/usr.bin/cut/cut.1 stable/7/usr.bin/cut/cut.c Directory Properties: stable/7/usr.bin/cut/ (props changed) Modified: stable/7/usr.bin/cut/cut.1 ============================================================================== --- stable/7/usr.bin/cut/cut.1 Sun Dec 16 16:55:40 2012 (r244298) +++ stable/7/usr.bin/cut/cut.1 Sun Dec 16 16:55:59 2012 (r244299) @@ -72,7 +72,7 @@ The items specified by .Ar list can be in terms of column position or in terms of fields delimited by a special character. -Column numbering starts from 1. +Column and field numbering start from 1. .Pp The .Ar list @@ -82,14 +82,14 @@ number ranges. Number ranges consist of a number, a dash .Pq Sq \- , and a second number -and select the fields or columns from the first number to the second, +and select the columns or fields from the first number to the second, inclusive. Numbers or number ranges may be preceded by a dash, which selects all -fields or columns from 1 to the last number. +columns or fields from 1 to the last number. Numbers or number ranges may be followed by a dash, which selects all -fields or columns from the last number to the end of the line. +columns or fields from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. -It is not an error to select fields or columns not present in the +It is not an error to select columns or fields not present in the input line. .Pp The options are as follows: Modified: stable/7/usr.bin/cut/cut.c ============================================================================== --- stable/7/usr.bin/cut/cut.c Sun Dec 16 16:55:40 2012 (r244298) +++ stable/7/usr.bin/cut/cut.c Sun Dec 16 16:55:59 2012 (r244299) @@ -168,7 +168,7 @@ get_list(char *list) * set a byte in the positions array to indicate if a field or * column is to be selected; use +1, it's 1-based, not 0-based. * Numbers and number ranges may be overlapping, repeated, and in - * any order. We handle "-3-5" although there's no real reason too. + * any order. We handle "-3-5" although there's no real reason to. */ for (; (p = strsep(&list, ", \t")) != NULL;) { setautostart = start = stop = 0; @@ -191,9 +191,9 @@ get_list(char *list) } } if (*p) - errx(1, "[-cf] list: illegal list value"); + errx(1, "[-bcf] list: illegal list value"); if (!stop || !start) - errx(1, "[-cf] list: values may not include zero"); + errx(1, "[-bcf] list: values may not include zero"); if (maxval < stop) { maxval = stop; needpos(maxval + 1); From owner-svn-src-stable-7@FreeBSD.ORG Sun Dec 16 16:59:45 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7460E2AA; Sun, 16 Dec 2012 16:59:45 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC208FC12; Sun, 16 Dec 2012 16:59:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGxjgT015328; Sun, 16 Dec 2012 16:59:45 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGxjTA015327; Sun, 16 Dec 2012 16:59:45 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161659.qBGGxjTA015327@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244301 - stable/7/usr.bin/cut X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 16:59:45 -0000 Author: eadler Date: Sun Dec 16 16:59:44 2012 New Revision: 244301 URL: http://svnweb.freebsd.org/changeset/base/244301 Log: MFC r227162: Add missing static keywords to cut(1) Approved by: ed Approved by: cperciva (implicit) Modified: stable/7/usr.bin/cut/cut.c Directory Properties: stable/7/usr.bin/cut/ (props changed) Modified: stable/7/usr.bin/cut/cut.c ============================================================================== --- stable/7/usr.bin/cut/cut.c Sun Dec 16 16:59:42 2012 (r244300) +++ stable/7/usr.bin/cut/cut.c Sun Dec 16 16:59:44 2012 (r244301) @@ -54,25 +54,25 @@ __FBSDID("$FreeBSD$"); #include #include -int bflag; -int cflag; -wchar_t dchar; -char dcharmb[MB_LEN_MAX + 1]; -int dflag; -int fflag; -int nflag; -int sflag; - -size_t autostart, autostop, maxval; -char * positions; - -int b_cut(FILE *, const char *); -int b_n_cut(FILE *, const char *); -int c_cut(FILE *, const char *); -int f_cut(FILE *, const char *); -void get_list(char *); -void needpos(size_t); -static void usage(void); +static int bflag; +static int cflag; +static wchar_t dchar; +static char dcharmb[MB_LEN_MAX + 1]; +static int dflag; +static int fflag; +static int nflag; +static int sflag; + +static size_t autostart, autostop, maxval; +static char * positions; + +static int b_cut(FILE *, const char *); +static int b_n_cut(FILE *, const char *); +static int c_cut(FILE *, const char *); +static int f_cut(FILE *, const char *); +static void get_list(char *); +static void needpos(size_t); +static void usage(void); int main(int argc, char *argv[]) @@ -157,7 +157,7 @@ main(int argc, char *argv[]) exit(rval); } -void +static void get_list(char *list) { size_t setautostart, start, stop; @@ -212,7 +212,7 @@ get_list(char *list) memset(positions + 1, '1', autostart); } -void +static void needpos(size_t n) { static size_t npos; @@ -231,7 +231,7 @@ needpos(size_t n) } } -int +static int b_cut(FILE *fp, const char *fname __unused) { int ch, col; @@ -265,7 +265,7 @@ b_cut(FILE *fp, const char *fname __unus * Although this function also handles the case where -n is not specified, * b_cut() ought to be much faster. */ -int +static int b_n_cut(FILE *fp, const char *fname) { size_t col, i, lbuflen; @@ -327,7 +327,7 @@ b_n_cut(FILE *fp, const char *fname) return (warned); } -int +static int c_cut(FILE *fp, const char *fname) { wint_t ch; @@ -362,7 +362,7 @@ out: return (0); } -int +static int f_cut(FILE *fp, const char *fname) { wchar_t ch; From owner-svn-src-stable-7@FreeBSD.ORG Sun Dec 16 17:01:24 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7638F72D; Sun, 16 Dec 2012 17:01:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8318FC13; Sun, 16 Dec 2012 17:01:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGH1OmL015917; Sun, 16 Dec 2012 17:01:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGH1OVF015911; Sun, 16 Dec 2012 17:01:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161701.qBGH1OVF015911@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 17:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244304 - stable/7/usr.bin/cut X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 17:01:24 -0000 Author: eadler Date: Sun Dec 16 17:01:23 2012 New Revision: 244304 URL: http://svnweb.freebsd.org/changeset/base/244304 Log: MFC r243320,r243474: Add 'w' flag to: Use whitespace (spaces and tabs) as the delimiter. Consecutive spaces and tabs count as one single field separator. Approved by: cperciva (implicit) Modified: stable/7/usr.bin/cut/cut.1 stable/7/usr.bin/cut/cut.c Directory Properties: stable/7/usr.bin/cut/ (props changed) Modified: stable/7/usr.bin/cut/cut.1 ============================================================================== --- stable/7/usr.bin/cut/cut.1 Sun Dec 16 17:01:23 2012 (r244303) +++ stable/7/usr.bin/cut/cut.1 Sun Dec 16 17:01:23 2012 (r244304) @@ -35,7 +35,7 @@ .\" @(#)cut.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 21, 2006 +.Dd August 8, 2012 .Dt CUT 1 .Os .Sh NAME @@ -51,7 +51,7 @@ .Op Ar .Nm .Fl f Ar list -.Op Fl d Ar delim +.Op Fl w | Fl d Ar delim .Op Fl s .Op Ar .Sh DESCRIPTION @@ -123,6 +123,9 @@ that form the character are selected. .It Fl s Suppress lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified. +.It Fl w +Use whitespace (spaces and tabs) as the delimiter. +Consecutive spaces and tabs count as one single field separator. .El .Sh ENVIRONMENT The Modified: stable/7/usr.bin/cut/cut.c ============================================================================== --- stable/7/usr.bin/cut/cut.c Sun Dec 16 17:01:23 2012 (r244303) +++ stable/7/usr.bin/cut/cut.c Sun Dec 16 17:01:23 2012 (r244304) @@ -62,6 +62,7 @@ static int dflag; static int fflag; static int nflag; static int sflag; +static int wflag; static size_t autostart, autostop, maxval; static char * positions; @@ -71,6 +72,7 @@ static int b_n_cut(FILE *, const char *) static int c_cut(FILE *, const char *); static int f_cut(FILE *, const char *); static void get_list(char *); +static int is_delim(wchar_t); static void needpos(size_t); static void usage(void); @@ -88,7 +90,7 @@ main(int argc, char *argv[]) dchar = '\t'; /* default delimiter is \t */ strcpy(dcharmb, "\t"); - while ((ch = getopt(argc, argv, "b:c:d:f:sn")) != -1) + while ((ch = getopt(argc, argv, "b:c:d:f:snw")) != -1) switch(ch) { case 'b': get_list(optarg); @@ -115,6 +117,9 @@ main(int argc, char *argv[]) case 'n': nflag = 1; break; + case 'w': + wflag = 1; + break; case '?': default: usage(); @@ -123,9 +128,9 @@ main(int argc, char *argv[]) argv += optind; if (fflag) { - if (bflag || cflag || nflag) + if (bflag || cflag || nflag || (wflag && dflag)) usage(); - } else if (!(bflag || cflag) || dflag || sflag) + } else if (!(bflag || cflag) || dflag || sflag || wflag) usage(); else if (!bflag && nflag) usage(); @@ -363,18 +368,30 @@ out: } static int +is_delim(wchar_t ch) +{ + if (wflag) { + if (ch == ' ' || ch == '\t') + return 1; + } else { + if (ch == dchar) + return 1; + } + return 0; +} + +static int f_cut(FILE *fp, const char *fname) { wchar_t ch; int field, i, isdelim; char *pos, *p; - wchar_t sep; int output; char *lbuf, *mlbuf; size_t clen, lbuflen, reallen; mlbuf = NULL; - for (sep = dchar; (lbuf = fgetln(fp, &lbuflen)) != NULL;) { + while ((lbuf = fgetln(fp, &lbuflen)) != NULL) { reallen = lbuflen; /* Assert EOL has a newline. */ if (*(lbuf + lbuflen - 1) != '\n') { @@ -398,7 +415,7 @@ f_cut(FILE *fp, const char *fname) if (clen == 0) clen = 1; /* this should work if newline is delimiter */ - if (ch == sep) + if (is_delim(ch)) isdelim = 1; if (ch == '\n') { if (!isdelim && !sflag) @@ -425,8 +442,13 @@ f_cut(FILE *fp, const char *fname) if (clen == 0) clen = 1; p += clen; - if (ch == '\n' || ch == sep) + if (ch == '\n' || is_delim(ch)) { + /* compress whitespace */ + if (wflag && ch != '\n') + while (is_delim(*p)) + p++; break; + } if (*pos) for (i = 0; i < (int)clen; i++) putchar(p[i - clen]); @@ -456,6 +478,6 @@ usage(void) (void)fprintf(stderr, "%s\n%s\n%s\n", "usage: cut -b list [-n] [file ...]", " cut -c list [file ...]", - " cut -f list [-s] [-d delim] [file ...]"); + " cut -f list [-s] [-w | -d delim] [file ...]"); exit(1); } From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 19 12:20:05 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98B5386E; Wed, 19 Dec 2012 12:20:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E54C48FC0A; Wed, 19 Dec 2012 12:20:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBJCK4El091602; Wed, 19 Dec 2012 12:20:04 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBJCK49p091601; Wed, 19 Dec 2012 12:20:04 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201212191220.qBJCK49p091601@svn.freebsd.org> From: Dimitry Andric Date: Wed, 19 Dec 2012 12:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244432 - stable/7/sbin/devd X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 12:20:05 -0000 Author: dim Date: Wed Dec 19 12:20:04 2012 New Revision: 244432 URL: http://svnweb.freebsd.org/changeset/base/244432 Log: MFC r243907: Fix an old bug in devd, where it uses std::sort() to sort the various lists it reads from its configuration files on the priority field. Because some items in the lists have the same priority, and std::sort() is not stable, the exact order in which the items are enumerated does not have to correspond to the order they appear in the configuration files. Apparently this was never noticed with libstdc++, but with libc++ it could cause the "uhid" entry from /etc/devd/usb.conf to be used instead of the "ums" entry (which is earlier in the file). This caused the problem described in the PR: the USB mouse module was never loaded, and the other actions (such as starting moused) were not executed. To fix the problem, make devd use std:stable_sort() instead. Reported by: Jan Beich PR: bin/172958 Modified: stable/7/sbin/devd/devd.cc Directory Properties: stable/7/sbin/devd/ (props changed) Modified: stable/7/sbin/devd/devd.cc ============================================================================== --- stable/7/sbin/devd/devd.cc Wed Dec 19 12:19:56 2012 (r244431) +++ stable/7/sbin/devd/devd.cc Wed Dec 19 12:20:04 2012 (r244432) @@ -351,7 +351,7 @@ public: void config::sort_vector(vector &v) { - sort(v.begin(), v.end(), epv_greater()); + stable_sort(v.begin(), v.end(), epv_greater()); } void From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 20 00:26:48 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36D62286; Thu, 20 Dec 2012 00:26:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 013A38FC14; Thu, 20 Dec 2012 00:26:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Qlqa020857; Thu, 20 Dec 2012 00:26:47 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0Qld5020856; Thu, 20 Dec 2012 00:26:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200026.qBK0Qld5020856@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244456 - stable/7/usr.sbin/mergemaster X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:26:48 -0000 Author: eadler Date: Thu Dec 20 00:26:47 2012 New Revision: 244456 URL: http://svnweb.freebsd.org/changeset/base/244456 Log: MFC r243892: Remove pointless check for the existence of /usr/bin/less which exists in all configurations. Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/ (props changed) stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:26:46 2012 (r244455) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:26:47 2012 (r244456) @@ -421,9 +421,7 @@ check_pager () { echo " I cannot execute it. So, what would you like to do?" echo '' echo " Use 'e' to exit mergemaster and fix your PAGER variable" - if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then echo " Use 'l' to set PAGER to 'less' for this run" - fi echo " Use 'm' to use plain old 'more' as your PAGER for this run" echo '' echo " Default is to use plain old 'more' " @@ -436,17 +434,7 @@ check_pager () { exit 0 ;; [lL]) - if [ -x /usr/bin/less ]; then - PAGER=/usr/bin/less - elif [ -x /usr/local/bin/less ]; then - PAGER=/usr/local/bin/less - else - echo '' - echo " *** Fatal Error:" - echo " You asked to use 'less' as your pager, but I can't" - echo " find it in /usr/bin or /usr/local/bin" - exit 1 - fi + PAGER=less ;; [mM]|'') PAGER=more From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 20 00:28:52 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 960CE7E7; Thu, 20 Dec 2012 00:28:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 79DC08FC0C; Thu, 20 Dec 2012 00:28:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0SqBU021272; Thu, 20 Dec 2012 00:28:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0SqZh021262; Thu, 20 Dec 2012 00:28:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200028.qBK0SqZh021262@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244458 - stable/7/usr.sbin/pw X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:28:52 -0000 Author: eadler Date: Thu Dec 20 00:28:51 2012 New Revision: 244458 URL: http://svnweb.freebsd.org/changeset/base/244458 Log: MFC r243894: Remove useless check for NULL prior to free. Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/pw/bitmap.c stable/7/usr.sbin/pw/pw_group.c Directory Properties: stable/7/usr.sbin/pw/ (props changed) Modified: stable/7/usr.sbin/pw/bitmap.c ============================================================================== --- stable/7/usr.sbin/pw/bitmap.c Thu Dec 20 00:28:51 2012 (r244457) +++ stable/7/usr.sbin/pw/bitmap.c Thu Dec 20 00:28:51 2012 (r244458) @@ -50,8 +50,7 @@ bm_alloc(int size) void bm_dealloc(struct bitmap * bm) { - if (bm->map) - free(bm->map); + free(bm->map); } static void Modified: stable/7/usr.sbin/pw/pw_group.c ============================================================================== --- stable/7/usr.sbin/pw/pw_group.c Thu Dec 20 00:28:51 2012 (r244457) +++ stable/7/usr.sbin/pw/pw_group.c Thu Dec 20 00:28:51 2012 (r244458) @@ -272,8 +272,7 @@ pw_group(struct userconf * cnf, int mode pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid); - if (members) - free(members); + free(members); return EXIT_SUCCESS; } From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 20 00:30:49 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3A36FC38; Thu, 20 Dec 2012 00:30:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC888FC17; Thu, 20 Dec 2012 00:30:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Unpc021765; Thu, 20 Dec 2012 00:30:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0UmQY021764; Thu, 20 Dec 2012 00:30:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200030.qBK0UmQY021764@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244462 - stable/7/usr.sbin/mergemaster X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:30:49 -0000 Author: eadler Date: Thu Dec 20 00:30:48 2012 New Revision: 244462 URL: http://svnweb.freebsd.org/changeset/base/244462 Log: MFC r243891: Add ability to mergemaster to permit the user to type the absolute path to PAGER if mergemaster can not find the one already set. Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:30:48 2012 (r244461) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:30:48 2012 (r244462) @@ -424,6 +424,8 @@ check_pager () { echo " Use 'l' to set PAGER to 'less' for this run" echo " Use 'm' to use plain old 'more' as your PAGER for this run" echo '' + echo " or you may type an absolute path to PAGER for this run" + echo '' echo " Default is to use plain old 'more' " echo '' echo -n "What should I do? [Use 'more'] " @@ -439,6 +441,9 @@ check_pager () { [mM]|'') PAGER=more ;; + /*) + PAGER="$FIXPAGER" + ;; *) echo '' echo "invalid choice: ${FIXPAGER}" From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 20 00:32:44 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BFAD10B; Thu, 20 Dec 2012 00:32:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7000B8FC13; Thu, 20 Dec 2012 00:32:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0WiCL022175; Thu, 20 Dec 2012 00:32:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0WifW022170; Thu, 20 Dec 2012 00:32:44 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200032.qBK0WifW022170@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244465 - in stable/7: sbin/setkey usr.sbin/ndp X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:32:44 -0000 Author: eadler Date: Thu Dec 20 00:32:43 2012 New Revision: 244465 URL: http://svnweb.freebsd.org/changeset/base/244465 Log: MFC r244318: Minor wording improvments to some manual pages Approved by: cperciva (implicit) Modified: stable/7/sbin/setkey/setkey.8 stable/7/usr.sbin/ndp/ndp.8 Directory Properties: stable/7/sbin/setkey/ (props changed) stable/7/usr.sbin/ndp/ (props changed) Modified: stable/7/sbin/setkey/setkey.8 ============================================================================== --- stable/7/sbin/setkey/setkey.8 Thu Dec 20 00:32:43 2012 (r244464) +++ stable/7/sbin/setkey/setkey.8 Thu Dec 20 00:32:43 2012 (r244465) @@ -110,7 +110,7 @@ Loop forever and dump all the messages t .Dv PF_KEY socket. .Fl xx -makes each timestamps unformatted. +makes each timestamp unformatted. .El .Ss Configuration syntax With Modified: stable/7/usr.sbin/ndp/ndp.8 ============================================================================== --- stable/7/usr.sbin/ndp/ndp.8 Thu Dec 20 00:32:43 2012 (r244464) +++ stable/7/usr.sbin/ndp/ndp.8 Thu Dec 20 00:32:43 2012 (r244465) @@ -236,8 +236,8 @@ responding to requests for .Ar hostname even though the host address is not its own. .It Fl t -Print timestamp on each entry, -making it possible to merge output with +Print timestamp for each entry, +to make it possible to merge the output with .Xr tcpdump 1 . Most useful when used with .Fl A . From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 20 04:16:26 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15B0AD3C; Thu, 20 Dec 2012 04:16:26 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EE8128FC13; Thu, 20 Dec 2012 04:16:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK4GPJ6067074; Thu, 20 Dec 2012 04:16:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK4GPUk067073; Thu, 20 Dec 2012 04:16:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200416.qBK4GPUk067073@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 04:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244478 - stable/7/sys/dev/sio X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 04:16:26 -0000 Author: eadler Date: Thu Dec 20 04:16:25 2012 New Revision: 244478 URL: http://svnweb.freebsd.org/changeset/base/244478 Log: MFC r242996: Add support for CIR1000 - Cirrus Logic V34 to the sio driver PR: kern/44267 Approved by: cperciva (implicit) Modified: stable/7/sys/dev/sio/sio_isa.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/sio/sio_isa.c ============================================================================== --- stable/7/sys/dev/sio/sio_isa.c Thu Dec 20 04:16:25 2012 (r244477) +++ stable/7/sys/dev/sio/sio_isa.c Thu Dec 20 04:16:25 2012 (r244478) @@ -81,6 +81,7 @@ static struct isa_pnp_id sio_ids[] = { {0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */ {0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */ {0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */ + {0x0010320d, NULL}, /* CIR1000 - Cirrus Logic V34 */ {0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */ {0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */ {0x01308c0e, NULL}, /* CTL3001 - Creative Labs Phoneblaster */ From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 20 18:13:05 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A207775F; Thu, 20 Dec 2012 18:13:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86ED58FC12; Thu, 20 Dec 2012 18:13:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBKID5Is096403; Thu, 20 Dec 2012 18:13:05 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBKID5oZ096401; Thu, 20 Dec 2012 18:13:05 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212201813.qBKID5oZ096401@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 18:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244498 - stable/7/usr.bin/fetch X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 18:13:05 -0000 Author: eadler Date: Thu Dec 20 18:13:04 2012 New Revision: 244498 URL: http://svnweb.freebsd.org/changeset/base/244498 Log: MFC r244037: Add check for failure of mkstemp and setenv. Approved by: cperciva (implicit) Modified: stable/7/usr.bin/fetch/fetch.c Directory Properties: stable/7/usr.bin/fetch/ (props changed) Modified: stable/7/usr.bin/fetch/fetch.c ============================================================================== --- stable/7/usr.bin/fetch/fetch.c Thu Dec 20 18:13:04 2012 (r244497) +++ stable/7/usr.bin/fetch/fetch.c Thu Dec 20 18:13:04 2012 (r244498) @@ -604,7 +604,10 @@ fetch(char *URL, const char *path) asprintf(&tmppath, "%.*s.fetch.XXXXXX.%s", (int)(slash - path), path, slash); if (tmppath != NULL) { - mkstemps(tmppath, strlen(slash) + 1); + if (mkstemps(tmppath, strlen(slash) + 1) == -1) { + warn("%s: mkstemps()", path); + goto failure; + } of = fopen(tmppath, "w"); chown(tmppath, sb.st_uid, sb.st_gid); chmod(tmppath, sb.st_mode & ALLPERMS); @@ -969,7 +972,8 @@ main(int argc, char *argv[]) if (v_tty) fetchAuthMethod = query_auth; if (N_filename != NULL) - setenv("NETRC", N_filename, 1); + if (setenv("NETRC", N_filename, 1) == -1) + err(1, "setenv: cannot set NETRC=%s", N_filename); while (argc) { if ((p = strrchr(*argv, '/')) == NULL)