From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 03:13:30 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C69E106566C; Sun, 17 Oct 2010 03:13:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A3628FC0A; Sun, 17 Oct 2010 03:13:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9H3DUGF001321; Sun, 17 Oct 2010 03:13:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9H3DUud001319; Sun, 17 Oct 2010 03:13:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201010170313.o9H3DUud001319@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Oct 2010 03:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213944 - stable/7/sys/netipsec X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 03:13:30 -0000 Author: bz Date: Sun Oct 17 03:13:30 2010 New Revision: 213944 URL: http://svn.freebsd.org/changeset/base/213944 Log: MFC r213836: Style: make the asterisk go with the variable name, not the type. Modified: stable/7/sys/netipsec/ipsec_output.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netipsec/ipsec_output.c ============================================================================== --- stable/7/sys/netipsec/ipsec_output.c Sun Oct 17 00:18:26 2010 (r213943) +++ stable/7/sys/netipsec/ipsec_output.c Sun Oct 17 03:13:30 2010 (r213944) @@ -705,7 +705,7 @@ ipsec6_output_tunnel(struct ipsec_output struct ipsecrequest *isr; struct secasindex saidx; int error; - struct sockaddr_in6* dst6; + struct sockaddr_in6 *dst6; struct mbuf *m; IPSEC_ASSERT(state != NULL, ("null state")); From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 07:11:41 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FD59106566C; Sun, 17 Oct 2010 07:11:41 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F00DC8FC12; Sun, 17 Oct 2010 07:11:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9H7Bei4008400; Sun, 17 Oct 2010 07:11:40 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9H7Be8w008396; Sun, 17 Oct 2010 07:11:40 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201010170711.o9H7Be8w008396@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 17 Oct 2010 07:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213945 - stable/7/usr.bin/ncal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 07:11:41 -0000 Author: edwin Date: Sun Oct 17 07:11:40 2010 New Revision: 213945 URL: http://svn.freebsd.org/changeset/base/213945 Log: Mega-merge of ncal into stable/7: r186401: Implement a new feature for the "-m" option: if the month number is followed by 'f' or 'p', use the following or preceding month of that number, respectively. Document this. Also includes other minor grammatical and punctuation fixes to the manual page (capitalize Easter, etc.). r191330: Implement highlighting of today in month view of cal/ncal just like gnu cal does. This is currently disabled for year view because of hard coded padding in that case. This will hopefully be fixed soon. r191364: Couple of changes based on feedback o Change mr/me to so/se [1]. o Introduce a -h option to disable highlighting. [2] o Spell STDOUT_FILENO as such and pass NULL to tgetent() to handle the case of unset TERM. [3] r191687: Fixed missing dependency. r194366: Fix column width of weekday names for multibyte locales. r194447: Since the width is always 2, it is enough to put just one trailing space is enough. r204697: - Implement -3 option (show previous, this and next month) option. - Add -A option (months after this month). - Add -B option (months before this month). - Fix highlighting of today in year overview. - Fix aligning of "foreign" characters. r204706: Remove no-op of WARNS?= r204849: - document the -3, -A and -B properly in Synopsis. - add highlight of current date for non-terminals. - fix -J option. - code cleanup. r204908: - Fix the highlighting for non-terminals when the last week is not 7 days long. - "-m " now prints only the month, not the whole year. r205071: - With the introduction of -A, -B and -3, not all combinations of arguments makes sense anymore. For example, what would a combination of -3 (show three months) and -y (show the whole year) do? We will abort on these cases. - Move the debug option -d to -H (from highlight), while -d is now used for setting the day of "today" so that -y and friends can be tested. r205427: Replace -b with -C and -B (as proposed by Alexander). Add -3, -A and -B to the usage. Update regression test for the new parameters. r212032: Use basename(3) to determine the name of the program. Modified: stable/7/usr.bin/ncal/Makefile stable/7/usr.bin/ncal/ncal.1 stable/7/usr.bin/ncal/ncal.c Directory Properties: stable/7/usr.bin/ncal/ (props changed) Modified: stable/7/usr.bin/ncal/Makefile ============================================================================== --- stable/7/usr.bin/ncal/Makefile Sun Oct 17 03:13:30 2010 (r213944) +++ stable/7/usr.bin/ncal/Makefile Sun Oct 17 07:11:40 2010 (r213945) @@ -2,9 +2,8 @@ PROG= ncal -DPADD= ${LIBCALENDAR} -LDADD= -lcalendar -WARNS?= 1 +DPADD= ${LIBCALENDAR} ${LIBTERMCAP} +LDADD= -lcalendar -ltermcap LINKS= ${BINDIR}/ncal ${BINDIR}/cal MLINKS= ncal.1 cal.1 Modified: stable/7/usr.bin/ncal/ncal.1 ============================================================================== --- stable/7/usr.bin/ncal/ncal.1 Sun Oct 17 03:13:30 2010 (r213944) +++ stable/7/usr.bin/ncal/ncal.1 Sun Oct 17 07:11:40 2010 (r213945) @@ -30,34 +30,46 @@ .Sh NAME .Nm cal , .Nm ncal -.Nd displays a calendar and the date of easter +.Nd displays a calendar and the date of Easter .Sh SYNOPSIS .Nm -.Op Fl jy +.Op Fl 3hjy +.Op Fl A Ar number +.Op Fl B Ar number .Oo .Op Ar month .Ar year .Oc .Nm -.Op Fl j +.Op Fl 3hj +.Op Fl A Ar number +.Op Fl B Ar number .Fl m Ar month .Op Ar year .Nm ncal -.Op Fl jJpwy +.Op Fl 3hjJpwy +.Op Fl A Ar number +.Op Fl B Ar number .Op Fl s Ar country_code .Oo .Op Ar month .Ar year .Oc .Nm ncal -.Op Fl Jeo +.Op Fl 3hJeo +.Op Fl A Ar number +.Op Fl B Ar number .Op Ar year +.Nm ncal +.Op Fl CN +.Op Fl H Ar yyyy-mm-dd +.Op Fl d Ar yyyy-mm .Sh DESCRIPTION The .Nm utility displays a simple calendar in traditional format and .Nm ncal -offers an alternative layout, more options and the date of easter. +offers an alternative layout, more options and the date of Easter. The new format is a little cramped but it makes a year fit on a 25x80 terminal. If arguments are not specified, @@ -65,19 +77,29 @@ the current month is displayed. .Pp The options are as follows: .Bl -tag -width indent +.It Fl h +Turns off highlighting of today. .It Fl J Display Julian Calendar, if combined with the .Fl e -option, display date of easter according to the Julian Calendar. +option, display date of Easter according to the Julian Calendar. .It Fl e -Display date of easter (for western churches). +Display date of Easter (for western churches). .It Fl j Display Julian days (days one-based, numbered from January 1). .It Fl m Ar month Display the specified .Ar month . +If +.Ar month +is specified as a decimal number, it may be followed by the letter +.Ql f +or +.Ql p +to indicate the following or preceding month of that number, +respectively. .It Fl o -Display date of orthodox easter (Greek and Russian +Display date of Orthodox Easter (Greek and Russian Orthodox Churches). .It Fl p Print the country codes and switching days from Julian to Gregorian @@ -99,21 +121,56 @@ Britain and her colonies switched to the Print the number of the week below each week column. .It Fl y Display a calendar for the specified year. +.It Fl 3 +Display the previous, current and next month surrounding today. +.It Fl A Ar number +Display the +.Ar number +of months after the current month. +.It Fl B Ar number +Display the +.Ar number +of months before the current month. +.It Fl C +Switch to +.Nm cal +mode. +.It Fl N +Switch to +.Nm ncal +mode. +.It Fl d Ar yyyy-mm +Use +.Ar yyyy-mm +as the current date (for debugging of date selection). +.It Fl H Ar yyyy-mm-dd +Use +.Ar yyyy-mm-dd +as the current date (for debugging of highlighting). .El .Pp -A single parameter specifies the year (1 - 9999) to be displayed; +A single parameter specifies the year (1\(en9999) to be displayed; note the year must be fully specified: .Dq Li cal 89 will .Em not -display a calendar for 1989. -Two parameters denote the month and year; the month is either a number between -1 and 12, or a full or abbreviated name as specified by the current locale. -Month and year default to those of the current system clock and time zone (so +display a calendar for 1989. Two parameters denote the month and +year; the month is either a number between 1 and 12, or a full or +abbreviated name as specified by the current locale. Month and +year default to those of the current system clock and time zone (so .Dq Li cal -m 8 -will display a calendar for the month of August in the current year). +will display a calendar for the month of August in the current +year). +.Pp +Not all options can be used together. For example +.Dq Li -3 -A 2 -B 3 -y -m 7 +would mean: +show me the three months around the seventh month, three before +that, two after that and the whole year. +.Nm ncal +will warn about these combinations. .Pp -A year starts on Jan 1. +A year starts on January 1. .Sh SEE ALSO .Xr calendar 3 , .Xr strftime 3 @@ -132,5 +189,8 @@ The command and manual were written by .An Wolfgang Helbig Aq helbig@FreeBSD.org . .Sh BUGS -The assignment of Julian\(emGregorian switching dates to -country codes is historically naive for many countries. +The assignment of Julian\(enGregorian switching dates to country +codes is historically naive for many countries. +.Pp +Not all options are compatible and using them in different orders +will give varying results. Modified: stable/7/usr.bin/ncal/ncal.c ============================================================================== --- stable/7/usr.bin/ncal/ncal.c Sun Oct 17 03:13:30 2010 (r213944) +++ stable/7/usr.bin/ncal/ncal.c Sun Oct 17 07:11:40 2010 (r213945) @@ -33,6 +33,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -42,15 +43,17 @@ static const char rcsid[] = #include #include #include +#include +#undef lines /* term.h defines this */ -/* Width of one month with backward compatibility */ +/* Width of one month with backward compatibility and in regular mode*/ #define MONTH_WIDTH_B_J 27 #define MONTH_WIDTH_B 20 -#define MONTH_WIDTH_J 24 -#define MONTH_WIDTH 18 +#define MONTH_WIDTH_R_J 24 +#define MONTH_WIDTH_R 18 -#define MAX_WIDTH 28 +#define MAX_WIDTH 64 typedef struct date date; @@ -58,6 +61,7 @@ struct monthlines { wchar_t name[MAX_WIDTH + 1]; char lines[7][MAX_WIDTH + 1]; char weeks[MAX_WIDTH + 1]; + unsigned int extralen[7]; }; struct weekdays { @@ -156,29 +160,29 @@ char jdaystr[] = " 1 2 3 4 " 350 351 352 353 354 355 356 357 358 359" " 360 361 362 363 364 365 366"; +int flag_nohighlight; /* user doesn't want a highlighted today */ int flag_weeks; /* user wants number of week */ int nswitch; /* user defined switch date */ int nswitchb; /* switch date for backward compatibility */ +int highlightdate; -char *center(char *s, char *t, int w); +char *center(char *s, char *t, int w); wchar_t *wcenter(wchar_t *s, wchar_t *t, int w); -void mkmonth(int year, int month, int jd_flag, struct monthlines * monthl); -void mkmonthb(int year, int month, int jd_flag, struct monthlines * monthl); -void mkweekdays(struct weekdays * wds); -int parsemonth(const char *s); -void printcc(void); -void printeaster(int year, int julian, int orthodox); -void printmonth(int year, int month, int jd_flag); -void printmonthb(int year, int month, int jd_flag); -void printyear(int year, int jd_flag); -void printyearb(int year, int jd_flag); int firstday(int y, int m); -date *sdate(int ndays, struct date * d); -date *sdateb(int ndays, struct date * d); -int sndays(struct date * d); -int sndaysb(struct date * d); -static void usage(void); -int weekdayb(int nd); +void highlight(char *dst, char *src, int len, int *extraletters); +void mkmonthr(int year, int month, int jd_flag, struct monthlines * monthl); +void mkmonthb(int year, int month, int jd_flag, struct monthlines * monthl); +void mkweekdays(struct weekdays * wds); +void monthranger(int year, int m, int jd_flag, int before, int after); +void monthrangeb(int year, int m, int jd_flag, int before, int after); +int parsemonth(const char *s, int *m, int *y); +void printcc(void); +void printeaster(int year, int julian, int orthodox); +date *sdater(int ndays, struct date * d); +date *sdateb(int ndays, struct date * d); +int sndaysr(struct date * d); +int sndaysb(struct date * d); +static void usage(void); int main(int argc, char *argv[]) @@ -186,20 +190,32 @@ main(int argc, char *argv[]) struct djswitch *p, *q; /* to search user defined switch date */ date never = {10000, 1, 1}; /* outside valid range of dates */ date ukswitch = {1752, 9, 2};/* switch date for Great Britain */ + date dt; int ch; /* holds the option character */ int m = 0; /* month */ int y = 0; /* year */ int flag_backward = 0; /* user called cal--backward compat. */ - int flag_hole_year = 0; /* user wants the whole year */ + int flag_wholeyear = 0; /* user wants the whole year */ int flag_julian_cal = 0; /* user wants Julian Calendar */ - int flag_julian_day = 0; /* user wants the Julian day - * numbers */ - int flag_orthodox = 0; /* use wants Orthodox easter */ - int flag_easter = 0; /* use wants easter date */ + int flag_julian_day = 0; /* user wants the Julian day numbers */ + int flag_orthodox = 0; /* user wants Orthodox easter */ + int flag_easter = 0; /* user wants easter date */ + int flag_3months = 0; /* user wants 3 month display (-3) */ + int flag_after = 0; /* user wants to see months after */ + int flag_before = 0; /* user wants to see months before */ + int flag_specifiedmonth = 0;/* user wants to see this month (-m) */ + int flag_givenmonth = 0; /* user has specified month [n] */ + int flag_givenyear = 0; /* user has specified year [n] */ char *cp; /* character pointer */ + char *flag_today = NULL; /* debug: use date as being today */ char *flag_month = NULL; /* requested month as string */ + char *flag_highlightdate = NULL; /* debug: date to highlight */ + int before, after; const char *locale; /* locale to get country code */ + flag_nohighlight = 0; + flag_weeks = 0; + /* * Use locale to determine the country code, * and use the country code to determine the default @@ -230,23 +246,57 @@ main(int argc, char *argv[]) * Get the filename portion of argv[0] and set flag_backward if * this program is called "cal". */ - cp = strrchr(argv[0], '/'); - cp = (cp == NULL) ? argv[0] : cp + 1; - if (strcmp("cal", cp) == 0) + if (strncmp(basename(argv[0]), "cal", strlen("cal")) == 0) flag_backward = 1; /* Set the switch date to United Kingdom if backwards compatible */ if (flag_backward) nswitchb = ndaysj(&ukswitch); - while ((ch = getopt(argc, argv, "Jejm:ops:wy")) != -1) + before = after = -1; + + while ((ch = getopt(argc, argv, "3A:B:Cd:eH:hjJm:Nops:wy")) != -1) switch (ch) { + case '3': + flag_3months = 1; + break; + case 'A': + if (flag_after > 0) + errx(EX_USAGE, "Double -A specified"); + flag_after = strtol(optarg, NULL, 10); + if (flag_after <= 0) + errx(EX_USAGE, + "Argument to -A must be positive"); + break; + case 'B': + if (flag_before > 0) + errx(EX_USAGE, "Double -A specified"); + flag_before = strtol(optarg, NULL, 10); + if (flag_before <= 0) + errx(EX_USAGE, + "Argument to -B must be positive"); + break; case 'J': if (flag_backward) usage(); nswitch = ndaysj(&never); flag_julian_cal = 1; break; + case 'C': + flag_backward = 1; + break; + case 'N': + flag_backward = 0; + break; + case 'd': + flag_today = optarg; + break; + case 'H': + flag_highlightdate = optarg; + break; + case 'h': + flag_nohighlight = 1; + break; case 'e': if (flag_backward) usage(); @@ -256,7 +306,10 @@ main(int argc, char *argv[]) flag_julian_day = 1; break; case 'm': + if (flag_specifiedmonth) + errx(EX_USAGE, "Double -m specified"); flag_month = optarg; + flag_specifiedmonth = 1; break; case 'o': if (flag_backward) @@ -289,7 +342,7 @@ main(int argc, char *argv[]) flag_weeks = 1; break; case 'y': - flag_hole_year = 1; + flag_wholeyear = 1; break; default: usage(); @@ -303,14 +356,21 @@ main(int argc, char *argv[]) if (flag_easter) usage(); flag_month = *argv++; + flag_givenmonth = 1; + m = strtol(flag_month, NULL, 10); /* FALLTHROUGH */ case 1: - y = atoi(*argv++); + y = atoi(*argv); if (y < 1 || y > 9999) - errx(EX_USAGE, "year %d not in range 1..9999", y); + errx(EX_USAGE, "year `%s' not in range 1..9999", *argv); + argv++; + flag_givenyear = 1; break; case 0: - { + if (flag_today != NULL) { + y = strtol(flag_today, NULL, 10); + m = strtol(flag_today + 5, NULL, 10); + } else { time_t t; struct tm *tm; @@ -325,26 +385,115 @@ main(int argc, char *argv[]) } if (flag_month != NULL) { - m = parsemonth(flag_month); - if (m < 1 || m > 12) + if (parsemonth(flag_month, &m, &y)) { errx(EX_USAGE, "%s is neither a month number (1..12) nor a name", flag_month); + } + } + + /* + * What is not supported: + * -3 with -A or -B + * -3 displays 3 months, -A and -B change that behaviour. + * -3 with -y + * -3 displays 3 months, -y says display a whole year. + * -3 with a given year but no given month or without -m + * -3 displays 3 months, no month specified doesn't make clear + * which three months. + * -m with a given month + * conflicting arguments, both specify the same field. + * -y with -m + * -y displays the whole year, -m displays a single month. + * -y with a given month + * -y displays the whole year, the given month displays a single + * month. + * -y with -A or -B + * -y displays the whole year, -A and -B display extra months. + */ + + /* -3 together with -A or -B. */ + if (flag_3months && (flag_after || flag_before)) + errx(EX_USAGE, "-3 together with -A and -B is not supported."); + /* -3 together with -y. */ + if (flag_3months && flag_wholeyear) + errx(EX_USAGE, "-3 together with -y is not supported."); + /* -3 together with givenyear but no givenmonth. */ + if (flag_3months && flag_givenyear && + !(flag_givenmonth || flag_specifiedmonth)) + errx(EX_USAGE, + "-3 together with a given year but no given month is " + "not supported."); + /* -m together with xx xxxx. */ + if (flag_specifiedmonth && flag_givenmonth) + errx(EX_USAGE, + "-m together with a given month is not supported."); + /* -y together with -m. */ + if (flag_wholeyear && flag_specifiedmonth) + errx(EX_USAGE, "-y together with -m is not supported."); + /* -y together with xx xxxx. */ + if (flag_wholeyear && flag_givenmonth) + errx(EX_USAGE, "-y together a given month is not supported."); + /* -y together with -A or -B. */ + if (flag_wholeyear && (flag_before > 0 || flag_after > 0)) + errx(EX_USAGE, "-y together a -A or -B is not supported."); + /* The rest should be fine. */ + + /* Select the period to display, in order of increasing priority .*/ + if (flag_wholeyear || + (flag_givenyear && !(flag_givenmonth || flag_specifiedmonth))) { + m = 1; + before = 0; + after = 11; + } + if (flag_givenyear && flag_givenmonth) { + before = 0; + after = 0; + } + if (flag_specifiedmonth) { + before = 0; + after = 0; + } + if (flag_before) { + before = flag_before; + } + if (flag_after) { + after = flag_after; + } + if (flag_3months) { + before = 1; + after = 1; + } + if (after == -1) + after = 0; + if (before == -1) + before = 0; + + /* Highlight a specified day or today .*/ + if (flag_highlightdate != NULL) { + dt.y = strtol(flag_highlightdate, NULL, 10); + dt.m = strtol(flag_highlightdate + 5, NULL, 10); + dt.d = strtol(flag_highlightdate + 8, NULL, 10); + } else { + time_t t; + struct tm *tm1; + + t = time(NULL); + tm1 = localtime(&t); + dt.y = tm1->tm_year + 1900; + dt.m = tm1->tm_mon + 1; + dt.d = tm1->tm_mday; } + highlightdate = sndaysb(&dt); + /* And now we finally start to calculate and output calendars. */ if (flag_easter) printeaster(y, flag_julian_cal, flag_orthodox); - else if (argc == 1 || flag_hole_year) - if (flag_backward) - printyearb(y, flag_julian_day); - else - printyear(y, flag_julian_day); else if (flag_backward) - printmonthb(y, m, flag_julian_day); + monthrangeb(y, m, flag_julian_day, before, after); else - printmonth(y, m, flag_julian_day); - + monthranger(y, m, flag_julian_day, before, after); return (0); } @@ -353,14 +502,17 @@ usage(void) { fputs( - "usage: cal [-jy] [[month] year]\n" - " cal [-j] [-m month] [year]\n" - " ncal [-Jjpwy] [-s country_code] [[month] year]\n" - " ncal [-Jeo] [year]\n", stderr); +"Usage: cal [general options] [-hjy] [[month] year]\n" +" cal [general options] [-hj] [-m month] [year]\n" +" ncal [general options] [-hJjpwy] [-s country_code] [[month] year]\n" +" ncal [general options] [-hJeo] [year]\n" +"General options: [-NC3] [-A months] [-B months]\n" +"For debug the highlighting: [-H yyyy-mm-dd] [-d yyyy-mm]\n", + stderr); exit(EX_USAGE); } -/* print the assumed switches for all countries */ +/* Print the assumed switches for all countries. */ void printcc(void) { @@ -381,13 +533,13 @@ printcc(void) printf(FSTR"\n", FSTRARG(p)); } -/* print the date of easter sunday */ +/* Print the date of easter sunday. */ void printeaster(int y, int julian, int orthodox) { date dt; struct tm tm; - char buf[80]; + char buf[MAX_WIDTH]; static int d_first = -1; if (d_first < 0) @@ -412,183 +564,201 @@ printeaster(int y, int julian, int ortho printf("%s\n", buf); } -void -printmonth(int y, int m, int jd_flag) -{ - struct monthlines month; - struct weekdays wds; - int i, len; - - mkmonth(y, m - 1, jd_flag, &month); - mkweekdays(&wds); - printf(" %ls %d\n", month.name, y); - for (i = 0; i != 7; i++) { - len = wcslen(wds.names[i]); - if (wcswidth(wds.names[i], len) == len) - wprintf(L"%.2ls%s\n", wds.names[i], month.lines[i]); - else - wprintf(L"%.1ls%s\n", wds.names[i], month.lines[i]); - } - if (flag_weeks) - printf(" %s\n", month.weeks); -} - -void -printmonthb(int y, int m, int jd_flag) -{ - struct monthlines month; - struct weekdays wds; - wchar_t s[MAX_WIDTH], t[MAX_WIDTH]; - int i; - int mw; - - mkmonthb(y, m - 1, jd_flag, &month); - mkweekdays(&wds); - - mw = jd_flag ? MONTH_WIDTH_B_J : MONTH_WIDTH_B; - - swprintf(s, MAX_WIDTH, L"%ls %d", month.name, y); - wprintf(L"%ls\n", wcenter(t, s, mw)); - - if (jd_flag) - wprintf(L" %ls %ls %ls %ls %ls %ls %.2ls\n", - wds.names[6], wds.names[0], - wds.names[1], wds.names[2], wds.names[3], - wds.names[4], wds.names[5]); - else - wprintf(L"%ls%ls%ls%ls%ls%ls%.2ls\n", wds.names[6], - wds.names[0], wds.names[1], wds.names[2], wds.names[3], - wds.names[4], wds.names[5]); - - for (i = 0; i != 6; i++) - printf("%s\n", month.lines[i]+1); -} +#define MW(mw, me) ((mw) + me) +#define DECREASEMONTH(m, y) \ + if (--m == 0) { \ + m = 12; \ + y--; \ + } +#define INCREASEMONTH(m, y) \ + if (++(m) == 13) { \ + (m) = 1; \ + (y)++; \ + } +#define M2Y(m) ((m) / 12) +#define M2M(m) (1 + (m) % 12) +/* Print all months for the period in the range [ before .. y-m .. after ]. */ void -printyear(int y, int jd_flag) +monthrangeb(int y, int m, int jd_flag, int before, int after) { struct monthlines year[12]; struct weekdays wds; - char s[80], t[80]; + char s[MAX_WIDTH], t[MAX_WIDTH]; + wchar_t ws[MAX_WIDTH], ws1[MAX_WIDTH]; + const char *wdss; int i, j; int mpl; int mw; + int m1, m2; + int printyearheader; + int prevyear = -1; + + mpl = jd_flag ? 2 : 3; + mw = jd_flag ? MONTH_WIDTH_B_J : MONTH_WIDTH_B; + wdss = (mpl == 2) ? " " : ""; + + while (before != 0) { + DECREASEMONTH(m, y); + before--; + after++; + } + m1 = y * 12 + m - 1; + m2 = m1 + after; - for (i = 0; i != 12; i++) - mkmonth(y, i, jd_flag, year + i); mkweekdays(&wds); - mpl = jd_flag ? 3 : 4; - mw = jd_flag ? MONTH_WIDTH_J : MONTH_WIDTH; - sprintf(s, "%d", y); - printf("%s\n", center(t, s, mpl * mw)); + /* + * The year header is printed when there are more than 'mpl' months + * and if the first month is a multitude of 'mpl'. + * If not, it will print the year behind every month. + */ + printyearheader = (after >= mpl - 1) && (M2M(m1) - 1) % mpl == 0; - for (j = 0; j != 12; j += mpl) { - wprintf(L" %-*ls%-*ls", - mw, year[j].name, - mw, year[j + 1].name); - if (mpl == 3) - printf("%ls\n", year[j + 2].name); - else - wprintf(L"%-*ls%ls\n", - mw, year[j + 2].name, - year[j + 3].name); - for (i = 0; i != 7; i++) { - wprintf(L"%.2ls%-*s%-*s", - wds.names[i], - mw, year[j].lines[i], - mw, year[j + 1].lines[i]); - if (mpl == 3) - printf("%s\n", year[j + 2].lines[i]); - else - printf("%-*s%s\n", - mw, year[j + 2].lines[i], - year[j + 3].lines[i]); + m = m1; + while (m <= m2) { + int count = 0; + for (i = 0; i != mpl && m + i <= m2; i++) { + mkmonthb(M2Y(m + i), M2M(m + i) - 1, jd_flag, year + i); + count++; } - if (flag_weeks) { - if (mpl == 3) - printf(" %-*s%-*s%-s\n", - mw, year[j].weeks, - mw, year[j + 1].weeks, - year[j + 2].weeks); - else - printf(" %-*s%-*s%-*s%-s\n", - mw, year[j].weeks, - mw, year[j + 1].weeks, - mw, year[j + 2].weeks, - year[j + 3].weeks); + + /* Empty line between two rows of months */ + if (m != m1) + printf("\n"); + + /* Year at the top. */ + if (printyearheader && M2Y(m) != prevyear) { + sprintf(s, "%d", M2Y(m)); + printf("%s\n", center(t, s, mpl * mw)); + prevyear = M2Y(m); + } + + /* Month names. */ + for (i = 0; i < count; i++) + if (printyearheader) + wprintf(L"%-*ls ", + mw, wcenter(ws, year[i].name, mw)); + else { + swprintf(ws, sizeof(ws), L"%-ls %d", + year[i].name, M2Y(m + i)); + wprintf(L"%-*ls ", mw, wcenter(ws1, ws, mw)); + } + printf("\n"); + + /* Day of the week names. */ + for (i = 0; i < count; i++) { + wprintf(L"%s%ls%s%ls%s%ls%s%ls%s%ls%s%ls%s%ls ", + wdss, wds.names[6], wdss, wds.names[0], + wdss, wds.names[1], wdss, wds.names[2], + wdss, wds.names[3], wdss, wds.names[4], + wdss, wds.names[5]); + } + printf("\n"); + + /* And the days of the month. */ + for (i = 0; i != 6; i++) { + for (j = 0; j < count; j++) + printf("%-*s ", + MW(mw, year[j].extralen[i]), + year[j].lines[i]+1); + printf("\n"); } + + m += mpl; } } void -printyearb(int y, int jd_flag) +monthranger(int y, int m, int jd_flag, int before, int after) { struct monthlines year[12]; struct weekdays wds; - char s[80], t[80]; - wchar_t ws[80], wt[80]; + char s[MAX_WIDTH], t[MAX_WIDTH]; int i, j; int mpl; int mw; + int m1, m2; + int prevyear = -1; + int printyearheader; + + mpl = jd_flag ? 3 : 4; + mw = jd_flag ? MONTH_WIDTH_R_J : MONTH_WIDTH_R; + + while (before != 0) { + DECREASEMONTH(m, y); + before--; + after++; + } + m1 = y * 12 + m - 1; + m2 = m1 + after; - for (i = 0; i != 12; i++) - mkmonthb(y, i, jd_flag, year + i); mkweekdays(&wds); - mpl = jd_flag ? 2 : 3; - mw = jd_flag ? MONTH_WIDTH_B_J : MONTH_WIDTH_B; - sprintf(s, "%d", y); - printf("%s\n\n", center(t, s, mw * mpl + mpl)); + /* + * The year header is printed when there are more than 'mpl' months + * and if the first month is a multitude of 'mpl'. + * If not, it will print the year behind every month. + */ + printyearheader = (after >= mpl - 1) && (M2M(m1) - 1) % mpl == 0; - for (j = 0; j != 12; j += mpl) { - wprintf(L"%-*ls ", mw, wcenter(ws, year[j].name, mw)); - if (mpl == 2) - printf("%ls\n", wcenter(ws, year[j + 1].name, mw)); - else - wprintf(L"%-*ls %ls\n", mw, - wcenter(ws, year[j + 1].name, mw), - wcenter(wt, year[j + 2].name, mw)); - - if (mpl == 2) - wprintf(L" %ls %ls %ls %ls %ls %ls %ls " - " %ls %ls %ls %ls %ls %ls %.2ls\n", - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5], - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5]); - else - wprintf(L"%ls%ls%ls%ls%ls%ls%ls " - "%ls%ls%ls%ls%ls%ls%ls " - "%ls%ls%ls%ls%ls%ls%.2ls\n", - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5], - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5], - wds.names[6], wds.names[0], wds.names[1], - wds.names[2], wds.names[3], wds.names[4], - wds.names[5]); - for (i = 0; i != 6; i++) { - if (mpl == 2) - printf("%-*s %s\n", - mw, year[j].lines[i]+1, - year[j + 1].lines[i]+1); + m = m1; + while (m <= m2) { + int count = 0; + for (i = 0; i != mpl && m + i <= m2; i++) { + mkmonthr(M2Y(m + i), M2M(m + i) - 1, jd_flag, year + i); + count++; + } + + /* Empty line between two rows of months. */ + if (m != m1) + printf("\n"); + + /* Year at the top. */ + if (printyearheader && M2Y(m) != prevyear) { + sprintf(s, "%d", M2Y(m)); + printf("%s\n", center(t, s, mpl * mw)); + prevyear = M2Y(m); + } + + /* Month names. */ + wprintf(L" "); + for (i = 0; i < count; i++) + if (printyearheader) + wprintf(L"%-*ls", mw, year[i].name); else - printf("%-*s %-*s %s\n", - mw, year[j].lines[i]+1, - mw, year[j + 1].lines[i]+1, - year[j + 2].lines[i]+1); + wprintf(L"%-ls %-*d", year[i].name, + mw - wcslen(year[i].name) - 1, M2Y(m + i)); + printf("\n"); + + /* And the days of the month. */ + for (i = 0; i != 7; i++) { + /* Week day */ + wprintf(L"%.2ls", wds.names[i]); + /* Full months */ + for (j = 0; j < count; j++) + printf("%-*s", + MW(mw, year[j].extralen[i]), + year[j].lines[i]); + printf("\n"); + } + + /* Week numbers. */ + if (flag_weeks) { + printf(" "); + for (i = 0; i < count; i++) + printf("%-*s", mw, year[i].weeks); + printf("\n"); } + + m += mpl; } + return; } void -mkmonth(int y, int m, int jd_flag, struct monthlines *mlines) +mkmonthr(int y, int m, int jd_flag, struct monthlines *mlines) { struct tm tm; /* for strftime printing local names of @@ -597,7 +767,7 @@ mkmonth(int y, int m, int jd_flag, struc int dw; /* width of numbers */ int first; /* first day of month */ int firstm; /* first day of first week of month */ - int i, j, k; /* just indices */ + int i, j, k, l; /* just indices */ int last; /* the first day of next month */ int jan1 = 0; /* the first day of this year */ char *ds; /* pointer to day strings (daystr or @@ -630,7 +800,7 @@ mkmonth(int y, int m, int jd_flag, struc */ firstm = first - weekday(first); - /* Set ds (daystring) and dw (daywidth) according to the jd_flag */ + /* Set ds (daystring) and dw (daywidth) according to the jd_flag. */ if (jd_flag) { ds = jdaystr; dw = 4; @@ -645,21 +815,27 @@ mkmonth(int y, int m, int jd_flag, struc * column is one day number. print column index: k. */ for (i = 0; i != 7; i++) { - for (j = firstm + i, k = 0; j < last; j += 7, k += dw) + l = 0; + for (j = firstm + i, k = 0; j < last; j += 7, k += dw) { if (j >= first) { if (jd_flag) dt.d = j - jan1 + 1; else - sdate(j, &dt); - memcpy(mlines->lines[i] + k, - ds + dt.d * dw, dw); + sdater(j, &dt); + if (j == highlightdate && !flag_nohighlight) + highlight(mlines->lines[i] + k, + ds + dt.d * dw, dw, &l); + else + memcpy(mlines->lines[i] + k + l, + ds + dt.d * dw, dw); } else - memcpy(mlines->lines[i] + k, " ", dw); - mlines->lines[i][k] = '\0'; - + memcpy(mlines->lines[i] + k + l, " ", dw); + } + mlines->lines[i][k + l] = '\0'; + mlines->extralen[i] = l; } - /* fill the weeknumbers */ + /* fill the weeknumbers. */ if (flag_weeks) { for (j = firstm, k = 0; j < last; k += dw, j += 7) if (j <= nswitch) @@ -681,7 +857,7 @@ mkmonthb(int y, int m, int jd_flag, stru int dw; /* width of numbers */ int first; /* first day of month */ int firsts; /* sunday of first week of month */ - int i, j, k; /* just indices */ + int i, j, k, l; /* just indices */ int jan1 = 0; /* the first day of this year */ int last; /* the first day of next month */ char *ds; /* pointer to day strings (daystr or @@ -696,7 +872,7 @@ mkmonthb(int y, int m, int jd_flag, stru dw = 3; } - /* Set name of month centered */ + /* Set name of month centered. */ memset(&tm, 0, sizeof(tm)); tm.tm_mon = m; wcsftime(mlines->name, sizeof(mlines->name) / sizeof(mlines->name[0]), @@ -742,25 +918,32 @@ mkmonthb(int y, int m, int jd_flag, stru * column is one day number. print column index: k. */ for (i = 0; i != 6; i++) { + l = 0; for (j = firsts + 7 * i, k = 0; j < last && k != dw * 7; - j++, k += dw) + j++, k += dw) { if (j >= first) { if (jd_flag) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 08:44:34 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E739E1065670; Sun, 17 Oct 2010 08:44:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D52528FC08; Sun, 17 Oct 2010 08:44:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9H8iYuN010828; Sun, 17 Oct 2010 08:44:34 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9H8iYXF010826; Sun, 17 Oct 2010 08:44:34 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201010170844.o9H8iYXF010826@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Oct 2010 08:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213946 - stable/7/sys/netipsec X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 08:44:35 -0000 Author: bz Date: Sun Oct 17 08:44:34 2010 New Revision: 213946 URL: http://svn.freebsd.org/changeset/base/213946 Log: MFC r213837: Remove dead code: assignment to a local variable not used anywhere after that. Modified: stable/7/sys/netipsec/ipsec_output.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netipsec/ipsec_output.c ============================================================================== --- stable/7/sys/netipsec/ipsec_output.c Sun Oct 17 07:11:40 2010 (r213945) +++ stable/7/sys/netipsec/ipsec_output.c Sun Oct 17 08:44:34 2010 (r213946) @@ -797,10 +797,8 @@ ipsec6_output_tunnel(struct ipsec_output } /* adjust state->dst if tunnel endpoint is offlink */ - if (state->ro->ro_rt->rt_flags & RTF_GATEWAY) { + if (state->ro->ro_rt->rt_flags & RTF_GATEWAY) state->dst = (struct sockaddr *)state->ro->ro_rt->rt_gateway; - dst6 = (struct sockaddr_in6 *)state->dst; - } } m = ipsec6_splithdr(m); From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 11:52:00 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EE101065746; Sun, 17 Oct 2010 11:51:59 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8D58FC08; Sun, 17 Oct 2010 11:51:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HBpxTN028695; Sun, 17 Oct 2010 11:51:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HBpxPB028693; Sun, 17 Oct 2010 11:51:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171151.o9HBpxPB028693@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 11:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213953 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 11:52:00 -0000 Author: marius Date: Sun Oct 17 11:51:59 2010 New Revision: 213953 URL: http://svn.freebsd.org/changeset/base/213953 Log: MFC: r213873 Explicitly lower the PIL to 0 as part of enabling interrupts, similar to what is done on other platforms. Unlike as with the sched_throw(NULL) called on BSPs during their startup apparently there's nothing which will reliably lower it on APs. I'm unsure why this only came up on V215 though, breaking these with r207248. My best guess is that these are the only supported ones so far fast enough to lose some race. PR: 151404 Modified: stable/7/sys/sparc64/sparc64/machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/machdep.c Sun Oct 17 11:51:55 2010 (r213952) +++ stable/7/sys/sparc64/sparc64/machdep.c Sun Oct 17 11:51:59 2010 (r213953) @@ -579,6 +579,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * enable them. */ intr_init2(); + wrpr(pil, 0, 0); wrpr(pstate, 0, PSTATE_KERNEL); /* From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 12:05:40 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8C081065778; Sun, 17 Oct 2010 12:05:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9748FC1B; Sun, 17 Oct 2010 12:05:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HC5elx029159; Sun, 17 Oct 2010 12:05:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HC5ejb029157; Sun, 17 Oct 2010 12:05:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171205.o9HC5ejb029157@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213955 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 12:05:40 -0000 Author: marius Date: Sun Oct 17 12:05:39 2010 New Revision: 213955 URL: http://svn.freebsd.org/changeset/base/213955 Log: MFC: r213104 minor simplifications and cosmetics Modified: stable/7/sys/sparc64/sparc64/elf_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/elf_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/elf_machdep.c Sun Oct 17 12:05:37 2010 (r213954) +++ stable/7/sys/sparc64/sparc64/elf_machdep.c Sun Oct 17 12:05:39 2010 (r213955) @@ -127,8 +127,8 @@ void elf64_dump_thread(struct thread *td __unused, void *dst __unused, size_t *off __unused) { -} +} /* * The following table holds for each relocation type: @@ -213,7 +213,7 @@ static const int reloc_target_flags[] = }; #if 0 -static const char *reloc_names[] = { +static const char *const reloc_names[] = { "NONE", "RELOC_8", "RELOC_16", "RELOC_32", "DISP_8", "DISP_16", "DISP_32", "WDISP_30", "WDISP_22", "HI22", "22", "13", "LO10", "GOT10", "GOT13", @@ -268,10 +268,9 @@ static const long reloc_target_bitmask[] int elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, - int type, elf_lookup_fn lookup) + int type, elf_lookup_fn lookup __unused) { const Elf_Rela *rela; - Elf_Addr value; Elf_Addr *where; if (type != ELF_RELOC_RELA) @@ -281,10 +280,8 @@ elf_reloc_local(linker_file_t lf, Elf_Ad if (ELF64_R_TYPE_ID(rela->r_info) != R_SPARC_RELATIVE) return (-1); - value = rela->r_addend + (Elf_Addr)lf->address; - where = (Elf_Addr *)((Elf_Addr)lf->address + rela->r_offset); - - *where = value; + where = (Elf_Addr *)(relocbase + rela->r_offset); + *where = rela->r_addend + relocbase; return (0); } From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 12:11:44 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 603691065670; Sun, 17 Oct 2010 12:11:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A3A18FC28; Sun, 17 Oct 2010 12:11:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HCBibD029471; Sun, 17 Oct 2010 12:11:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCBhOk029442; Sun, 17 Oct 2010 12:11:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171211.o9HCBhOk029442@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213957 - in stable/7/sys: amd64/include dev/hme dev/le dev/mii i386/include ia64/include powerpc/include sparc64/include sparc64/sbus sun4v/include sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 12:11:44 -0000 Author: marius Date: Sun Oct 17 12:11:43 2010 New Revision: 213957 URL: http://svn.freebsd.org/changeset/base/213957 Log: MFC: r204646 The NetBSD Foundation has granted permission to remove clause 3 and 4 from the software. Obtained from: NetBSD Modified: stable/7/sys/amd64/include/_inttypes.h stable/7/sys/dev/hme/if_hme_sbus.c stable/7/sys/dev/hme/if_hmereg.h stable/7/sys/dev/hme/if_hmevar.h stable/7/sys/dev/le/am79900var.h stable/7/sys/dev/le/am7990var.h stable/7/sys/dev/le/if_le_ledma.c stable/7/sys/dev/le/lancevar.h stable/7/sys/dev/mii/bmtphyreg.h stable/7/sys/dev/mii/icsphyreg.h stable/7/sys/dev/mii/lxtphyreg.h stable/7/sys/dev/mii/mii.c stable/7/sys/dev/mii/mii_physubr.c stable/7/sys/dev/mii/miidevs stable/7/sys/dev/mii/miivar.h stable/7/sys/dev/mii/nsphyreg.h stable/7/sys/dev/mii/nsphyterreg.h stable/7/sys/dev/mii/qsphyreg.h stable/7/sys/dev/mii/ukphy_subr.c stable/7/sys/i386/include/_inttypes.h stable/7/sys/ia64/include/_inttypes.h stable/7/sys/powerpc/include/_inttypes.h stable/7/sys/sparc64/include/_inttypes.h stable/7/sys/sparc64/sbus/lsi64854reg.h stable/7/sys/sparc64/sbus/lsi64854var.h stable/7/sys/sparc64/sbus/ofw_sbus.h stable/7/sys/sun4v/include/_inttypes.h stable/7/sys/sys/clock.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/include/_inttypes.h ============================================================================== --- stable/7/sys/amd64/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/amd64/include/_inttypes.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/hme/if_hme_sbus.c ============================================================================== --- stable/7/sys/dev/hme/if_hme_sbus.c Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/hme/if_hme_sbus.c Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/hme/if_hmereg.h ============================================================================== --- stable/7/sys/dev/hme/if_hmereg.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/hme/if_hmereg.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/hme/if_hmevar.h ============================================================================== --- stable/7/sys/dev/hme/if_hmevar.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/hme/if_hmevar.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/le/am79900var.h ============================================================================== --- stable/7/sys/dev/le/am79900var.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/le/am79900var.h Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/le/am7990var.h ============================================================================== --- stable/7/sys/dev/le/am7990var.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/le/am7990var.h Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/le/if_le_ledma.c ============================================================================== --- stable/7/sys/dev/le/if_le_ledma.c Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/le/if_le_ledma.c Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/le/lancevar.h ============================================================================== --- stable/7/sys/dev/le/lancevar.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/le/lancevar.h Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/bmtphyreg.h ============================================================================== --- stable/7/sys/dev/mii/bmtphyreg.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/bmtphyreg.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/icsphyreg.h ============================================================================== --- stable/7/sys/dev/mii/icsphyreg.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/icsphyreg.h Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/lxtphyreg.h ============================================================================== --- stable/7/sys/dev/mii/lxtphyreg.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/lxtphyreg.h Sun Oct 17 12:11:43 2010 (r213957) @@ -18,13 +18,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/mii.c ============================================================================== --- stable/7/sys/dev/mii/mii.c Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/mii.c Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/mii_physubr.c ============================================================================== --- stable/7/sys/dev/mii/mii_physubr.c Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/mii_physubr.c Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/miidevs Sun Oct 17 12:11:43 2010 (r213957) @@ -17,13 +17,6 @@ $FreeBSD$ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/miivar.h ============================================================================== --- stable/7/sys/dev/mii/miivar.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/miivar.h Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/nsphyreg.h ============================================================================== --- stable/7/sys/dev/mii/nsphyreg.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/nsphyreg.h Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/nsphyterreg.h ============================================================================== --- stable/7/sys/dev/mii/nsphyterreg.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/nsphyterreg.h Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/qsphyreg.h ============================================================================== --- stable/7/sys/dev/mii/qsphyreg.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/qsphyreg.h Sun Oct 17 12:11:43 2010 (r213957) @@ -18,13 +18,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/dev/mii/ukphy_subr.c ============================================================================== --- stable/7/sys/dev/mii/ukphy_subr.c Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/dev/mii/ukphy_subr.c Sun Oct 17 12:11:43 2010 (r213957) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/i386/include/_inttypes.h ============================================================================== --- stable/7/sys/i386/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/i386/include/_inttypes.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/ia64/include/_inttypes.h ============================================================================== --- stable/7/sys/ia64/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/ia64/include/_inttypes.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/powerpc/include/_inttypes.h ============================================================================== --- stable/7/sys/powerpc/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/powerpc/include/_inttypes.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/sparc64/include/_inttypes.h ============================================================================== --- stable/7/sys/sparc64/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/sparc64/include/_inttypes.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/sparc64/sbus/lsi64854reg.h ============================================================================== --- stable/7/sys/sparc64/sbus/lsi64854reg.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/sparc64/sbus/lsi64854reg.h Sun Oct 17 12:11:43 2010 (r213957) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/sparc64/sbus/lsi64854var.h ============================================================================== --- stable/7/sys/sparc64/sbus/lsi64854var.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/sparc64/sbus/lsi64854var.h Sun Oct 17 12:11:43 2010 (r213957) @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/sparc64/sbus/ofw_sbus.h ============================================================================== --- stable/7/sys/sparc64/sbus/ofw_sbus.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/sparc64/sbus/ofw_sbus.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/sun4v/include/_inttypes.h ============================================================================== --- stable/7/sys/sun4v/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/sun4v/include/_inttypes.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/7/sys/sys/clock.h ============================================================================== --- stable/7/sys/sys/clock.h Sun Oct 17 12:11:42 2010 (r213956) +++ stable/7/sys/sys/clock.h Sun Oct 17 12:11:43 2010 (r213957) @@ -13,13 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 12:16:40 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43F4C1065769; Sun, 17 Oct 2010 12:16:39 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FC988FC08; Sun, 17 Oct 2010 12:16:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HCGd0G029725; Sun, 17 Oct 2010 12:16:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCGcfn029711; Sun, 17 Oct 2010 12:16:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171216.o9HCGcfn029711@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213959 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 12:16:40 -0000 Author: marius Date: Sun Oct 17 12:16:38 2010 New Revision: 213959 URL: http://svn.freebsd.org/changeset/base/213959 Log: MFC: r213188 - Remove clause 3 and 4 from TNF licenses. - Remove closes 3 & 4 from Manuel Bouyer's license. Obtained from: NetBSD Modified: stable/7/sys/dev/mii/acphy.c stable/7/sys/dev/mii/bmtphy.c stable/7/sys/dev/mii/exphy.c stable/7/sys/dev/mii/gentbi.c stable/7/sys/dev/mii/icsphy.c stable/7/sys/dev/mii/lxtphy.c stable/7/sys/dev/mii/mii.h stable/7/sys/dev/mii/nsphy.c stable/7/sys/dev/mii/nsphyter.c stable/7/sys/dev/mii/qsphy.c stable/7/sys/dev/mii/tlphy.c stable/7/sys/dev/mii/tlphyreg.h stable/7/sys/dev/mii/ukphy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/acphy.c ============================================================================== --- stable/7/sys/dev/mii/acphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/acphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -46,11 +39,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/bmtphy.c ============================================================================== --- stable/7/sys/dev/mii/bmtphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/bmtphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -14,13 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -46,11 +39,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/exphy.c ============================================================================== --- stable/7/sys/dev/mii/exphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/exphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -48,11 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/gentbi.c ============================================================================== --- stable/7/sys/dev/mii/gentbi.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/gentbi.c Sun Oct 17 12:16:38 2010 (r213959) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -48,11 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/icsphy.c ============================================================================== --- stable/7/sys/dev/mii/icsphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/icsphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -48,11 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/lxtphy.c ============================================================================== --- stable/7/sys/dev/mii/lxtphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/lxtphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -49,11 +42,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/mii.h ============================================================================== --- stable/7/sys/dev/mii/mii.h Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/mii.h Sun Oct 17 12:16:38 2010 (r213959) @@ -14,11 +14,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/nsphy.c ============================================================================== --- stable/7/sys/dev/mii/nsphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/nsphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -48,11 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/nsphyter.c ============================================================================== --- stable/7/sys/dev/mii/nsphyter.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/nsphyter.c Sun Oct 17 12:16:38 2010 (r213959) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -48,11 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/qsphy.c ============================================================================== --- stable/7/sys/dev/mii/qsphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/qsphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -17,13 +17,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -49,11 +42,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/tlphy.c ============================================================================== --- stable/7/sys/dev/mii/tlphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/tlphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -48,11 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/tlphyreg.h ============================================================================== --- stable/7/sys/dev/mii/tlphyreg.h Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/tlphyreg.h Sun Oct 17 12:16:38 2010 (r213959) @@ -11,11 +11,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/7/sys/dev/mii/ukphy.c ============================================================================== --- stable/7/sys/dev/mii/ukphy.c Sun Oct 17 12:16:36 2010 (r213958) +++ stable/7/sys/dev/mii/ukphy.c Sun Oct 17 12:16:38 2010 (r213959) @@ -16,13 +16,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -48,11 +41,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 12:30:05 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA418106576A; Sun, 17 Oct 2010 12:30:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 402788FC13; Sun, 17 Oct 2010 12:30:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HCU2Cu030273; Sun, 17 Oct 2010 12:30:02 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCU1KZ030241; Sun, 17 Oct 2010 12:30:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171230.o9HCU1KZ030241@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213961 - in stable/7/sys/dev: dc mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 12:30:06 -0000 Author: marius Date: Sun Oct 17 12:30:01 2010 New Revision: 213961 URL: http://svn.freebsd.org/changeset/base/213961 Log: MFC: r213229 Use the mii_data provided via mii_attach_args and mii_pdata respectively instead of reaching out for the softc of the parent. Modified: stable/7/sys/dev/dc/dcphy.c stable/7/sys/dev/dc/pnphy.c stable/7/sys/dev/mii/acphy.c stable/7/sys/dev/mii/amphy.c stable/7/sys/dev/mii/atphy.c stable/7/sys/dev/mii/bmtphy.c stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/ciphy.c stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/exphy.c stable/7/sys/dev/mii/gentbi.c stable/7/sys/dev/mii/icsphy.c stable/7/sys/dev/mii/inphy.c stable/7/sys/dev/mii/ip1000phy.c stable/7/sys/dev/mii/jmphy.c stable/7/sys/dev/mii/lxtphy.c stable/7/sys/dev/mii/mii_physubr.c stable/7/sys/dev/mii/mlphy.c stable/7/sys/dev/mii/nsgphy.c stable/7/sys/dev/mii/nsphy.c stable/7/sys/dev/mii/nsphyter.c stable/7/sys/dev/mii/pnaphy.c stable/7/sys/dev/mii/qsphy.c stable/7/sys/dev/mii/rgephy.c stable/7/sys/dev/mii/rlphy.c stable/7/sys/dev/mii/rlswitch.c stable/7/sys/dev/mii/ruephy.c stable/7/sys/dev/mii/tdkphy.c stable/7/sys/dev/mii/truephy.c stable/7/sys/dev/mii/ukphy.c stable/7/sys/dev/mii/xmphy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/dc/dcphy.c ============================================================================== --- stable/7/sys/dev/dc/dcphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/dc/dcphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -146,7 +146,7 @@ dcphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/dc/pnphy.c ============================================================================== --- stable/7/sys/dev/dc/pnphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/dc/pnphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -129,7 +129,7 @@ pnphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/acphy.c ============================================================================== --- stable/7/sys/dev/mii/acphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/acphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -129,7 +129,7 @@ acphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/amphy.c ============================================================================== --- stable/7/sys/dev/mii/amphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/amphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -106,7 +106,7 @@ amphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/atphy.c ============================================================================== --- stable/7/sys/dev/mii/atphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/atphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -110,7 +110,7 @@ atphy_attach(device_t dev) sc = &asc->mii_sc; ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/bmtphy.c ============================================================================== --- stable/7/sys/dev/mii/bmtphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/bmtphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -144,7 +144,7 @@ bmtphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/brgphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -187,7 +187,7 @@ brgphy_attach(device_t dev) sc = &bsc->mii_sc; ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); /* Initialize mii_softc structure */ Modified: stable/7/sys/dev/mii/ciphy.c ============================================================================== --- stable/7/sys/dev/mii/ciphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/ciphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -113,7 +113,7 @@ ciphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/e1000phy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -140,7 +140,7 @@ e1000phy_attach(device_t dev) sc = &esc->mii_sc; ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/exphy.c ============================================================================== --- stable/7/sys/dev/mii/exphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/exphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -135,7 +135,7 @@ exphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; /* * The 3Com PHY can never be isolated, so never allow non-zero Modified: stable/7/sys/dev/mii/gentbi.c ============================================================================== --- stable/7/sys/dev/mii/gentbi.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/gentbi.c Sun Oct 17 12:30:01 2010 (r213961) @@ -158,7 +158,7 @@ gentbi_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); if (bootverbose) Modified: stable/7/sys/dev/mii/icsphy.c ============================================================================== --- stable/7/sys/dev/mii/icsphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/icsphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -138,7 +138,7 @@ icsphy_attach(device_t dev) sc = &isc->mii_sc; ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/inphy.c ============================================================================== --- stable/7/sys/dev/mii/inphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/inphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -104,7 +104,7 @@ inphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/ip1000phy.c ============================================================================== --- stable/7/sys/dev/mii/ip1000phy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/ip1000phy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -111,7 +111,7 @@ ip1000phy_attach(device_t dev) sc = &isc->mii_sc; ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/jmphy.c ============================================================================== --- stable/7/sys/dev/mii/jmphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/jmphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -109,7 +109,7 @@ jmphy_attach(device_t dev) sc = &jsc->mii_sc; ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/lxtphy.c ============================================================================== --- stable/7/sys/dev/mii/lxtphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/lxtphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -132,7 +132,7 @@ lxtphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/mii_physubr.c ============================================================================== --- stable/7/sys/dev/mii/mii_physubr.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/mii_physubr.c Sun Oct 17 12:30:01 2010 (r213961) @@ -326,10 +326,9 @@ mii_anar(int media) void mii_add_media(struct mii_softc *sc) { + struct mii_data *mii = sc->mii_pdata; const char *sep = ""; - struct mii_data *mii; - mii = device_get_softc(sc->mii_dev); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) { printf("no media present"); return; Modified: stable/7/sys/dev/mii/mlphy.c ============================================================================== --- stable/7/sys/dev/mii/mlphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/mlphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -143,7 +143,7 @@ mlphy_attach(dev) sc = &msc->ml_mii; ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/nsgphy.c ============================================================================== --- stable/7/sys/dev/mii/nsgphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/nsgphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -126,7 +126,7 @@ nsgphy_attach(device_t dev) device_printf(dev, "\n", MII_REV(ma->mii_id2)); device_printf(dev, " "); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/nsphy.c ============================================================================== --- stable/7/sys/dev/mii/nsphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/nsphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -130,7 +130,7 @@ nsphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/nsphyter.c ============================================================================== --- stable/7/sys/dev/mii/nsphyter.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/nsphyter.c Sun Oct 17 12:30:01 2010 (r213961) @@ -135,7 +135,7 @@ nsphyter_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/pnaphy.c ============================================================================== --- stable/7/sys/dev/mii/pnaphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/pnaphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -107,7 +107,7 @@ pnaphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/qsphy.c ============================================================================== --- stable/7/sys/dev/mii/qsphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/qsphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -130,7 +130,7 @@ qsphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/rgephy.c ============================================================================== --- stable/7/sys/dev/mii/rgephy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/rgephy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -119,7 +119,7 @@ rgephy_attach(device_t dev) sc = &rsc->mii_sc; ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/rlphy.c ============================================================================== --- stable/7/sys/dev/mii/rlphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/rlphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -129,7 +129,7 @@ rlphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; /* * Check whether we're the RTL8201L PHY and remember so the status Modified: stable/7/sys/dev/mii/rlswitch.c ============================================================================== --- stable/7/sys/dev/mii/rlswitch.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/rlswitch.c Sun Oct 17 12:30:01 2010 (r213961) @@ -117,7 +117,7 @@ rlswitch_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; /* * We handle all pseudo PHY in a single instance, so never allow Modified: stable/7/sys/dev/mii/ruephy.c ============================================================================== --- stable/7/sys/dev/mii/ruephy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/ruephy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -108,7 +108,7 @@ ruephy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; /* * The RealTek PHY can never be isolated, so never allow non-zero Modified: stable/7/sys/dev/mii/tdkphy.c ============================================================================== --- stable/7/sys/dev/mii/tdkphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/tdkphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -108,7 +108,7 @@ tdkphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); if (bootverbose) Modified: stable/7/sys/dev/mii/truephy.c ============================================================================== --- stable/7/sys/dev/mii/truephy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/truephy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -149,7 +149,7 @@ truephy_attach(device_t dev) if (sc->mii_anegticks == 0) sc->mii_anegticks = MII_ANEGTICKS; sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; Modified: stable/7/sys/dev/mii/ukphy.c ============================================================================== --- stable/7/sys/dev/mii/ukphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/ukphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -122,7 +122,7 @@ ukphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); if (bootverbose) Modified: stable/7/sys/dev/mii/xmphy.c ============================================================================== --- stable/7/sys/dev/mii/xmphy.c Sun Oct 17 12:29:57 2010 (r213960) +++ stable/7/sys/dev/mii/xmphy.c Sun Oct 17 12:30:01 2010 (r213961) @@ -107,7 +107,7 @@ xmphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 12:33:16 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D4401065673; Sun, 17 Oct 2010 12:33:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2758FC19; Sun, 17 Oct 2010 12:33:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HCXGIv030469; Sun, 17 Oct 2010 12:33:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCXGid030465; Sun, 17 Oct 2010 12:33:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171233.o9HCXGid030465@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213963 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 12:33:16 -0000 Author: marius Date: Sun Oct 17 12:33:15 2010 New Revision: 213963 URL: http://svn.freebsd.org/changeset/base/213963 Log: MFC: r213361 Try to adhere to style(9) and be consistent within this file. Modified: stable/7/sys/dev/mii/mii.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/mii.c ============================================================================== --- stable/7/sys/dev/mii/mii.c Sun Oct 17 12:33:15 2010 (r213962) +++ stable/7/sys/dev/mii/mii.c Sun Oct 17 12:33:15 2010 (r213963) @@ -128,7 +128,7 @@ miibus_probe(device_t dev) */ bmsr = MIIBUS_READREG(parent, ma.mii_phyno, MII_BMSR); if (bmsr == 0 || bmsr == 0xffff || - (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) { + (bmsr & (BMSR_EXTSTAT | BMSR_MEDIAMASK)) == 0) { /* Assume no PHY at this address. */ continue; } @@ -154,11 +154,11 @@ miibus_probe(device_t dev) } if (child == NULL) - return(ENXIO); + return (ENXIO); device_set_desc(dev, "MII bus"); - return(0); + return (0); } int @@ -178,7 +178,7 @@ miibus_attach(device_t dev) ivars->ifmedia_sts); bus_generic_attach(dev); - return(0); + return (0); } int @@ -191,7 +191,7 @@ miibus_detach(device_t dev) ifmedia_removeall(&mii->mii_media); mii->mii_ifp = NULL; - return(0); + return (0); } static int @@ -212,10 +212,12 @@ static int miibus_child_pnpinfo_str(device_t bus, device_t child, char *buf, size_t buflen) { - struct mii_attach_args *maa = device_get_ivars(child); + struct mii_attach_args *ma; + + ma = device_get_ivars(child); snprintf(buf, buflen, "oui=0x%x model=0x%x rev=0x%x", - MII_OUI(maa->mii_id1, maa->mii_id2), - MII_MODEL(maa->mii_id2), MII_REV(maa->mii_id2)); + MII_OUI(ma->mii_id1, ma->mii_id2), + MII_MODEL(ma->mii_id2), MII_REV(ma->mii_id2)); return (0); } @@ -223,8 +225,10 @@ static int miibus_child_location_str(device_t bus, device_t child, char *buf, size_t buflen) { - struct mii_attach_args *maa = device_get_ivars(child); - snprintf(buf, buflen, "phyno=%d", maa->mii_phyno); + struct mii_attach_args *ma; + + ma = device_get_ivars(child); + snprintf(buf, buflen, "phyno=%d", ma->mii_phyno); return (0); } @@ -234,7 +238,7 @@ miibus_readreg(device_t dev, int phy, in device_t parent; parent = device_get_parent(dev); - return(MIIBUS_READREG(parent, phy, reg)); + return (MIIBUS_READREG(parent, phy, reg)); } static int @@ -243,7 +247,7 @@ miibus_writereg(device_t dev, int phy, i device_t parent; parent = device_get_parent(dev); - return(MIIBUS_WRITEREG(parent, phy, reg, data)); + return (MIIBUS_WRITEREG(parent, phy, reg, data)); } static void @@ -264,7 +268,6 @@ miibus_statchg(device_t dev) */ ifp = *(struct ifnet **)device_get_softc(parent); ifp->if_baudrate = ifmedia_baudrate(mii->mii_media_active); - return; } static void @@ -306,13 +309,11 @@ miibus_mediainit(device_t dev) mii = device_get_softc(dev); LIST_FOREACH(m, &mii->mii_media.ifm_list, ifm_list) { media = m->ifm_media; - if (media == (IFM_ETHER|IFM_AUTO)) + if (media == (IFM_ETHER | IFM_AUTO)) break; } ifmedia_set(&mii->mii_media, media); - - return; } int @@ -333,7 +334,7 @@ mii_phy_probe(device_t dev, device_t *ch for (i = 0; i < MII_NPHY; i++) { bmsr = MIIBUS_READREG(dev, i, MII_BMSR); if (bmsr == 0 || bmsr == 0xffff || - (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) { + (bmsr & (BMSR_EXTSTAT | BMSR_MEDIAMASK)) == 0) { /* Assume no PHY at this address. */ continue; } else @@ -343,12 +344,12 @@ mii_phy_probe(device_t dev, device_t *ch if (i == MII_NPHY) { device_delete_child(dev, *child); *child = NULL; - return(ENXIO); + return (ENXIO); } bus_generic_attach(dev); - return(0); + return (0); } /* @@ -380,7 +381,7 @@ mii_tick(struct mii_data *mii) struct mii_softc *child; LIST_FOREACH(child, &mii->mii_phys, mii_list) - (void) (*child->mii_service)(child, mii, MII_TICK); + (void)(*child->mii_service)(child, mii, MII_TICK); } /* @@ -395,7 +396,7 @@ mii_pollstat(struct mii_data *mii) mii->mii_media_active = IFM_NONE; LIST_FOREACH(child, &mii->mii_phys, mii_list) - (void) (*child->mii_service)(child, mii, MII_POLLSTAT); + (void)(*child->mii_service)(child, mii, MII_POLLSTAT); } /* From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 12:34:20 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 628C11065697; Sun, 17 Oct 2010 12:34:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 503FF8FC27; Sun, 17 Oct 2010 12:34:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HCYKp7030547; Sun, 17 Oct 2010 12:34:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCYKn9030545; Sun, 17 Oct 2010 12:34:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171234.o9HCYKn9030545@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213964 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 12:34:20 -0000 Author: marius Date: Sun Oct 17 12:34:20 2010 New Revision: 213964 URL: http://svn.freebsd.org/changeset/base/213964 Log: MFC: r175703 Fix a typo in a comment. Modified: stable/7/sys/dev/mii/amphy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/amphy.c ============================================================================== --- stable/7/sys/dev/mii/amphy.c Sun Oct 17 12:33:15 2010 (r213963) +++ stable/7/sys/dev/mii/amphy.c Sun Oct 17 12:34:20 2010 (r213964) @@ -216,7 +216,7 @@ amphy_status(struct mii_softc *sc) if (bmcr & BMCR_AUTOEN) { /* - * The PAR status bits are only valid of autonegotiation + * The PAR status bits are only valid if autonegotiation * has completed (or it's disabled). */ if ((bmsr & BMSR_ACOMP) == 0) { From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 12:43:16 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 012A8106564A; Sun, 17 Oct 2010 12:43:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C86818FC1E; Sun, 17 Oct 2010 12:43:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HChFQv030830; Sun, 17 Oct 2010 12:43:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HChFee030827; Sun, 17 Oct 2010 12:43:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171243.o9HChFee030827@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213965 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 12:43:16 -0000 Author: marius Date: Sun Oct 17 12:43:15 2010 New Revision: 213965 URL: http://svn.freebsd.org/changeset/base/213965 Log: MFC: r176773, r178598 Recognize Cicada CS8204 and CS8244 PHYs. Modified: stable/7/sys/dev/mii/ciphy.c stable/7/sys/dev/mii/miidevs Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/ciphy.c ============================================================================== --- stable/7/sys/dev/mii/ciphy.c Sun Oct 17 12:34:20 2010 (r213964) +++ stable/7/sys/dev/mii/ciphy.c Sun Oct 17 12:43:15 2010 (r213965) @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); /* - * Driver for the Cicada CS8201 10/100/1000 copper PHY. + * Driver for the Cicada/Vitesse CS/VSC8xxx 10/100/1000 copper PHY. */ #include @@ -92,6 +92,8 @@ static const struct mii_phydesc ciphys[] MII_PHY_DESC(CICADA, CS8201A), MII_PHY_DESC(CICADA, CS8201B), MII_PHY_DESC(CICADA, VSC8211), + MII_PHY_DESC(CICADA, CS8204), + MII_PHY_DESC(CICADA, CS8244), MII_PHY_DESC(VITESSE, VSC8601), MII_PHY_END }; @@ -384,6 +386,7 @@ ciphy_fixup(struct mii_softc *sc) } switch (model) { + case MII_MODEL_CICADA_CS8204: case MII_MODEL_CICADA_CS8201: /* Turn off "aux mode" (whatever that means) */ @@ -421,6 +424,7 @@ ciphy_fixup(struct mii_softc *sc) break; case MII_MODEL_CICADA_VSC8211: + case MII_MODEL_CICADA_CS8244: case MII_MODEL_VITESSE_VSC8601: break; default: Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Sun Oct 17 12:34:20 2010 (r213964) +++ stable/7/sys/dev/mii/miidevs Sun Oct 17 12:43:15 2010 (r213965) @@ -152,9 +152,11 @@ model BROADCOM2 BCM5906 0x0004 BCM5906 /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ model CICADA CS8201 0x0001 Cicada CS8201 10/100/1000TX PHY +model CICADA CS8204 0x0004 Cicada CS8204 10/100/1000TX PHY model CICADA VSC8211 0x000b Cicada VSC8211 10/100/1000TX PHY model CICADA CS8201A 0x0020 Cicada CS8201 10/100/1000TX PHY model CICADA CS8201B 0x0021 Cicada CS8201 10/100/1000TX PHY +model CICADA CS8244 0x002c Cicada CS8244 10/100/1000TX PHY model VITESSE VSC8601 0x0002 Vitesse VSC8601 10/100/1000TX PHY /* Davicom Semiconductor PHYs */ From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 12:47:08 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428AE106564A; Sun, 17 Oct 2010 12:47:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FDB68FC1B; Sun, 17 Oct 2010 12:47:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HCl89w030993; Sun, 17 Oct 2010 12:47:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCl8nr030990; Sun, 17 Oct 2010 12:47:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171247.o9HCl8nr030990@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213966 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 12:47:08 -0000 Author: marius Date: Sun Oct 17 12:47:07 2010 New Revision: 213966 URL: http://svn.freebsd.org/changeset/base/213966 Log: MFC: r182751 Recognize 88E1116R phy variation. This part is found on some embedded devices. Obtained from: Semihalf Modified: stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/miidevs Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Sun Oct 17 12:43:15 2010 (r213965) +++ stable/7/sys/dev/mii/e1000phy.c Sun Oct 17 12:47:07 2010 (r213966) @@ -109,6 +109,7 @@ static const struct mii_phydesc e1000phy MII_PHY_DESC(MARVELL, E1149), MII_PHY_DESC(MARVELL, E1111), MII_PHY_DESC(MARVELL, E1116), + MII_PHY_DESC(MARVELL, E1116R), MII_PHY_DESC(MARVELL, E1118), MII_PHY_DESC(MARVELL, E3016), MII_PHY_DESC(MARVELL, PHYG65G), Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Sun Oct 17 12:43:15 2010 (r213965) +++ stable/7/sys/dev/mii/miidevs Sun Oct 17 12:47:07 2010 (r213966) @@ -237,6 +237,7 @@ model MARVELL E1112 0x0009 Marvell 88E1 model MARVELL E1149 0x000b Marvell 88E1149 Gigabit PHY model MARVELL E1111 0x000c Marvell 88E1111 Gigabit PHY model MARVELL E1116 0x0021 Marvell 88E1116 Gigabit PHY +model MARVELL E1116R 0x0024 Marvell 88E1116R Gigabit PHY model MARVELL E1118 0x0022 Marvell 88E1118 Gigabit PHY model MARVELL E3016 0x0026 Marvell 88E3016 10/100 Fast Ethernet PHY model MARVELL PHYG65G 0x0027 Marvell PHYG65G Gigabit PHY From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 13:06:18 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE39D1065679; Sun, 17 Oct 2010 13:06:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9133E8FC15; Sun, 17 Oct 2010 13:06:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HD6Iwf031573; Sun, 17 Oct 2010 13:06:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HD6I6Y031570; Sun, 17 Oct 2010 13:06:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171306.o9HD6I6Y031570@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 13:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213967 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 13:06:18 -0000 Author: marius Date: Sun Oct 17 13:06:18 2010 New Revision: 213967 URL: http://svn.freebsd.org/changeset/base/213967 Log: r182037, r182038, r182064 When there's an error, we don't want to free the children, since it will be stack garbage. Modified: stable/7/sys/dev/mii/mlphy.c stable/7/sys/dev/mii/tlphy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/mlphy.c ============================================================================== --- stable/7/sys/dev/mii/mlphy.c Sun Oct 17 12:47:07 2010 (r213966) +++ stable/7/sys/dev/mii/mlphy.c Sun Oct 17 13:06:18 2010 (r213967) @@ -194,14 +194,15 @@ mlphy_service(xsc, mii, cmd) * See if there's another PHY on this bus with us. * If so, we may need it for 10Mbps modes. */ - device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); - for (i = 0; i < devs; i++) { - if (strcmp(device_get_name(devlist[i]), "mlphy")) { - other = device_get_softc(devlist[i]); - break; + if (device_get_children(msc->ml_mii.mii_dev, &devlist, &devs) == 0) { + for (i = 0; i < devs; i++) { + if (strcmp(device_get_name(devlist[i]), "mlphy")) { + other = device_get_softc(devlist[i]); + break; + } } + free(devlist, M_TEMP); } - free(devlist, M_TEMP); switch (cmd) { case MII_POLLSTAT: @@ -400,6 +401,7 @@ mlphy_status(sc) int devs, i; /* See if there's another PHY on the bus with us. */ + devs = 0; device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); for (i = 0; i < devs; i++) { if (strcmp(device_get_name(devlist[i]), "mlphy")) { Modified: stable/7/sys/dev/mii/tlphy.c ============================================================================== --- stable/7/sys/dev/mii/tlphy.c Sun Oct 17 12:47:07 2010 (r213966) +++ stable/7/sys/dev/mii/tlphy.c Sun Oct 17 13:06:18 2010 (r213967) @@ -150,8 +150,8 @@ tlphy_attach(device_t dev) sc->sc_mii.mii_pdata = mii; capmask = 0xFFFFFFFF; - if (mii->mii_instance) { - device_get_children(sc->sc_mii.mii_dev, &devlist, &devs); + if (mii->mii_instance && + device_get_children(sc->sc_mii.mii_dev, &devlist, &devs) == 0) { for (i = 0; i < devs; i++) { if (strcmp(device_get_name(devlist[i]), "tlphy")) { other = device_get_softc(devlist[i]); From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 13:07:35 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 860E5106564A; Sun, 17 Oct 2010 13:07:35 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5918C8FC17; Sun, 17 Oct 2010 13:07:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HD7ZMq031653; Sun, 17 Oct 2010 13:07:35 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HD7ZnI031651; Sun, 17 Oct 2010 13:07:35 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171307.o9HD7ZnI031651@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 13:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213968 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 13:07:35 -0000 Author: marius Date: Sun Oct 17 13:07:35 2010 New Revision: 213968 URL: http://svn.freebsd.org/changeset/base/213968 Log: MFC: r182067 Move the code that looks for the companion phy to a subroutine to make sure we get the error handling right in both places. This also simplifies the code somewhat. Modified: stable/7/sys/dev/mii/mlphy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/mlphy.c ============================================================================== --- stable/7/sys/dev/mii/mlphy.c Sun Oct 17 13:06:18 2010 (r213967) +++ stable/7/sys/dev/mii/mlphy.c Sun Oct 17 13:07:35 2010 (r213968) @@ -177,6 +177,25 @@ mlphy_attach(dev) return (0); } +static struct mii_softc * +mlphy_find_other(device_t mii) +{ + device_t *devlist; + struct mii_softc *retval; + int i, devs; + + retval = NULL; + if (device_get_children(mii, &devlist, &devs)) + return (NULL); + for (i = 0; i < devs; i++) + if (strcmp(device_get_name(devlist[i]), "mlphy")) { + retval = device_get_softc(devlist[i]); + break; + } + free(devlist, M_TEMP); + return (retval); +} + static int mlphy_service(xsc, mii, cmd) struct mii_softc *xsc; @@ -187,22 +206,13 @@ mlphy_service(xsc, mii, cmd) struct mii_softc *other = NULL; struct mlphy_softc *msc = (struct mlphy_softc *)xsc; struct mii_softc *sc = (struct mii_softc *)&msc->ml_mii; - device_t *devlist; - int devs, i, other_inst, reg; + int other_inst, reg; /* * See if there's another PHY on this bus with us. * If so, we may need it for 10Mbps modes. */ - if (device_get_children(msc->ml_mii.mii_dev, &devlist, &devs) == 0) { - for (i = 0; i < devs; i++) { - if (strcmp(device_get_name(devlist[i]), "mlphy")) { - other = device_get_softc(devlist[i]); - break; - } - } - free(devlist, M_TEMP); - } + other = mlphy_find_other(msc->ml_mii.mii_dev); switch (cmd) { case MII_POLLSTAT: @@ -397,20 +407,9 @@ mlphy_status(sc) struct mlphy_softc *msc = (struct mlphy_softc *)sc; struct mii_data *mii = msc->ml_mii.mii_pdata; struct mii_softc *other = NULL; - device_t *devlist; - int devs, i; /* See if there's another PHY on the bus with us. */ - devs = 0; - device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); - for (i = 0; i < devs; i++) { - if (strcmp(device_get_name(devlist[i]), "mlphy")) { - other = device_get_softc(devlist[i]); - break; - } - } - free(devlist, M_TEMP); - + other = mlphy_find_other(msc->ml_mii.mii_dev); if (other == NULL) return; From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 13:10:22 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F07DC106566B; Sun, 17 Oct 2010 13:10:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE2088FC0C; Sun, 17 Oct 2010 13:10:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HDAMrK031776; Sun, 17 Oct 2010 13:10:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HDAMsL031774; Sun, 17 Oct 2010 13:10:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171310.o9HDAMsL031774@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 13:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213969 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 13:10:23 -0000 Author: marius Date: Sun Oct 17 13:10:22 2010 New Revision: 213969 URL: http://svn.freebsd.org/changeset/base/213969 Log: MFC: r173164 Setting sc->mii_anegticks to MII_ANEGTICKS_GIGE in rgephy_attach() is redundant. mii_phy_add_media() already takes care of that. Pointed out by: marius Modified: stable/7/sys/dev/mii/rgephy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/rgephy.c ============================================================================== --- stable/7/sys/dev/mii/rgephy.c Sun Oct 17 13:07:35 2010 (r213968) +++ stable/7/sys/dev/mii/rgephy.c Sun Oct 17 13:10:22 2010 (r213969) @@ -126,7 +126,6 @@ rgephy_attach(device_t dev) sc->mii_phy = ma->mii_phyno; sc->mii_service = rgephy_service; sc->mii_pdata = mii; - sc->mii_anegticks = MII_ANEGTICKS_GIGE; mii->mii_instance++; From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 13:11:46 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE6741065693; Sun, 17 Oct 2010 13:11:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB9478FC1A; Sun, 17 Oct 2010 13:11:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HDBkra031882; Sun, 17 Oct 2010 13:11:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HDBkO0031880; Sun, 17 Oct 2010 13:11:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171311.o9HDBkO0031880@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 13:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213970 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 13:11:47 -0000 Author: marius Date: Sun Oct 17 13:11:46 2010 New Revision: 213970 URL: http://svn.freebsd.org/changeset/base/213970 Log: MFC: r185421 Renamed the FRAMELEN macro to TRUEPHY_FRAMELEN as for powerpc it seems to be possible to collide with FRAMELEN from machine/frame.h. Found by: zec Modified: stable/7/sys/dev/mii/truephy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/truephy.c ============================================================================== --- stable/7/sys/dev/mii/truephy.c Sun Oct 17 13:10:22 2010 (r213969) +++ stable/7/sys/dev/mii/truephy.c Sun Oct 17 13:11:46 2010 (r213970) @@ -57,7 +57,8 @@ #include "miibus_if.h" -#define FRAMELEN(mtu) (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + (mtu) + ETHER_CRC_LEN) +#define TRUEPHY_FRAMELEN(mtu) \ + (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + (mtu) + ETHER_CRC_LEN) static int truephy_service(struct mii_softc *, struct mii_data *, int); static int truephy_attach(device_t); @@ -302,7 +303,7 @@ truephy_reset(struct mii_softc *sc) mii_phy_reset(sc); - if (FRAMELEN(sc->mii_pdata->mii_ifp->if_mtu) > 2048) { + if (TRUEPHY_FRAMELEN(sc->mii_pdata->mii_ifp->if_mtu) > 2048) { int conf; conf = PHY_READ(sc, TRUEPHY_CONF); From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 13:13:13 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AE9C106564A; Sun, 17 Oct 2010 13:13:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17CF78FC1D; Sun, 17 Oct 2010 13:13:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HDDCmj032003; Sun, 17 Oct 2010 13:13:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HDDC06032001; Sun, 17 Oct 2010 13:13:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171313.o9HDDC06032001@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 13:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213971 - stable/7/sys/sun4v/include X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 13:13:13 -0000 Author: marius Date: Sun Oct 17 13:13:12 2010 New Revision: 213971 URL: http://svn.freebsd.org/changeset/base/213971 Log: MFC: r213575 Just use the sparc64 version of this header rather than duplicating it. Modified: stable/7/sys/sun4v/include/endian.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sun4v/include/endian.h ============================================================================== --- stable/7/sys/sun4v/include/endian.h Sun Oct 17 13:11:46 2010 (r213970) +++ stable/7/sys/sun4v/include/endian.h Sun Oct 17 13:13:12 2010 (r213971) @@ -1,122 +1,7 @@ /*- - * Copyright (c) 1987, 1991, 1993 - * The Regents of the University of California. All rights reserved. + * This file is in the public domain. * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)endian.h 8.1 (Berkeley) 6/10/93 * $FreeBSD$ */ -#ifndef _MACHINE_ENDIAN_H_ -#define _MACHINE_ENDIAN_H_ - -#include -#include - -/* - * Define the order of 32-bit words in 64-bit words. - */ -#define _QUAD_HIGHWORD 0 -#define _QUAD_LOWWORD 1 - -/* - * Definitions for byte order, according to byte significance from low - * address to high. - */ -#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ -#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ -#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ - -#define _BYTE_ORDER _BIG_ENDIAN - -/* - * Deprecated variants that don't have enough underscores to be useful in more - * strict namespaces. - */ -#if __BSD_VISIBLE -#define LITTLE_ENDIAN _LITTLE_ENDIAN -#define BIG_ENDIAN _BIG_ENDIAN -#define PDP_ENDIAN _PDP_ENDIAN -#define BYTE_ORDER _BYTE_ORDER -#endif - -#if defined(__GNUCLIKE_BUILTIN_CONSTANT_P) && defined(__OPTIMIZE__) -#define __is_constant(x) __builtin_constant_p(x) -#else -#define __is_constant(x) 0 -#endif - -#define __bswap16_const(x) ((((x) >> 8) & 0xff) | \ - (((x) << 8) & 0xff00)) -#define __bswap32_const(x) ((((x) >> 24) & 0xff) | \ - (((x) >> 8) & 0xff00) | (((x) << 8) & 0xff0000) | \ - (((x) << 24) & 0xff000000)) -#define __bswap64_const(x) ((((x) >> 56) & 0xff) | \ - (((x) >> 40) & 0xff00) | (((x) >> 24) & 0xff0000) | \ - (((x) >> 8) & 0xff000000) | \ - (((x) << 8) & ((__uint64_t)0xff << 32)) | \ - (((x) << 24) & ((__uint64_t)0xff << 40)) | \ - (((x) << 40) & ((__uint64_t)0xff << 48)) | \ - (((x) << 56) & ((__uint64_t)0xff << 56))) - -static __inline __uint16_t -__bswap16_var(__uint16_t _x) -{ - - return ((_x >> 8) | ((_x << 8) & 0xff00)); -} - -static __inline __uint32_t -__bswap32_var(__uint32_t _x) -{ - - return ((_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) | - ((_x << 24) & 0xff000000)); -} - -static __inline __uint64_t -__bswap64_var(__uint64_t _x) -{ - - return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) | - ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) | - ((_x << 24) & ((__uint64_t)0xff << 40)) | - ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); -} - -#define __bswap16(x) (__is_constant(x) ? __bswap16_const(x) : \ - __bswap16_var(x)) -#define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \ - __bswap32_var(x)) -#define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \ - __bswap64_var(x)) - -#define __htonl(x) ((__uint32_t)(x)) -#define __htons(x) ((__uint16_t)(x)) -#define __ntohl(x) ((__uint32_t)(x)) -#define __ntohs(x) ((__uint16_t)(x)) - -#endif /* !_MACHINE_ENDIAN_H_ */ +#include From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 13:41:13 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F104106578E; Sun, 17 Oct 2010 13:41:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11CD18FC08; Sun, 17 Oct 2010 13:41:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HDfCoq032876; Sun, 17 Oct 2010 13:41:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HDfCMk032874; Sun, 17 Oct 2010 13:41:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171341.o9HDfCMk032874@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 13:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213974 - stable/7/sys/sparc64/include X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 13:41:13 -0000 Author: marius Date: Sun Oct 17 13:41:12 2010 New Revision: 213974 URL: http://svn.freebsd.org/changeset/base/213974 Log: MFC: r213578 In the replacement text of the __bswapN_const() macros cast the argument to the expected type so they work like the corresponding __bswapN_var() functions and the compiler doesn't complain when arguments of different width are passed. Modified: stable/7/sys/sparc64/include/endian.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/endian.h ============================================================================== --- stable/7/sys/sparc64/include/endian.h Sun Oct 17 13:41:09 2010 (r213973) +++ stable/7/sys/sparc64/include/endian.h Sun Oct 17 13:41:12 2010 (r213974) @@ -69,18 +69,20 @@ #define __is_constant(x) 0 #endif -#define __bswap16_const(x) ((((x) >> 8) & 0xff) | \ - (((x) << 8) & 0xff00)) -#define __bswap32_const(x) ((((x) >> 24) & 0xff) | \ - (((x) >> 8) & 0xff00) | (((x) << 8) & 0xff0000) | \ - (((x) << 24) & 0xff000000)) -#define __bswap64_const(x) ((((x) >> 56) & 0xff) | \ - (((x) >> 40) & 0xff00) | (((x) >> 24) & 0xff0000) | \ - (((x) >> 8) & 0xff000000) | \ - (((x) << 8) & ((__uint64_t)0xff << 32)) | \ - (((x) << 24) & ((__uint64_t)0xff << 40)) | \ - (((x) << 40) & ((__uint64_t)0xff << 48)) | \ - (((x) << 56) & ((__uint64_t)0xff << 56))) +#define __bswap16_const(x) ((((__uint16_t)(x) >> 8) & 0xff) | \ + (((__uint16_t)(x) << 8) & 0xff00)) +#define __bswap32_const(x) ((((__uint32_t)(x) >> 24) & 0xff) | \ + (((__uint32_t)(x) >> 8) & 0xff00) | \ + (((__uint32_t)(x)<< 8) & 0xff0000) | \ + (((__uint32_t)(x) << 24) & 0xff000000)) +#define __bswap64_const(x) ((((__uint64_t)(x) >> 56) & 0xff) | \ + (((__uint64_t)(x) >> 40) & 0xff00) | \ + (((__uint64_t)(x) >> 24) & 0xff0000) | \ + (((__uint64_t)(x) >> 8) & 0xff000000) | \ + (((__uint64_t)(x) << 8) & ((__uint64_t)0xff << 32)) | \ + (((__uint64_t)(x) << 24) & ((__uint64_t)0xff << 40)) | \ + (((__uint64_t)(x) << 40) & ((__uint64_t)0xff << 48)) | \ + (((__uint64_t)(x) << 56) & ((__uint64_t)0xff << 56))) static __inline __uint16_t __bswap16_var(__uint16_t _x) From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 17 14:25:01 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 992701065673; Sun, 17 Oct 2010 14:25:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81D778FC08; Sun, 17 Oct 2010 14:25:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9HEP1jF034070; Sun, 17 Oct 2010 14:25:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HEP1f1034069; Sun, 17 Oct 2010 14:25:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171425.o9HEP1f1034069@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 14:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213976 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Oct 2010 14:25:01 -0000 Author: marius Date: Sun Oct 17 14:25:01 2010 New Revision: 213976 URL: http://svn.freebsd.org/changeset/base/213976 Log: MFC: r213868 - In the spirit of r212559 add a comment describing what will eventually lower the PIL. - Just as with the AP ensure that the (S)TICK timer(s) are in a known state when starting BSPs. Modified: stable/7/sys/sparc64/sparc64/mp_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_machdep.c Sun Oct 17 13:47:03 2010 (r213975) +++ stable/7/sys/sparc64/sparc64/mp_machdep.c Sun Oct 17 14:25:01 2010 (r213976) @@ -423,6 +423,12 @@ cpu_mp_bootstrap(struct pcpu *pc) */ cache_enable(pc->pc_impl); + /* + * Clear (S)TICK timer(s) (including NPT) and ensure they are stopped. + */ + tick_clear(pc->pc_impl); + tick_stop(pc->pc_impl); + /* Lock the kernel TSB in the TLB. */ pmap_map_tsb(); @@ -435,7 +441,11 @@ cpu_mp_bootstrap(struct pcpu *pc) /* Initialize global registers. */ cpu_setregs(pc); - /* Enable interrupts. */ + /* + * Enable interrupts. + * Note that the PIL we be lowered indirectly via sched_throw(NULL) + * when fake spinlock held by the idle thread eventually is released. + */ wrpr(pstate, 0, PSTATE_KERNEL); /* Start the (S)TICK interrupts. */ From owner-svn-src-stable-7@FreeBSD.ORG Mon Oct 18 14:36:51 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0092106564A; Mon, 18 Oct 2010 14:36:51 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3A9D8FC18; Mon, 18 Oct 2010 14:36:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9IEapNl074518; Mon, 18 Oct 2010 14:36:51 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9IEapRL074517; Mon, 18 Oct 2010 14:36:51 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201010181436.o9IEapRL074517@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 18 Oct 2010 14:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214023 - stable/7/sbin/mount X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 18 Oct 2010 14:36:51 -0000 Author: jh Date: Mon Oct 18 14:36:51 2010 New Revision: 214023 URL: http://svn.freebsd.org/changeset/base/214023 Log: Remove incorrectly placed mergeinfo. This is a direct commit to stable/7. Modified: Directory Properties: stable/7/sbin/mount/mount_fs.c (props changed) From owner-svn-src-stable-7@FreeBSD.ORG Mon Oct 18 14:40:49 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D649106564A; Mon, 18 Oct 2010 14:40:49 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0B78FC19; Mon, 18 Oct 2010 14:40:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9IEem4q074660; Mon, 18 Oct 2010 14:40:48 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9IEemKU074658; Mon, 18 Oct 2010 14:40:48 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201010181440.o9IEemKU074658@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 18 Oct 2010 14:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214024 - stable/7/sbin/mount X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 18 Oct 2010 14:40:49 -0000 Author: jh Date: Mon Oct 18 14:40:48 2010 New Revision: 214024 URL: http://svn.freebsd.org/changeset/base/214024 Log: MFC r213298: Fix printing of the "rw" mount option in fstab(5) format (-p option). fstab(5) format requires that one of "rw", "rq" or "ro" is always specified. PR: bin/123021 Modified: stable/7/sbin/mount/mount.c Directory Properties: stable/7/sbin/mount/ (props changed) Modified: stable/7/sbin/mount/mount.c ============================================================================== --- stable/7/sbin/mount/mount.c Mon Oct 18 14:36:51 2010 (r214023) +++ stable/7/sbin/mount/mount.c Mon Oct 18 14:40:48 2010 (r214024) @@ -846,10 +846,18 @@ void putfsent(struct statfs *ent) { struct fstab *fst; - char *opts; + char *opts, *rw; int l; + opts = NULL; + /* flags2opts() doesn't return the "rw" option. */ + if ((ent->f_flags & MNT_RDONLY) != 0) + rw = NULL; + else + rw = catopt(NULL, "rw"); + opts = flags2opts(ent->f_flags); + opts = catopt(rw, opts); if (strncmp(ent->f_mntfromname, "", 7) == 0 || strncmp(ent->f_mntfromname, "", 7) == 0) { @@ -857,10 +865,6 @@ putfsent(struct statfs *ent) +1)); } - /* - * "rw" is not a real mount option; this is why we print NULL as "rw" - * if opts is still NULL here. - */ l = strlen(ent->f_mntfromname); printf("%s%s%s%s", ent->f_mntfromname, l < 8 ? "\t" : "", @@ -872,13 +876,9 @@ putfsent(struct statfs *ent) l < 16 ? "\t" : "", l < 24 ? "\t" : " "); printf("%s\t", ent->f_fstypename); - if (opts == NULL) { - printf("%s\t", "rw"); - } else { - l = strlen(opts); - printf("%s%s", opts, - l < 8 ? "\t" : " "); - } + l = strlen(opts); + printf("%s%s", opts, + l < 8 ? "\t" : " "); free(opts); if ((fst = getfsspec(ent->f_mntfromname))) From owner-svn-src-stable-7@FreeBSD.ORG Tue Oct 19 10:56:57 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07821106567A; Tue, 19 Oct 2010 10:56:57 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE9A18FC23; Tue, 19 Oct 2010 10:56:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9JAuuBH012434; Tue, 19 Oct 2010 10:56:56 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JAuu2n012432; Tue, 19 Oct 2010 10:56:56 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201010191056.o9JAuu2n012432@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 19 Oct 2010 10:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214052 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 19 Oct 2010 10:56:57 -0000 Author: pluknet Date: Tue Oct 19 10:56:56 2010 New Revision: 214052 URL: http://svn.freebsd.org/changeset/base/214052 Log: MFC r213514: Wrap lines for SiS and Promise entries to 80 columns. PR: docs/146195 Approved by: avg (mentor) Modified: stable/7/share/man/man4/ata.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/ata.4 ============================================================================== --- stable/7/share/man/man4/ata.4 Tue Oct 19 10:51:18 2010 (r214051) +++ stable/7/share/man/man4/ata.4 Tue Oct 19 10:56:56 2010 (r214052) @@ -135,13 +135,19 @@ NC3000, NC5000. .It nVidia: nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4. .It Promise: -PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270, PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375, PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580, PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519, PDC40718, PDC40719. +PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270, +PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375, +PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580, +PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519, +PDC40718, PDC40719. .It ServerWorks: HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8. .It Silicon Image: SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512. .It SiS: -SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630, SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962, SIS963, SIS964, SIS965. +SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630, +SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962, +SIS963, SIS964, SIS965. .It VIA: VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, VT8237A, VT8237S, VT8251. .El From owner-svn-src-stable-7@FreeBSD.ORG Tue Oct 19 14:11:51 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09105106566B; Tue, 19 Oct 2010 14:11:51 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E05A98FC22; Tue, 19 Oct 2010 14:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9JEBouL017082; Tue, 19 Oct 2010 14:11:50 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JEBo8N017079; Tue, 19 Oct 2010 14:11:50 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201010191411.o9JEBo8N017079@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 19 Oct 2010 14:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214058 - in stable/7/tools/tools/netrate: juggle tcpconnect X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 19 Oct 2010 14:11:51 -0000 Author: pluknet Date: Tue Oct 19 14:11:50 2010 New Revision: 214058 URL: http://svn.freebsd.org/changeset/base/214058 Log: MFC r213574: - tcpconnect incorrectly uses err() in usage() with errx() semantics [1] - 64-bit aware fixes in printf() usage [2] o netrate/juggle: time_t has arch-dependent size o netrate/tcpconnect: don't assume %ll has always 64bit. PR: 146088 [1], 146086 [2] (modified) Approved by: kib (mentor) Modified: stable/7/tools/tools/netrate/juggle/juggle.c stable/7/tools/tools/netrate/tcpconnect/tcpconnect.c Directory Properties: stable/7/tools/tools/netrate/ (props changed) Modified: stable/7/tools/tools/netrate/juggle/juggle.c ============================================================================== --- stable/7/tools/tools/netrate/juggle/juggle.c Tue Oct 19 14:09:17 2010 (r214057) +++ stable/7/tools/tools/netrate/juggle/juggle.c Tue Oct 19 14:11:50 2010 (r214058) @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -557,7 +558,8 @@ main(int argc, char *argv[]) if (j != 0) printf(", "); scale_timespec(&juggle_results[j], p); - printf("%u.%09lu", juggle_results[j].tv_sec, + printf("%jd.%09lu", + (intmax_t)juggle_results[j].tv_sec, juggle_results[j].tv_nsec); } printf("\n"); @@ -567,7 +569,8 @@ main(int argc, char *argv[]) if (j != 0) printf(", "); scale_timespec(&process_results[j], p); - printf("%u.%09lu", process_results[j].tv_sec, + printf("%jd.%09lu", + (intmax_t)process_results[j].tv_sec, process_results[j].tv_nsec); } printf("\n"); @@ -577,7 +580,8 @@ main(int argc, char *argv[]) if (j != 0) printf(", "); scale_timespec(&thread_results[j], p); - printf("%u.%09lu", thread_results[j].tv_sec, + printf("%jd.%09lu", + (intmax_t)thread_results[j].tv_sec, thread_results[j].tv_nsec); } printf("\n"); Modified: stable/7/tools/tools/netrate/tcpconnect/tcpconnect.c ============================================================================== --- stable/7/tools/tools/netrate/tcpconnect/tcpconnect.c Tue Oct 19 14:09:17 2010 (r214057) +++ stable/7/tools/tools/netrate/tcpconnect/tcpconnect.c Tue Oct 19 14:11:50 2010 (r214058) @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -110,7 +111,7 @@ main(int argc, char *argv[]) u_int64_t counter; if (argc != 2) - err(-1, "usage: tcpconnect [ip]"); + errx(-1, "usage: tcpconnect [ip]"); bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; @@ -128,8 +129,8 @@ main(int argc, char *argv[]) if (try_connect(&sin) == 0) counter++; } - printf("%llu count\n", counter); - printf("%llu connections/second\n", counter / SECONDS); + printf("%ju count\n", (uintmax_t)counter); + printf("%ju connections/second\n", (uintmax_t)(counter / SECONDS)); return (0); } From owner-svn-src-stable-7@FreeBSD.ORG Tue Oct 19 21:05:23 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E9481065672; Tue, 19 Oct 2010 21:05:23 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CCB98FC1B; Tue, 19 Oct 2010 21:05:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9JL5NU4027191; Tue, 19 Oct 2010 21:05:23 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JL5Nep027189; Tue, 19 Oct 2010 21:05:23 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201010192105.o9JL5Nep027189@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 19 Oct 2010 21:05:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214080 - stable/7/lib/libc/stdtime X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 19 Oct 2010 21:05:23 -0000 Author: edwin Date: Tue Oct 19 21:05:22 2010 New Revision: 214080 URL: http://svn.freebsd.org/changeset/base/214080 Log: MFC of r207830 strptime(3) confused July with June with the fr_FR locale. When parsing the month "juillet" (abbr "jul"), %B recognized it as "juin" (abbr "jui") because the full name of the month names is checked at the same time as the abbrevation. The new behaviour checks the full names first before checking the abbrevation names. PR: kern/141939 Submitted by: Denis Chatelain Modified: stable/7/lib/libc/stdtime/strptime.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/stdtime/strptime.c ============================================================================== --- stable/7/lib/libc/stdtime/strptime.c Tue Oct 19 21:04:45 2010 (r214079) +++ stable/7/lib/libc/stdtime/strptime.c Tue Oct 19 21:05:22 2010 (r214080) @@ -408,6 +408,14 @@ label: if (strncasecmp(buf, tptr->month[i], len) == 0) break; + } + } + /* + * Try the abbreviated month name if the full name + * wasn't found and Oalternative was not requested. + */ + if (i == asizeof(tptr->month) && !Oalternative) { + for (i = 0; i < asizeof(tptr->month); i++) { len = strlen(tptr->mon[i]); if (strncasecmp(buf, tptr->mon[i], len) == 0) From owner-svn-src-stable-7@FreeBSD.ORG Wed Oct 20 17:58:12 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D86271065672; Wed, 20 Oct 2010 17:58:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5F378FC18; Wed, 20 Oct 2010 17:58:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9KHwCk1064695; Wed, 20 Oct 2010 17:58:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9KHwCqk064692; Wed, 20 Oct 2010 17:58:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201010201758.o9KHwCqk064692@svn.freebsd.org> From: Xin LI Date: Wed, 20 Oct 2010 17:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214112 - in stable/7: share/man/man4 sys/net X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 20 Oct 2010 17:58:13 -0000 Author: delphij Date: Wed Oct 20 17:58:12 2010 New Revision: 214112 URL: http://svn.freebsd.org/changeset/base/214112 Log: MFC r190527,190528,190531: 190527(sam): fix wired-wireless failover example and remove incorrect comment about WPA not working 190528(sam): remove bogus nwid use; that's a compat shim for netbsd 190531(bruffer): Fix typo. MFC r212100 (emaste),213632,214066: Add a new syslog knob, net.link.lagg.failover_rx_all, to control whether to accept input packets on any link in a failover lagg, and add the corresponding documentation. Modified: stable/7/share/man/man4/lagg.4 stable/7/sys/net/if_lagg.c Directory Properties: stable/7/share/man/man4/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/share/man/man4/lagg.4 ============================================================================== --- stable/7/share/man/man4/lagg.4 Wed Oct 20 17:42:10 2010 (r214111) +++ stable/7/share/man/man4/lagg.4 Wed Oct 20 17:58:12 2010 (r214112) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 17, 2007 +.Dd October 18, 2010 .Dt LAGG 4 .Os .Sh NAME @@ -73,11 +73,19 @@ The interface link state is used to vali not. .Bl -tag -width loadbalance .It Ic failover -Sends and receives traffic only through the master port. +Sends traffic only through the active port. If the master port becomes unavailable, the next active port is used. The first interface added is the master port; any interfaces added after that are used as failover devices. +.Pp +By default, received traffic is only accepted when they are received +through the active port. +This constraint can be relaxed by setting the +.Va net.link.lagg.failover_rx_all +.Xr sysctl 8 +variable to a nonzero value, +which is useful for certain bridged network setups. .It Ic fec Supports Cisco EtherChannel. This is a static setup and does not negotiate aggregation with the peer or @@ -142,13 +150,18 @@ Whenever the wired master interface is u device will be used: .Bd -literal -offset indent # ifconfig em0 up -# ifconfig ath0 nwid my_net up -# ifconfig lagg0 laggproto failover laggport em0 laggport ath0 \e +# ifconfig ath0 ether 00:11:22:33:44:55 +# ifconfig create wlan0 wlandev ath0 ssid my_net up +# ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e 192.168.1.1 netmask 255.255.255.0 .Ed +.Pp +(Note the mac address of the wireless device is forced to match the wired +device as a workaround.) .Sh SEE ALSO .Xr ng_fec 4 , .Xr ng_one2many 4 , +.Xr sysctl 8 , .Xr ifconfig 8 .Sh HISTORY The @@ -172,6 +185,3 @@ There is no way to configure LACP admini and port priorities. The current implementation always performs active-mode LACP and uses 0x8000 as system and port priorities. -.Pp -WPA security does not currently work correctly with a wireless interface added -to the lagg port. Modified: stable/7/sys/net/if_lagg.c ============================================================================== --- stable/7/sys/net/if_lagg.c Wed Oct 20 17:42:10 2010 (r214111) +++ stable/7/sys/net/if_lagg.c Wed Oct 20 17:58:12 2010 (r214112) @@ -159,6 +159,14 @@ static const struct { { LAGG_PROTO_NONE, NULL } }; +SYSCTL_DECL(_net_link); +SYSCTL_NODE(_net_link, OID_AUTO, lagg, CTLFLAG_RW, 0, "Link Aggregation"); + +static int lagg_failover_rx_all = 0; /* Allow input on any failover links */ +SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW, + &lagg_failover_rx_all, 0, + "Accept input from any interface in a failover lagg"); + static int lagg_modevent(module_t mod, int type, void *data) { @@ -1476,7 +1484,7 @@ lagg_fail_input(struct lagg_softc *sc, s struct ifnet *ifp = sc->sc_ifp; struct lagg_port *tmp_tp; - if (lp == sc->sc_primary) { + if (lp == sc->sc_primary || lagg_failover_rx_all) { m->m_pkthdr.rcvif = ifp; return (m); } From owner-svn-src-stable-7@FreeBSD.ORG Thu Oct 21 10:13:52 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 592AD1065675; Thu, 21 Oct 2010 10:13:52 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46A628FC08; Thu, 21 Oct 2010 10:13:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9LADqZ5085987; Thu, 21 Oct 2010 10:13:52 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9LADq2N085985; Thu, 21 Oct 2010 10:13:52 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201010211013.o9LADq2N085985@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 21 Oct 2010 10:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214127 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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, 21 Oct 2010 10:13:52 -0000 Author: pluknet Date: Thu Oct 21 10:13:52 2010 New Revision: 214127 URL: http://svn.freebsd.org/changeset/base/214127 Log: MFC r214020: Fix typo: Offlaod -> Offload. PR: docs/150756 Approved by: avg (mentor) Modified: stable/7/share/man/man4/nxge.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/nxge.4 ============================================================================== --- stable/7/share/man/man4/nxge.4 Thu Oct 21 10:11:39 2010 (r214126) +++ stable/7/share/man/man4/nxge.4 Thu Oct 21 10:13:52 2010 (r214127) @@ -49,7 +49,7 @@ The .Nm driver provides support for Neterion Xframe-I and Xframe-II adapters. The driver supports TCP Segmentation Offload (TSO/LSO), -Large Receive Offlaod (LRO), Jumbo Frames (5 buffer mode), +Large Receive Offload (LRO), Jumbo Frames (5 buffer mode), Header Separation (Rx 2 buffer mode), VLAN, and Promiscuous mode. .Pp For general information and support, please visit the Neterion support page From owner-svn-src-stable-7@FreeBSD.ORG Fri Oct 22 16:00:46 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02CF01065701; Fri, 22 Oct 2010 16:00:46 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E569F8FC21; Fri, 22 Oct 2010 16:00:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9MG0jhx059186; Fri, 22 Oct 2010 16:00:45 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9MG0jD4059183; Fri, 22 Oct 2010 16:00:45 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201010221600.o9MG0jD4059183@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 22 Oct 2010 16:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214207 - in stable/7: share/man/man9 sys/vm X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 22 Oct 2010 16:00:46 -0000 Author: mdf Date: Fri Oct 22 16:00:45 2010 New Revision: 214207 URL: http://svn.freebsd.org/changeset/base/214207 Log: MFC r214062: uma_zfree(zone, NULL) should do nothing, to match free(9). Noticed by: Ron Steinke Modified: stable/7/share/man/man9/zone.9 stable/7/sys/vm/uma_core.c Directory Properties: stable/7/share/man/man9/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/share/man/man9/zone.9 ============================================================================== --- stable/7/share/man/man9/zone.9 Fri Oct 22 16:00:00 2010 (r214206) +++ stable/7/share/man/man9/zone.9 Fri Oct 22 16:00:45 2010 (r214207) @@ -147,6 +147,13 @@ Items are released back to the zone from calling .Fn uma_zfree with a pointer to the zone and a pointer to the item. +If +.Fa item +is +.Dv NULL , +then +.Fn uma_zfree +does nothing. .Pp The variations .Fn uma_zalloc_arg Modified: stable/7/sys/vm/uma_core.c ============================================================================== --- stable/7/sys/vm/uma_core.c Fri Oct 22 16:00:00 2010 (r214206) +++ stable/7/sys/vm/uma_core.c Fri Oct 22 16:00:45 2010 (r214207) @@ -2250,6 +2250,10 @@ uma_zfree_arg(uma_zone_t zone, void *ite CTR2(KTR_UMA, "uma_zfree_arg thread %x zone %s", curthread, zone->uz_name); + /* uma_zfree(..., NULL) does nothing, to match free(9). */ + if (item == NULL) + return; + if (zone->uz_dtor) zone->uz_dtor(item, keg->uk_size, udata); #ifdef INVARIANTS From owner-svn-src-stable-7@FreeBSD.ORG Fri Oct 22 17:49:11 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA50B10656C6; Fri, 22 Oct 2010 17:49:11 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A83F18FC1D; Fri, 22 Oct 2010 17:49:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9MHnBKo061241; Fri, 22 Oct 2010 17:49:11 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9MHnBrJ061238; Fri, 22 Oct 2010 17:49:11 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010221749.o9MHnBrJ061238@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 22 Oct 2010 17:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214208 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 22 Oct 2010 17:49:11 -0000 Author: obrien Date: Fri Oct 22 17:49:11 2010 New Revision: 214208 URL: http://svn.freebsd.org/changeset/base/214208 Log: MFC r212243: improve comments in expand.c r214100: MFC r213815: only need to look as far as '..' to find 'test/' r214104: r213774: DEBUG_FLAGS should be used to enable extra debugging rather than frobbing CFLAGS directly. r213798: do not inline static functions if debugging Modified: stable/7/bin/sh/Makefile stable/7/bin/sh/expand.c Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/Makefile ============================================================================== --- stable/7/bin/sh/Makefile Fri Oct 22 16:00:45 2010 (r214207) +++ stable/7/bin/sh/Makefile Fri Oct 22 17:49:11 2010 (r214208) @@ -21,12 +21,12 @@ LDADD= -ll -ledit -ltermcap LFLAGS= -8 # 8-bit lex scanner for arithmetic CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: -# CFLAGS+= -g -DDEBUG=2 +# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline WARNS?= 2 WFORMAT=0 .PATH: ${.CURDIR}/bltin \ - ${.CURDIR}/../../bin/test + ${.CURDIR}/../test CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ mksyntax mksyntax.o Modified: stable/7/bin/sh/expand.c ============================================================================== --- stable/7/bin/sh/expand.c Fri Oct 22 16:00:45 2010 (r214207) +++ stable/7/bin/sh/expand.c Fri Oct 22 17:49:11 2010 (r214208) @@ -139,12 +139,18 @@ expandhere(union node *arg, int fd) /* - * Perform variable substitution and command substitution on an argument, - * placing the resulting list of arguments in arglist. If EXP_FULL is true, - * perform splitting and file name expansion. When arglist is NULL, perform - * here document expansion. + * Perform expansions on an argument, placing the resulting list of arguments + * in arglist. Parameter expansion, command substitution and arithmetic + * expansion are always performed; additional expansions can be requested + * via flag (EXP_*). + * The result is left in the stack string. + * When arglist is NULL, perform here document expansion. A partial result + * may be written to herefd, which is then not included in the stack string. + * + * Caution: this function uses global state and is not reentrant. + * However, a new invocation after an interrupted invocation is safe + * and will reset the global state for the new call. */ - void expandarg(union node *arg, struct arglist *arglist, int flag) { @@ -196,11 +202,14 @@ expandarg(union node *arg, struct arglis /* - * Perform variable and command substitution. If EXP_FULL is set, output CTLESC - * characters to allow for further processing. Otherwise treat - * $@ like $* since no splitting will be performed. + * Perform parameter expansion, command substitution and arithmetic + * expansion, and tilde expansion if requested via EXP_TILDE/EXP_VARTILDE. + * Processing ends at a CTLENDVAR character as well as '\0'. + * This is used to expand word in ${var+word} etc. + * If EXP_FULL, EXP_CASE or EXP_REDIR are set, keep and/or generate CTLESC + * characters to allow for further processing. + * If EXP_FULL is set, also preserve CTLQUOTEMARK characters. */ - STATIC void argstr(char *p, int flag) { @@ -213,7 +222,7 @@ argstr(char *p, int flag) for (;;) { switch (c = *p++) { case '\0': - case CTLENDVAR: /* ??? */ + case CTLENDVAR: goto breakloop; case CTLQUOTEMARK: /* "$@" syntax adherence hack */ @@ -263,6 +272,10 @@ argstr(char *p, int flag) breakloop:; } +/* + * Perform tilde expansion, placing the result in the stack string and + * returning the next position in the input string to process. + */ STATIC char * exptilde(char *p, int flag) { @@ -363,12 +376,11 @@ expari(int flag) int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); int quoted; - /* * This routine is slightly over-complicated for * efficiency. First we make sure there is * enough space for the result, which may be bigger - * than the expression if we add exponentiation. Next we + * than the expression. Next we * scan backwards looking for the start of arithmetic. If the * next previous character is a CTLESC character, then we * have to rescan starting from the beginning since CTLESC @@ -407,9 +419,8 @@ expari(int flag) /* - * Expand stuff in backwards quotes. + * Perform command substitution. */ - STATIC void expbackq(union node *cmd, int quoted, int flag) { @@ -961,6 +972,12 @@ recordregion(int start, int end, int nul * Break the argument string into pieces based upon IFS and add the * strings to the argument list. The regions of the string to be * searched for IFS characters have been stored by recordregion. + * CTLESC characters are preserved but have little effect in this pass + * other than escaping CTL* characters. In particular, they do not escape + * IFS characters: that should be done with the ifsregion mechanism. + * CTLQUOTEMARK characters are used to preserve empty quoted strings. + * This pass treats them as a regular character, making the string non-empty. + * Later, they are removed along with the other CTL* characters. */ STATIC void ifsbreakup(char *string, struct arglist *arglist) @@ -1048,15 +1065,14 @@ ifsbreakup(char *string, struct arglist } - -/* - * Expand shell metacharacters. At this point, the only control characters - * should be escapes. The results are stored in the list exparg. - */ - STATIC char expdir[PATH_MAX]; #define expdir_end (expdir + sizeof(expdir)) +/* + * Perform pathname generation and remove control characters. + * At this point, the only control characters should be CTLESC and CTLQUOTEMARK. + * The results are stored in the list exparg. + */ STATIC void expandmeta(struct strlist *str, int flag __unused) { @@ -1456,7 +1472,7 @@ breakloop: /* - * Remove any CTLESC characters from a string. + * Remove any CTLESC and CTLQUOTEMARK characters from a string. */ void From owner-svn-src-stable-7@FreeBSD.ORG Fri Oct 22 23:12:46 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CC00106566B; Fri, 22 Oct 2010 23:12:46 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37BAF8FC1C; Fri, 22 Oct 2010 23:12:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9MNCk0t069123; Fri, 22 Oct 2010 23:12:46 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9MNCkWB069114; Fri, 22 Oct 2010 23:12:46 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010222312.o9MNCkWB069114@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 22 Oct 2010 23:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214230 - in stable/7: . bin/sh contrib/wpa_supplicant gnu/usr.bin/groff/tmac share/misc tools/regression/bin/sh tools/regression/bin/sh/builtins tools/regression/bin/sh/errors tools/re... X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 22 Oct 2010 23:12:46 -0000 Author: obrien Date: Fri Oct 22 23:12:45 2010 New Revision: 214230 URL: http://svn.freebsd.org/changeset/base/214230 Log: MFC r213738: allow one to regression test 'sh' changes without having to install a potentially bad /bin/sh first. r213903: default to 'sh' from PATH if 'SH' env is not set. Modified: stable/7/bin/sh/Makefile stable/7/tools/regression/bin/sh/Makefile stable/7/tools/regression/bin/sh/builtins/var-assign.0 stable/7/tools/regression/bin/sh/errors/option-error.0 stable/7/tools/regression/bin/sh/errors/redirection-error.0 stable/7/tools/regression/bin/sh/execution/func1.0 stable/7/tools/regression/bin/sh/regress.sh stable/7/tools/regression/bin/sh/regress.t Directory Properties: stable/7/ (props changed) stable/7/COPYRIGHT (props changed) stable/7/Makefile (props changed) stable/7/Makefile.inc1 (props changed) stable/7/ObsoleteFiles.inc (props changed) stable/7/UPDATING (props changed) stable/7/bin/ (props changed) stable/7/bin/chflags/ (props changed) stable/7/bin/chio/ (props changed) stable/7/bin/cp/ (props changed) stable/7/bin/csh/ (props changed) stable/7/bin/dd/ (props changed) stable/7/bin/df/ (props changed) stable/7/bin/expr/ (props changed) stable/7/bin/kill/ (props changed) stable/7/bin/ln/ (props changed) stable/7/bin/ls/ (props changed) stable/7/bin/pax/ (props changed) stable/7/bin/ps/ (props changed) stable/7/bin/rm/ (props changed) stable/7/bin/sh/ (props changed) stable/7/bin/test/ (props changed) stable/7/cddl/contrib/opensolaris/ (props changed) stable/7/cddl/lib/libzpool/ (props changed) stable/7/contrib/ (props changed) stable/7/contrib/bind9/ (props changed) stable/7/contrib/binutils/ (props changed) stable/7/contrib/bsnmp/ (props changed) stable/7/contrib/cpio/ (props changed) stable/7/contrib/csup/ (props changed) stable/7/contrib/expat/ (props changed) stable/7/contrib/gcc/ (props changed) stable/7/contrib/gdb/ (props changed) stable/7/contrib/gdtoa/ (props changed) stable/7/contrib/groff/ (props changed) stable/7/contrib/ipfilter/ (props changed) stable/7/contrib/less/ (props changed) stable/7/contrib/libpcap/ (props changed) stable/7/contrib/ncurses/ (props changed) stable/7/contrib/netcat/ (props changed) stable/7/contrib/ntp/ (props changed) stable/7/contrib/nvi/ (props changed) stable/7/contrib/pf/ (props changed) stable/7/contrib/sendmail/ (props changed) stable/7/contrib/smbfs/ (props changed) stable/7/contrib/tcp_wrappers/ (props changed) stable/7/contrib/tcsh/ (props changed) stable/7/contrib/telnet/ (props changed) stable/7/contrib/top/ (props changed) stable/7/contrib/traceroute/ (props changed) stable/7/contrib/wpa_supplicant/ (props changed) stable/7/contrib/wpa_supplicant/wpa_supplicant.conf (props changed) stable/7/crypto/openssh/ (props changed) stable/7/etc/ (props changed) stable/7/games/factor/ (props changed) stable/7/games/fortune/ (props changed) stable/7/games/grdc/ (props changed) stable/7/gnu/ (props changed) stable/7/gnu/lib/libstdc++/ (props changed) stable/7/gnu/usr.bin/ (props changed) stable/7/gnu/usr.bin/cc/ (props changed) stable/7/gnu/usr.bin/cpio/ (props changed) stable/7/gnu/usr.bin/cvs/ (props changed) stable/7/gnu/usr.bin/gdb/ (props changed) stable/7/gnu/usr.bin/gdb/kgdb/ (props changed) stable/7/gnu/usr.bin/grep/ (props changed) stable/7/gnu/usr.bin/groff/ (props changed) stable/7/gnu/usr.bin/groff/tmac/mdoc.local (props changed) stable/7/gnu/usr.bin/man/ (props changed) stable/7/gnu/usr.bin/sort/ (props changed) stable/7/include/ (props changed) stable/7/kerberos5/ (props changed) stable/7/lib/ (props changed) stable/7/lib/bind/ (props changed) stable/7/lib/csu/ (props changed) stable/7/lib/libarchive/ (props changed) stable/7/lib/libbluetooth/ (props changed) stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) stable/7/lib/libc_r/ (props changed) stable/7/lib/libcam/ (props changed) stable/7/lib/libdisk/ (props changed) stable/7/lib/libdwarf/ (props changed) stable/7/lib/libelf/ (props changed) stable/7/lib/libexpat/ (props changed) stable/7/lib/libfetch/ (props changed) stable/7/lib/libftpio/ (props changed) stable/7/lib/libgeom/ (props changed) stable/7/lib/libgssapi/ (props changed) stable/7/lib/libkse/ (props changed) stable/7/lib/libkvm/ (props changed) stable/7/lib/libmagic/ (props changed) stable/7/lib/libmemstat/ (props changed) stable/7/lib/libpmc/ (props changed) stable/7/lib/libradius/ (props changed) stable/7/lib/libsm/ (props changed) stable/7/lib/libstand/ (props changed) stable/7/lib/libthr/ (props changed) stable/7/lib/libthread_db/ (props changed) stable/7/lib/libufs/ (props changed) stable/7/lib/libutil/ (props changed) stable/7/lib/msun/ (props changed) stable/7/libexec/ (props changed) stable/7/libexec/ftpd/ (props changed) stable/7/libexec/rpc.rquotad/ (props changed) stable/7/libexec/rpc.rstatd/ (props changed) stable/7/libexec/rtld-elf/ (props changed) stable/7/libexec/tftpd/ (props changed) stable/7/release/ (props changed) stable/7/release/doc/ (props changed) stable/7/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/7/release/picobsd/tinyware/login/ (props changed) stable/7/rescue/ (props changed) stable/7/sbin/ (props changed) stable/7/sbin/atacontrol/ (props changed) stable/7/sbin/bsdlabel/ (props changed) stable/7/sbin/clri/ (props changed) stable/7/sbin/ddb/ (props changed) stable/7/sbin/devd/ (props changed) stable/7/sbin/devfs/ (props changed) stable/7/sbin/dhclient/ (props changed) stable/7/sbin/dumpfs/ (props changed) stable/7/sbin/fdisk/ (props changed) stable/7/sbin/fdisk_pc98/ (props changed) stable/7/sbin/fsck/ (props changed) stable/7/sbin/fsck_ffs/ (props changed) stable/7/sbin/fsck_msdosfs/ (props changed) stable/7/sbin/geom/ (props changed) stable/7/sbin/geom/class/label/ (props changed) stable/7/sbin/geom/class/part/ (props changed) stable/7/sbin/geom/class/stripe/ (props changed) stable/7/sbin/geom/misc/ (props changed) stable/7/sbin/growfs/ (props changed) stable/7/sbin/ifconfig/ (props changed) stable/7/sbin/init/ (props changed) stable/7/sbin/ipf/ (props changed) stable/7/sbin/ipfw/ (props changed) stable/7/sbin/md5/ (props changed) stable/7/sbin/mdconfig/ (props changed) stable/7/sbin/mksnap_ffs/ (props changed) stable/7/sbin/mount/ (props changed) stable/7/sbin/mount_msdosfs/ (props changed) stable/7/sbin/natd/ (props changed) stable/7/sbin/newfs/ (props changed) stable/7/sbin/newfs_msdos/ (props changed) stable/7/sbin/ping6/ (props changed) stable/7/sbin/reboot/ (props changed) stable/7/sbin/restore/ (props changed) stable/7/sbin/route/ (props changed) stable/7/sbin/savecore/ (props changed) stable/7/sbin/sconfig/ (props changed) stable/7/sbin/shutdown/ (props changed) stable/7/sbin/sysctl/ (props changed) stable/7/sbin/tunefs/ (props changed) stable/7/secure/lib/libssh/ (props changed) stable/7/secure/libexec/sftp-server/ (props changed) stable/7/secure/usr.bin/bdes/ (props changed) stable/7/secure/usr.bin/ssh/ (props changed) stable/7/secure/usr.sbin/sshd/ (props changed) stable/7/share/ (props changed) stable/7/share/colldef/ (props changed) stable/7/share/dict/ (props changed) stable/7/share/doc/bind9/ (props changed) stable/7/share/examples/ (props changed) stable/7/share/man/ (props changed) stable/7/share/man/man1/ (props changed) stable/7/share/man/man3/ (props changed) stable/7/share/man/man4/ (props changed) stable/7/share/man/man5/ (props changed) stable/7/share/man/man7/ (props changed) stable/7/share/man/man8/ (props changed) stable/7/share/man/man9/ (props changed) stable/7/share/misc/ (props changed) stable/7/share/misc/iso639 (props changed) stable/7/share/misc/pci_vendors (props changed) stable/7/share/mk/ (props changed) stable/7/share/mklocale/ (props changed) stable/7/share/monetdef/ (props changed) stable/7/share/msgdef/ (props changed) stable/7/share/numericdef/ (props changed) stable/7/share/sendmail/ (props changed) stable/7/share/syscons/ (props changed) stable/7/share/syscons/keymaps/ (props changed) stable/7/share/termcap/ (props changed) stable/7/share/timedef/ (props changed) stable/7/share/zoneinfo/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/tools/ (props changed) stable/7/tools/build/ (props changed) stable/7/tools/build/options/ (props changed) stable/7/tools/debugscripts/ (props changed) stable/7/tools/regression/atm/ (props changed) stable/7/tools/regression/bin/sh/ (props changed) stable/7/tools/regression/file/ (props changed) stable/7/tools/regression/file/flock/ (props changed) stable/7/tools/regression/usr.bin/ (props changed) stable/7/tools/regression/usr.bin/jot/ (props changed) stable/7/tools/regression/usr.bin/tr/ (props changed) stable/7/tools/sched/ (props changed) stable/7/tools/test/ (props changed) stable/7/tools/tools/ (props changed) stable/7/tools/tools/aac/ (props changed) stable/7/tools/tools/crypto/ (props changed) stable/7/tools/tools/editing/ (props changed) stable/7/tools/tools/nanobsd/ (props changed) stable/7/tools/tools/nanobsd/FlashDevice.sub (props changed) stable/7/tools/tools/nanobsd/nanobsd.sh (props changed) stable/7/tools/tools/netrate/ (props changed) stable/7/tools/tools/umastat/ (props changed) stable/7/tools/tools/usb/ (props changed) stable/7/usr.bin/ (props changed) stable/7/usr.bin/basename/ (props changed) stable/7/usr.bin/bluetooth/rfcomm_sppd/ (props changed) stable/7/usr.bin/calendar/ (props changed) stable/7/usr.bin/catman/ (props changed) stable/7/usr.bin/cksum/ (props changed) stable/7/usr.bin/comm/ (props changed) stable/7/usr.bin/cpuset/ (props changed) stable/7/usr.bin/csup/ (props changed) stable/7/usr.bin/dirname/ (props changed) stable/7/usr.bin/du/ (props changed) stable/7/usr.bin/fetch/ (props changed) stable/7/usr.bin/file/ (props changed) stable/7/usr.bin/find/ (props changed) stable/7/usr.bin/finger/ (props changed) stable/7/usr.bin/fstat/ (props changed) stable/7/usr.bin/gcore/ (props changed) stable/7/usr.bin/gprof/ (props changed) stable/7/usr.bin/gzip/ (props changed) stable/7/usr.bin/hexdump/ (props changed) stable/7/usr.bin/id/ (props changed) stable/7/usr.bin/indent/ (props changed) stable/7/usr.bin/ipcrm/ (props changed) stable/7/usr.bin/ipcs/ (props changed) stable/7/usr.bin/jot/ (props changed) stable/7/usr.bin/kdump/ (props changed) stable/7/usr.bin/ktrace/ (props changed) stable/7/usr.bin/ldd/ (props changed) stable/7/usr.bin/less/ (props changed) stable/7/usr.bin/locate/ (props changed) stable/7/usr.bin/lockf/ (props changed) stable/7/usr.bin/logger/ (props changed) stable/7/usr.bin/make/ (props changed) stable/7/usr.bin/ncal/ (props changed) stable/7/usr.bin/netstat/ (props changed) stable/7/usr.bin/newgrp/ (props changed) stable/7/usr.bin/nsupdate/ (props changed) stable/7/usr.bin/pkill/ (props changed) stable/7/usr.bin/procstat/ (props changed) stable/7/usr.bin/quota/ (props changed) stable/7/usr.bin/rpcgen/ (props changed) stable/7/usr.bin/ruptime/ (props changed) stable/7/usr.bin/script/ (props changed) stable/7/usr.bin/sed/ (props changed) stable/7/usr.bin/shar/ (props changed) stable/7/usr.bin/sockstat/ (props changed) stable/7/usr.bin/stat/ (props changed) stable/7/usr.bin/su/ (props changed) stable/7/usr.bin/systat/ (props changed) stable/7/usr.bin/tail/ (props changed) stable/7/usr.bin/tar/ (props changed) stable/7/usr.bin/tftp/ (props changed) stable/7/usr.bin/tip/ (props changed) stable/7/usr.bin/top/ (props changed) stable/7/usr.bin/truncate/ (props changed) stable/7/usr.bin/truss/ (props changed) stable/7/usr.bin/uname/ (props changed) stable/7/usr.bin/unifdef/ (props changed) stable/7/usr.bin/units/ (props changed) stable/7/usr.bin/vmstat/ (props changed) stable/7/usr.bin/w/ (props changed) stable/7/usr.bin/wc/ (props changed) stable/7/usr.bin/whereis/ (props changed) stable/7/usr.bin/whois/ (props changed) stable/7/usr.bin/window/ (props changed) stable/7/usr.bin/xargs/ (props changed) stable/7/usr.bin/ypcat/ (props changed) stable/7/usr.bin/ypmatch/ (props changed) stable/7/usr.bin/ypwhich/ (props changed) stable/7/usr.sbin/ (props changed) stable/7/usr.sbin/Makefile (props changed) stable/7/usr.sbin/acpi/ (props changed) stable/7/usr.sbin/adduser/ (props changed) stable/7/usr.sbin/arp/ (props changed) stable/7/usr.sbin/bluetooth/ (props changed) stable/7/usr.sbin/bluetooth/btpand/ (props changed) stable/7/usr.sbin/bluetooth/hcsecd/ (props changed) stable/7/usr.sbin/bluetooth/hcseriald/ (props changed) stable/7/usr.sbin/bluetooth/rfcomm_pppd/ (props changed) stable/7/usr.sbin/bluetooth/sdpd/ (props changed) stable/7/usr.sbin/boot0cfg/ (props changed) stable/7/usr.sbin/bsnmpd/modules/snmp_pf/ (props changed) stable/7/usr.sbin/burncd/ (props changed) stable/7/usr.sbin/cdcontrol/ (props changed) stable/7/usr.sbin/chown/ (props changed) stable/7/usr.sbin/chroot/ (props changed) stable/7/usr.sbin/config/ (props changed) stable/7/usr.sbin/cpucontrol/ (props changed) stable/7/usr.sbin/crashinfo/ (props changed) stable/7/usr.sbin/cron/ (props changed) stable/7/usr.sbin/cron/cron/ (props changed) stable/7/usr.sbin/crunch/ (props changed) stable/7/usr.sbin/cxgbtool/ (props changed) stable/7/usr.sbin/eeprom/ (props changed) stable/7/usr.sbin/extattr/ (props changed) stable/7/usr.sbin/faithd/ (props changed) stable/7/usr.sbin/fdcontrol/ (props changed) stable/7/usr.sbin/fdformat/ (props changed) stable/7/usr.sbin/fdread/ (props changed) stable/7/usr.sbin/fdwrite/ (props changed) stable/7/usr.sbin/fifolog/ (props changed) stable/7/usr.sbin/freebsd-update/ (props changed) stable/7/usr.sbin/fwcontrol/ (props changed) stable/7/usr.sbin/gstat/ (props changed) stable/7/usr.sbin/iostat/ (props changed) stable/7/usr.sbin/jail/ (props changed) stable/7/usr.sbin/jexec/ (props changed) stable/7/usr.sbin/jls/ (props changed) stable/7/usr.sbin/lpr/ (props changed) stable/7/usr.sbin/mailwrapper/ (props changed) stable/7/usr.sbin/makefs/ (props changed) stable/7/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) stable/7/usr.sbin/makefs/ffs/ffs_subr.c (props changed) stable/7/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) stable/7/usr.sbin/makefs/getid.c (props changed) stable/7/usr.sbin/mergemaster/ (props changed) stable/7/usr.sbin/mfiutil/ (props changed) stable/7/usr.sbin/mfiutil/mfiutil.8 (props changed) stable/7/usr.sbin/mountd/ (props changed) stable/7/usr.sbin/mptutil/ (props changed) stable/7/usr.sbin/mtree/ (props changed) stable/7/usr.sbin/ndiscvt/ (props changed) stable/7/usr.sbin/ndp/ (props changed) stable/7/usr.sbin/newsyslog/ (props changed) stable/7/usr.sbin/nscd/ (props changed) stable/7/usr.sbin/ntp/ (props changed) stable/7/usr.sbin/pciconf/ (props changed) stable/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pmccontrol/ (props changed) stable/7/usr.sbin/pmcstat/ (props changed) stable/7/usr.sbin/portsnap/ (props changed) stable/7/usr.sbin/powerd/ (props changed) stable/7/usr.sbin/ppp/ (props changed) stable/7/usr.sbin/pstat/ (props changed) stable/7/usr.sbin/pw/ (props changed) stable/7/usr.sbin/pwd_mkdb/ (props changed) stable/7/usr.sbin/rpc.lockd/ (props changed) stable/7/usr.sbin/rpc.statd/ (props changed) stable/7/usr.sbin/rpc.yppasswdd/ (props changed) stable/7/usr.sbin/rtsold/ (props changed) stable/7/usr.sbin/sade/ (props changed) stable/7/usr.sbin/service/ (props changed) stable/7/usr.sbin/setfib/ (props changed) stable/7/usr.sbin/sysinstall/ (props changed) stable/7/usr.sbin/syslogd/ (props changed) stable/7/usr.sbin/traceroute/ (props changed) stable/7/usr.sbin/traceroute6/ (props changed) stable/7/usr.sbin/tzsetup/ (props changed) stable/7/usr.sbin/ugidfw/ (props changed) stable/7/usr.sbin/wpa/wpa_supplicant/ (props changed) stable/7/usr.sbin/ypserv/ (props changed) stable/7/usr.sbin/zic/ (props changed) Modified: stable/7/bin/sh/Makefile ============================================================================== --- stable/7/bin/sh/Makefile Fri Oct 22 22:58:00 2010 (r214229) +++ stable/7/bin/sh/Makefile Fri Oct 22 23:12:45 2010 (r214230) @@ -62,4 +62,7 @@ syntax.c syntax.h: mksyntax token.h: mktokens sh ${.CURDIR}/mktokens +regress: + cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh + .include Modified: stable/7/tools/regression/bin/sh/Makefile ============================================================================== --- stable/7/tools/regression/bin/sh/Makefile Fri Oct 22 22:58:00 2010 (r214229) +++ stable/7/tools/regression/bin/sh/Makefile Fri Oct 22 23:12:45 2010 (r214230) @@ -1,4 +1,7 @@ # $FreeBSD$ +# Allow one to specify the 'sh' to regress. +SH?= /bin/sh + all: - sh regress.sh + env SH=${SH} ${SH} regress.sh Modified: stable/7/tools/regression/bin/sh/builtins/var-assign.0 ============================================================================== --- stable/7/tools/regression/bin/sh/builtins/var-assign.0 Fri Oct 22 22:58:00 2010 (r214229) +++ stable/7/tools/regression/bin/sh/builtins/var-assign.0 Fri Oct 22 23:12:45 2010 (r214230) @@ -44,12 +44,12 @@ set -e set -- ${SPECIAL} for cmd in "$@" do - sh -c "VAR=1; VAR=0 ${cmd}; exit \${VAR}" >/dev/null 2>&1 + ${SH} -c "VAR=1; VAR=0 ${cmd}; exit \${VAR}" >/dev/null 2>&1 done # For other built-ins and utilites they do not. set -- ${UTILS} for cmd in "$@" do - sh -c "VAR=0; VAR=1 ${cmd}; exit \${VAR}" >/dev/null 2>&1 + ${SH} -c "VAR=0; VAR=1 ${cmd}; exit \${VAR}" >/dev/null 2>&1 done Modified: stable/7/tools/regression/bin/sh/errors/option-error.0 ============================================================================== --- stable/7/tools/regression/bin/sh/errors/option-error.0 Fri Oct 22 22:58:00 2010 (r214229) +++ stable/7/tools/regression/bin/sh/errors/option-error.0 Fri Oct 22 23:12:45 2010 (r214230) @@ -35,12 +35,12 @@ UTILS="alias -y,\ set -- ${SPECIAL} for cmd in "$@" do - sh -c "${cmd}; exit 0" 2>/dev/null && exit 1 + ${SH} -c "${cmd}; exit 0" 2>/dev/null && exit 1 done # Other utilities must not abort. set -- ${UTILS} for cmd in "$@" do - sh -c "${cmd}; exit 0" 2>/dev/null || exit 1 + ${SH} -c "${cmd}; exit 0" 2>/dev/null || exit 1 done Modified: stable/7/tools/regression/bin/sh/errors/redirection-error.0 ============================================================================== --- stable/7/tools/regression/bin/sh/errors/redirection-error.0 Fri Oct 22 22:58:00 2010 (r214229) +++ stable/7/tools/regression/bin/sh/errors/redirection-error.0 Fri Oct 22 23:12:45 2010 (r214230) @@ -42,12 +42,12 @@ UTILS="alias,\ set -- ${SPECIAL} for cmd in "$@" do - sh -c "${cmd} > /; exit 0" 2>/dev/null && exit 1 + ${SH} -c "${cmd} > /; exit 0" 2>/dev/null && exit 1 done # Other utilities must not abort. set -- ${UTILS} for cmd in "$@" do - sh -c "${cmd} > /; exit 0" 2>/dev/null || exit 1 + ${SH} -c "${cmd} > /; exit 0" 2>/dev/null || exit 1 done Modified: stable/7/tools/regression/bin/sh/execution/func1.0 ============================================================================== --- stable/7/tools/regression/bin/sh/execution/func1.0 Fri Oct 22 22:58:00 2010 (r214229) +++ stable/7/tools/regression/bin/sh/execution/func1.0 Fri Oct 22 23:12:45 2010 (r214230) @@ -1,4 +1,4 @@ # $FreeBSD$ -MALLOC_OPTIONS=J sh -c 'g() { g() { :; }; :; }; g' && -MALLOC_OPTIONS=J sh -c 'g() { unset -f g; :; }; g' +MALLOC_OPTIONS=J ${SH} -c 'g() { g() { :; }; :; }; g' && +MALLOC_OPTIONS=J ${SH} -c 'g() { unset -f g; :; }; g' Modified: stable/7/tools/regression/bin/sh/regress.sh ============================================================================== --- stable/7/tools/regression/bin/sh/regress.sh Fri Oct 22 22:58:00 2010 (r214229) +++ stable/7/tools/regression/bin/sh/regress.sh Fri Oct 22 23:12:45 2010 (r214230) @@ -1,12 +1,18 @@ # $FreeBSD$ +if [ -z "${SH}" ]; then + echo '${SH} is not set, please correct and re-run.' + exit 1 +fi +export SH=${SH} + COUNTER=1 do_test() { local c c=${COUNTER} COUNTER=$((COUNTER+1)) - sh $1 > tmp.stdout 2> tmp.stderr + ${SH} $1 > tmp.stdout 2> tmp.stderr if [ $? -ne $2 ]; then echo "not ok ${c} - ${1} # wrong exit status" rm tmp.stdout tmp.stderr Modified: stable/7/tools/regression/bin/sh/regress.t ============================================================================== --- stable/7/tools/regression/bin/sh/regress.t Fri Oct 22 22:58:00 2010 (r214229) +++ stable/7/tools/regression/bin/sh/regress.t Fri Oct 22 23:12:45 2010 (r214230) @@ -1,6 +1,8 @@ #!/bin/sh # $FreeBSD$ +export SH="${SH:-sh}" + cd `dirname $0` -sh regress.sh +${SH} regress.sh From owner-svn-src-stable-7@FreeBSD.ORG Sat Oct 23 00:44:17 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F5E1106566B; Sat, 23 Oct 2010 00:44:17 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DB688FC0C; Sat, 23 Oct 2010 00:44:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9N0iHI7071060; Sat, 23 Oct 2010 00:44:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9N0iHSg071058; Sat, 23 Oct 2010 00:44:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201010230044.o9N0iHSg071058@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 23 Oct 2010 00:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214232 - stable/7/sys/dev/sis X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 23 Oct 2010 00:44:17 -0000 Author: yongari Date: Sat Oct 23 00:44:16 2010 New Revision: 214232 URL: http://svn.freebsd.org/changeset/base/214232 Log: MFC r214089: Correct handling of shared interrupt in sis_intr(). r212116 incorrectly released a drver lock for shared interrupt case such that it caused panic. While I'm here check whether driver is still running before serving TX/RX handler. Reported by: Jerahmy Pocott < QUAKENET1 <> optusnet dot com dot au > Tested by: Jerahmy Pocott < QUAKENET1 <> optusnet dot com dot au > Modified: stable/7/sys/dev/sis/if_sis.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sis/if_sis.c ============================================================================== --- stable/7/sys/dev/sis/if_sis.c Sat Oct 23 00:41:26 2010 (r214231) +++ stable/7/sys/dev/sis/if_sis.c Sat Oct 23 00:44:16 2010 (r214232) @@ -1791,12 +1791,15 @@ sis_intr(void *arg) if ((status & SIS_INTRS) == 0) { /* Not ours. */ SIS_UNLOCK(sc); + return; } /* Disable interrupts. */ CSR_WRITE_4(sc, SIS_IER, 0); for (;(status & SIS_INTRS) != 0;) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; if (status & (SIS_ISR_TX_DESC_OK | SIS_ISR_TX_ERR | SIS_ISR_TX_OK | SIS_ISR_TX_IDLE) ) @@ -1821,11 +1824,13 @@ sis_intr(void *arg) status = CSR_READ_4(sc, SIS_ISR); } - /* Re-enable interrupts. */ - CSR_WRITE_4(sc, SIS_IER, 1); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* Re-enable interrupts. */ + CSR_WRITE_4(sc, SIS_IER, 1); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - sis_startl(ifp); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + sis_startl(ifp); + } SIS_UNLOCK(sc); } From owner-svn-src-stable-7@FreeBSD.ORG Sat Oct 23 13:57:26 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 561E2106566B; Sat, 23 Oct 2010 13:57:26 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 448338FC19; Sat, 23 Oct 2010 13:57:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9NDvQX9088753; Sat, 23 Oct 2010 13:57:26 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NDvQ5S088751; Sat, 23 Oct 2010 13:57:26 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010231357.o9NDvQ5S088751@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 23 Oct 2010 13:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214240 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 23 Oct 2010 13:57:26 -0000 Author: jilles Date: Sat Oct 23 13:57:26 2010 New Revision: 214240 URL: http://svn.freebsd.org/changeset/base/214240 Log: MFC r197848: Clarify quoting of word in ${v=word} in sh(1). Modified: stable/7/bin/sh/sh.1 Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/sh.1 ============================================================================== --- stable/7/bin/sh/sh.1 Sat Oct 23 13:36:09 2010 (r214239) +++ stable/7/bin/sh/sh.1 Sat Oct 23 13:57:26 2010 (r214240) @@ -1221,6 +1221,9 @@ In all cases, the final value of .Ar parameter is substituted. +Quoting inside +.Ar word +does not prevent field splitting or pathname expansion. Only variables, not positional parameters or special parameters, can be assigned in this way. From owner-svn-src-stable-7@FreeBSD.ORG Sat Oct 23 14:00:31 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A51B81065670; Sat, 23 Oct 2010 14:00:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 939858FC08; Sat, 23 Oct 2010 14:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9NE0VId088875; Sat, 23 Oct 2010 14:00:31 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NE0VWj088873; Sat, 23 Oct 2010 14:00:31 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010231400.o9NE0VWj088873@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 23 Oct 2010 14:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214241 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 23 Oct 2010 14:00:31 -0000 Author: jilles Date: Sat Oct 23 14:00:31 2010 New Revision: 214241 URL: http://svn.freebsd.org/changeset/base/214241 Log: MFC r212417: sh(1): Remove xrefs for expr(1) and getopt(1). expr(1) should usually not be used as various forms of parameter expansion and arithmetic expansion replicate most of its functionality in an easier way. getopt(1) should not be used at all in new code. Instead, getopts(1) or entirely manual parsing should be used. Modified: stable/7/bin/sh/sh.1 Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/sh.1 ============================================================================== --- stable/7/bin/sh/sh.1 Sat Oct 23 13:57:26 2010 (r214240) +++ stable/7/bin/sh/sh.1 Sat Oct 23 14:00:31 2010 (r214241) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd October 7, 2006 +.Dd September 10, 2010 .Dt SH 1 .Os .Sh NAME @@ -2355,8 +2355,6 @@ will return the argument. .Xr echo 1 , .Xr ed 1 , .Xr emacs 1 , -.Xr expr 1 , -.Xr getopt 1 , .Xr pwd 1 , .Xr test 1 , .Xr vi 1 , From owner-svn-src-stable-7@FreeBSD.ORG Sat Oct 23 14:04:04 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C484106564A; Sat, 23 Oct 2010 14:04:04 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 505138FC0A; Sat, 23 Oct 2010 14:04:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9NE441i088988; Sat, 23 Oct 2010 14:04:04 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NE440f088986; Sat, 23 Oct 2010 14:04:04 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010231404.o9NE440f088986@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 23 Oct 2010 14:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214242 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 23 Oct 2010 14:04:04 -0000 Author: jilles Date: Sat Oct 23 14:04:04 2010 New Revision: 214242 URL: http://svn.freebsd.org/changeset/base/214242 Log: MFC r211621: sh(1): Add a brief summary of arithmetic expressions. Modified: stable/7/bin/sh/sh.1 Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/sh.1 ============================================================================== --- stable/7/bin/sh/sh.1 Sat Oct 23 14:00:31 2010 (r214241) +++ stable/7/bin/sh/sh.1 Sat Oct 23 14:04:04 2010 (r214242) @@ -1142,7 +1142,7 @@ Quote Removal. The .Ql $ character is used to introduce parameter expansion, command -substitution, or arithmetic evaluation. +substitution, or arithmetic expansion. .Ss Tilde Expansion (substituting a user's home directory) A word beginning with an unquoted tilde character .Pq Ql ~ @@ -1357,10 +1357,41 @@ The shell expands all tokens in the .Ar expression for parameter expansion, -command substitution, and quote removal. +command substitution, +arithmetic expansion +and quote removal. +.Pp +The allowed expressions are a subset of C expressions, +summarized below. +.Bl -tag -width "Variables" -offset indent +.It Values +All values are of type +.Ft intmax_t . +.It Constants +Decimal, octal (starting with +.Li 0 ) +and hexadecimal (starting with +.Li 0x ) +integer constants. +.It Variables +Shell variables can be read and written +and contain integer constants. +.It Unary operators +.Li "! ~ + -" +.It Binary operators +.Li "* / % + - << >> < <= > >= == != & ^ | && ||" +.It Assignment operators +.Li "= += -= *= /= %= <<= >>= &= ^= |=" +.It Short-circuit evaluation +The +.Li && +and +.Li || +operators always evaluate both sides. +This is a bug. +.El .Pp -Next, the shell treats this as an arithmetic expression and -substitutes the value of the expression. +The result of the expression is substituted in decimal. .Ss White Space Splitting (Field Splitting) After parameter expansion, command substitution, and arithmetic expansion the shell scans the results of From owner-svn-src-stable-7@FreeBSD.ORG Sat Oct 23 14:15:11 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 239C01065670; Sat, 23 Oct 2010 14:15:11 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9E0D8FC17; Sat, 23 Oct 2010 14:15:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9NEFAHF089240; Sat, 23 Oct 2010 14:15:10 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NEFAS6089238; Sat, 23 Oct 2010 14:15:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010231415.o9NEFAS6089238@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 23 Oct 2010 14:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214243 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 23 Oct 2010 14:15:11 -0000 Author: jilles Date: Sat Oct 23 14:15:10 2010 New Revision: 214243 URL: http://svn.freebsd.org/changeset/base/214243 Log: MFC r207831: sh(1): Fix "reserved word" vs "keyword" inconsistency. Use "keyword" everywhere, like the output of the 'type' builtin, and only mention "reserved word" once to say it is the same thing. Modified: stable/7/bin/sh/sh.1 Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/sh.1 ============================================================================== --- stable/7/bin/sh/sh.1 Sat Oct 23 14:04:04 2010 (r214242) +++ stable/7/bin/sh/sh.1 Sat Oct 23 14:15:10 2010 (r214243) @@ -411,11 +411,11 @@ character, with the exception of the new .Pq Ql \en . A backslash preceding a newline is treated as a line continuation. .El -.Ss Reserved Words -Reserved words are words that have special meaning to the +.Ss Keywords +Keywords or reserved words are words that have special meaning to the shell and are recognized at the beginning of a line and after a control operator. -The following are reserved words: +The following are keywords: .Bl -column "doneXX" "elifXX" "elseXX" "untilXX" "whileX" -offset center .It Li \&! Ta { Ta } Ta Ic case Ta Ic do .It Ic done Ta Ic elif Ta Ic else Ta Ic esac Ta Ic fi @@ -425,8 +425,8 @@ The following are reserved words: An alias is a name and corresponding value set using the .Ic alias built-in command. -Whenever a reserved word may occur (see above), -and after checking for reserved words, the shell +Whenever a keyword may occur (see above), +and after checking for keywords, the shell checks the word to see if it matches an alias. If it does, it replaces it in the input stream with its value. For example, if there is an alias called @@ -465,7 +465,7 @@ of this man page (refer to the BNF in th document). Essentially though, a line is read and if the first word of the line (or after a control operator) -is not a reserved word, then the shell has recognized a +is not a keyword, then the shell has recognized a simple command. Otherwise, a complex command or some other special construct may have been recognized. @@ -685,7 +685,7 @@ Signal numbers are defined in the header .In sys/signal.h . .Ss Complex Commands Complex commands are combinations of simple commands -with control operators or reserved words, together creating a larger complex +with control operators or keywords, together creating a larger complex command. More generally, a command is one of the following: .Bl -item -offset indent @@ -729,7 +729,7 @@ operators that are part of the command. If the pipeline is not in the background (discussed later), the shell waits for all commands to complete. .Pp -If the reserved word +If the keyword .Ic !\& does not precede the pipeline, the exit status is the exit status of the last command specified From owner-svn-src-stable-7@FreeBSD.ORG Sat Oct 23 14:16:33 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5CE8106564A; Sat, 23 Oct 2010 14:16:33 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9467D8FC1B; Sat, 23 Oct 2010 14:16:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9NEGXAr089312; Sat, 23 Oct 2010 14:16:33 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NEGX8u089310; Sat, 23 Oct 2010 14:16:33 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010231416.o9NEGX8u089310@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 23 Oct 2010 14:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214244 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 23 Oct 2010 14:16:33 -0000 Author: jilles Date: Sat Oct 23 14:16:33 2010 New Revision: 214244 URL: http://svn.freebsd.org/changeset/base/214244 Log: MFC r213926: sh(1): Clarify subshells/processes for pipelines. For multi-command pipelines, 1. all commands are direct children of the shell (unlike the original Bourne shell) 2. all commands are executed in a subshell (unlike the real Korn shell) Modified: stable/7/bin/sh/sh.1 Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/sh.1 ============================================================================== --- stable/7/bin/sh/sh.1 Sat Oct 23 14:15:10 2010 (r214243) +++ stable/7/bin/sh/sh.1 Sat Oct 23 14:16:33 2010 (r214244) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd September 10, 2010 +.Dd October 16, 2010 .Dt SH 1 .Os .Sh NAME @@ -726,6 +726,13 @@ both of a command is considered to be as pipeline before any redirection specified by redirection operators that are part of the command. .Pp +Note that unlike some other shells, +.Nm +executes each process in a pipeline with more than one command +in a subshell environment and as a child of the +.Nm +process. +.Pp If the pipeline is not in the background (discussed later), the shell waits for all commands to complete. .Pp @@ -763,15 +770,6 @@ to be executed sequentially; an .Ql & causes asynchronous execution of the preceding AND-OR-list. -.Pp -Note that unlike some other shells, -.Nm -executes each process in the pipeline as a child of the -.Nm -process. -Shell built-in commands are the exception to this rule. -They are executed in the current shell, although they do not affect its -environment when used in pipelines. .Ss Background Commands (&) If a command is terminated by the control operator ampersand .Pq Ql & ,