From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 03:13:30 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 07:11:41 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 08:44:34 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 08:46:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57D44106566B; Sun, 17 Oct 2010 08:46: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 45DC08FC1A; Sun, 17 Oct 2010 08:46: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 o9H8kYHY010921; Sun, 17 Oct 2010 08:46:34 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9H8kYRS010919; Sun, 17 Oct 2010 08:46:34 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201010170846.o9H8kYRS010919@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Oct 2010 08:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213947 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 08:46:34 -0000 Author: bz Date: Sun Oct 17 08:46:34 2010 New Revision: 213947 URL: http://svn.freebsd.org/changeset/base/213947 Log: MFC r213832: Use ifa_ifwithaddr_check() rather than ifa_ifwithaddr() as we are not interested in the result and would leak a reference otherwise. PR: kern/151435 Submitted by: Andrew Boyer (aboyer averesystems.com) Modified: stable/8/sys/netinet/ip_options.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/ip_options.c ============================================================================== --- stable/8/sys/netinet/ip_options.c Sun Oct 17 08:44:34 2010 (r213946) +++ stable/8/sys/netinet/ip_options.c Sun Oct 17 08:46:34 2010 (r213947) @@ -343,7 +343,7 @@ dropit: } (void)memcpy(&ipaddr.sin_addr, sin, sizeof(struct in_addr)); - if (ifa_ifwithaddr((SA)&ipaddr) == NULL) + if (ifa_ifwithaddr_check((SA)&ipaddr) == 0) continue; cp[IPOPT_OFFSET] += sizeof(struct in_addr); off += sizeof(struct in_addr); From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 08:59:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D96C1065670; Sun, 17 Oct 2010 08:59:03 +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 4B5318FC12; Sun, 17 Oct 2010 08:59:03 +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 o9H8x3To011276; Sun, 17 Oct 2010 08:59:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9H8x3Vf011274; Sun, 17 Oct 2010 08:59:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201010170859.o9H8x3Vf011274@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Oct 2010 08:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213948 - stable/8/sys/netipsec X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 08:59:03 -0000 Author: bz Date: Sun Oct 17 08:59:02 2010 New Revision: 213948 URL: http://svn.freebsd.org/changeset/base/213948 Log: MFC r213836: Style: make the asterisk go with the variable name, not the type. Modified: stable/8/sys/netipsec/ipsec_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netipsec/ipsec_output.c ============================================================================== --- stable/8/sys/netipsec/ipsec_output.c Sun Oct 17 08:46:34 2010 (r213947) +++ stable/8/sys/netipsec/ipsec_output.c Sun Oct 17 08:59:02 2010 (r213948) @@ -758,7 +758,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@FreeBSD.ORG Sun Oct 17 09:13:47 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 775F8106564A; Sun, 17 Oct 2010 09:13:47 +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 64FA98FC13; Sun, 17 Oct 2010 09:13:47 +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 o9H9Dlit011721; Sun, 17 Oct 2010 09:13:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9H9Dlpj011719; Sun, 17 Oct 2010 09:13:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201010170913.o9H9Dlpj011719@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Oct 2010 09:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213949 - stable/8/sys/netipsec X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 09:13:47 -0000 Author: bz Date: Sun Oct 17 09:13:47 2010 New Revision: 213949 URL: http://svn.freebsd.org/changeset/base/213949 Log: MFC r213837: Remove dead code: assignment to a local variable not used anywhere after that. Modified: stable/8/sys/netipsec/ipsec_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netipsec/ipsec_output.c ============================================================================== --- stable/8/sys/netipsec/ipsec_output.c Sun Oct 17 08:59:02 2010 (r213948) +++ stable/8/sys/netipsec/ipsec_output.c Sun Oct 17 09:13:47 2010 (r213949) @@ -853,10 +853,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@FreeBSD.ORG Sun Oct 17 11:40:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0BAB1065672; Sun, 17 Oct 2010 11:40:29 +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 DE4DC8FC0C; Sun, 17 Oct 2010 11:40:29 +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 o9HBeT2L028302; Sun, 17 Oct 2010 11:40:29 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HBeT1M028300; Sun, 17 Oct 2010 11:40:29 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201010171140.o9HBeT1M028300@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 17 Oct 2010 11:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213951 - stable/8/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 11:40:30 -0000 Author: jh Date: Sun Oct 17 11:40:29 2010 New Revision: 213951 URL: http://svn.freebsd.org/changeset/base/213951 Log: MFC r213835: Add FreeBSD 8.2. Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/8/gnu/usr.bin/groff/ (props changed) Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Oct 17 11:01:52 2010 (r213950) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Oct 17 11:40:29 2010 (r213951) @@ -75,6 +75,7 @@ .ds doc-operating-system-FreeBSD-7.4 7.4 .ds doc-operating-system-FreeBSD-8.0 8.0 .ds doc-operating-system-FreeBSD-8.1 8.1 +.ds doc-operating-system-FreeBSD-8.2 8.2 .ds doc-operating-system-FreeBSD-9.0 9.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 11:51:55 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89B36106564A; Sun, 17 Oct 2010 11:51:55 +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 76F628FC1F; Sun, 17 Oct 2010 11:51:55 +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 o9HBptNo028659; Sun, 17 Oct 2010 11:51:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HBptlA028657; Sun, 17 Oct 2010 11:51:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171151.o9HBptlA028657@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 11:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213952 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 11:51:55 -0000 Author: marius Date: Sun Oct 17 11:51:55 2010 New Revision: 213952 URL: http://svn.freebsd.org/changeset/base/213952 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/8/sys/sparc64/sparc64/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Sun Oct 17 11:40:29 2010 (r213951) +++ stable/8/sys/sparc64/sparc64/machdep.c Sun Oct 17 11:51:55 2010 (r213952) @@ -589,6 +589,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@FreeBSD.ORG Sun Oct 17 11:52:00 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 12:05:37 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 934251065670; Sun, 17 Oct 2010 12:05:37 +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 663988FC08; Sun, 17 Oct 2010 12:05:37 +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 o9HC5bI3029122; Sun, 17 Oct 2010 12:05:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HC5bP9029120; Sun, 17 Oct 2010 12:05:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171205.o9HC5bP9029120@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213954 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 12:05:37 -0000 Author: marius Date: Sun Oct 17 12:05:37 2010 New Revision: 213954 URL: http://svn.freebsd.org/changeset/base/213954 Log: MFC: r213104 minor simplifications and cosmetics Modified: stable/8/sys/sparc64/sparc64/elf_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/elf_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/elf_machdep.c Sun Oct 17 11:51:59 2010 (r213953) +++ stable/8/sys/sparc64/sparc64/elf_machdep.c Sun Oct 17 12:05:37 2010 (r213954) @@ -128,8 +128,8 @@ void elf64_dump_thread(struct thread *td __unused, void *dst __unused, size_t *off __unused) { -} +} /* * The following table holds for each relocation type: @@ -215,7 +215,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", @@ -271,10 +271,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) @@ -284,10 +283,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 = elf_relocaddr(lf, value); + where = (Elf_Addr *)(relocbase + rela->r_offset); + *where = elf_relocaddr(lf, rela->r_addend + relocbase); return (0); } @@ -342,9 +339,8 @@ elf_reloc(linker_file_t lf, Elf_Addr rel if (RELOC_PC_RELATIVE(rtype)) value -= (Elf_Addr)where; - if (RELOC_BASE_RELATIVE(rtype)) { + if (RELOC_BASE_RELATIVE(rtype)) value = elf_relocaddr(lf, value + relocbase); - } mask = RELOC_VALUE_BITMASK(rtype); value >>= RELOC_VALUE_RIGHTSHIFT(rtype); From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 12:05:40 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 12:11:42 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF229106566C; Sun, 17 Oct 2010 12:11:42 +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 A89468FC12; Sun, 17 Oct 2010 12:11:42 +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 o9HCBgVo029414; Sun, 17 Oct 2010 12:11:42 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCBgh0029383; Sun, 17 Oct 2010 12:11:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171211.o9HCBgh0029383@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213956 - in stable/8/sys: amd64/include dev/hme dev/le dev/mii i386/include ia64/include mips/include mips/malta powerpc/include sparc64/include sparc64/sbus sun4v/include sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 12:11:42 -0000 Author: marius Date: Sun Oct 17 12:11:42 2010 New Revision: 213956 URL: http://svn.freebsd.org/changeset/base/213956 Log: MFC: r204646 The NetBSD Foundation has granted permission to remove clause 3 and 4 from the software. Obtained from: NetBSD Modified: stable/8/sys/amd64/include/_inttypes.h stable/8/sys/dev/hme/if_hme_sbus.c stable/8/sys/dev/hme/if_hmereg.h stable/8/sys/dev/hme/if_hmevar.h stable/8/sys/dev/le/am79900var.h stable/8/sys/dev/le/am7990var.h stable/8/sys/dev/le/if_le_ledma.c stable/8/sys/dev/le/lancevar.h stable/8/sys/dev/mii/bmtphyreg.h stable/8/sys/dev/mii/icsphyreg.h stable/8/sys/dev/mii/lxtphyreg.h stable/8/sys/dev/mii/mii.c stable/8/sys/dev/mii/mii_physubr.c stable/8/sys/dev/mii/miidevs stable/8/sys/dev/mii/miivar.h stable/8/sys/dev/mii/nsphyreg.h stable/8/sys/dev/mii/nsphyterreg.h stable/8/sys/dev/mii/qsphyreg.h stable/8/sys/dev/mii/ukphy_subr.c stable/8/sys/i386/include/_inttypes.h stable/8/sys/ia64/include/_inttypes.h stable/8/sys/mips/include/_inttypes.h stable/8/sys/mips/malta/gtreg.h stable/8/sys/powerpc/include/_inttypes.h stable/8/sys/sparc64/include/_inttypes.h stable/8/sys/sparc64/sbus/lsi64854reg.h stable/8/sys/sparc64/sbus/lsi64854var.h stable/8/sys/sparc64/sbus/ofw_sbus.h stable/8/sys/sun4v/include/_inttypes.h stable/8/sys/sys/clock.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/include/_inttypes.h ============================================================================== --- stable/8/sys/amd64/include/_inttypes.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/amd64/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/hme/if_hme_sbus.c ============================================================================== --- stable/8/sys/dev/hme/if_hme_sbus.c Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/hme/if_hme_sbus.c Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/hme/if_hmereg.h ============================================================================== --- stable/8/sys/dev/hme/if_hmereg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/hme/if_hmereg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/hme/if_hmevar.h ============================================================================== --- stable/8/sys/dev/hme/if_hmevar.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/hme/if_hmevar.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/le/am79900var.h ============================================================================== --- stable/8/sys/dev/le/am79900var.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/le/am79900var.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/le/am7990var.h ============================================================================== --- stable/8/sys/dev/le/am7990var.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/le/am7990var.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/le/if_le_ledma.c ============================================================================== --- stable/8/sys/dev/le/if_le_ledma.c Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/le/if_le_ledma.c Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/le/lancevar.h ============================================================================== --- stable/8/sys/dev/le/lancevar.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/le/lancevar.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/bmtphyreg.h ============================================================================== --- stable/8/sys/dev/mii/bmtphyreg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/bmtphyreg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/icsphyreg.h ============================================================================== --- stable/8/sys/dev/mii/icsphyreg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/icsphyreg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/lxtphyreg.h ============================================================================== --- stable/8/sys/dev/mii/lxtphyreg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/lxtphyreg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/mii.c ============================================================================== --- stable/8/sys/dev/mii/mii.c Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/mii.c Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/mii_physubr.c ============================================================================== --- stable/8/sys/dev/mii/mii_physubr.c Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/mii_physubr.c Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/miidevs Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/miivar.h ============================================================================== --- stable/8/sys/dev/mii/miivar.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/miivar.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/nsphyreg.h ============================================================================== --- stable/8/sys/dev/mii/nsphyreg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/nsphyreg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/nsphyterreg.h ============================================================================== --- stable/8/sys/dev/mii/nsphyterreg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/nsphyterreg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/qsphyreg.h ============================================================================== --- stable/8/sys/dev/mii/qsphyreg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/qsphyreg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/dev/mii/ukphy_subr.c ============================================================================== --- stable/8/sys/dev/mii/ukphy_subr.c Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/dev/mii/ukphy_subr.c Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/i386/include/_inttypes.h ============================================================================== --- stable/8/sys/i386/include/_inttypes.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/i386/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/ia64/include/_inttypes.h ============================================================================== --- stable/8/sys/ia64/include/_inttypes.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/ia64/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/mips/include/_inttypes.h ============================================================================== --- stable/8/sys/mips/include/_inttypes.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/mips/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/mips/malta/gtreg.h ============================================================================== --- stable/8/sys/mips/malta/gtreg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/mips/malta/gtreg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/powerpc/include/_inttypes.h ============================================================================== --- stable/8/sys/powerpc/include/_inttypes.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/powerpc/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/sparc64/include/_inttypes.h ============================================================================== --- stable/8/sys/sparc64/include/_inttypes.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/sparc64/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/sparc64/sbus/lsi64854reg.h ============================================================================== --- stable/8/sys/sparc64/sbus/lsi64854reg.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/sparc64/sbus/lsi64854reg.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/sparc64/sbus/lsi64854var.h ============================================================================== --- stable/8/sys/sparc64/sbus/lsi64854var.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/sparc64/sbus/lsi64854var.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/sparc64/sbus/ofw_sbus.h ============================================================================== --- stable/8/sys/sparc64/sbus/ofw_sbus.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/sparc64/sbus/ofw_sbus.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/sun4v/include/_inttypes.h ============================================================================== --- stable/8/sys/sun4v/include/_inttypes.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/sun4v/include/_inttypes.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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/8/sys/sys/clock.h ============================================================================== --- stable/8/sys/sys/clock.h Sun Oct 17 12:05:39 2010 (r213955) +++ stable/8/sys/sys/clock.h Sun Oct 17 12:11:42 2010 (r213956) @@ -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@FreeBSD.ORG Sun Oct 17 12:11:44 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 12:16:37 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30C41106566C; Sun, 17 Oct 2010 12:16:37 +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 1C6A88FC1B; Sun, 17 Oct 2010 12:16:37 +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 o9HCGbl2029679; Sun, 17 Oct 2010 12:16:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCGaks029665; Sun, 17 Oct 2010 12:16:36 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171216.o9HCGaks029665@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213958 - stable/8/sys/dev/mii X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 12:16:37 -0000 Author: marius Date: Sun Oct 17 12:16:36 2010 New Revision: 213958 URL: http://svn.freebsd.org/changeset/base/213958 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/8/sys/dev/mii/acphy.c stable/8/sys/dev/mii/bmtphy.c stable/8/sys/dev/mii/exphy.c stable/8/sys/dev/mii/gentbi.c stable/8/sys/dev/mii/icsphy.c stable/8/sys/dev/mii/lxtphy.c stable/8/sys/dev/mii/mii.h stable/8/sys/dev/mii/nsphy.c stable/8/sys/dev/mii/nsphyter.c stable/8/sys/dev/mii/qsphy.c stable/8/sys/dev/mii/tlphy.c stable/8/sys/dev/mii/tlphyreg.h stable/8/sys/dev/mii/ukphy.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/acphy.c ============================================================================== --- stable/8/sys/dev/mii/acphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/acphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/bmtphy.c ============================================================================== --- stable/8/sys/dev/mii/bmtphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/bmtphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/exphy.c ============================================================================== --- stable/8/sys/dev/mii/exphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/exphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/gentbi.c ============================================================================== --- stable/8/sys/dev/mii/gentbi.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/gentbi.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/icsphy.c ============================================================================== --- stable/8/sys/dev/mii/icsphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/icsphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/lxtphy.c ============================================================================== --- stable/8/sys/dev/mii/lxtphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/lxtphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/mii.h ============================================================================== --- stable/8/sys/dev/mii/mii.h Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/mii.h Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/nsphy.c ============================================================================== --- stable/8/sys/dev/mii/nsphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/nsphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/nsphyter.c ============================================================================== --- stable/8/sys/dev/mii/nsphyter.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/nsphyter.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/qsphy.c ============================================================================== --- stable/8/sys/dev/mii/qsphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/qsphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/tlphy.c ============================================================================== --- stable/8/sys/dev/mii/tlphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/tlphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/tlphyreg.h ============================================================================== --- stable/8/sys/dev/mii/tlphyreg.h Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/tlphyreg.h Sun Oct 17 12:16:36 2010 (r213958) @@ -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/8/sys/dev/mii/ukphy.c ============================================================================== --- stable/8/sys/dev/mii/ukphy.c Sun Oct 17 12:11:43 2010 (r213957) +++ stable/8/sys/dev/mii/ukphy.c Sun Oct 17 12:16:36 2010 (r213958) @@ -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@FreeBSD.ORG Sun Oct 17 12:16:40 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 12:29:57 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2E77106566C; Sun, 17 Oct 2010 12:29:57 +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 AEFEF8FC14; Sun, 17 Oct 2010 12:29:57 +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 o9HCTvsM030202; Sun, 17 Oct 2010 12:29:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HCTvJP030167; Sun, 17 Oct 2010 12:29:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171229.o9HCTvJP030167@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 12:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213960 - in stable/8/sys/dev: dc mii X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 12:29:57 -0000 Author: marius Date: Sun Oct 17 12:29:57 2010 New Revision: 213960 URL: http://svn.freebsd.org/changeset/base/213960 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/8/sys/dev/dc/dcphy.c stable/8/sys/dev/dc/pnphy.c stable/8/sys/dev/mii/acphy.c stable/8/sys/dev/mii/amphy.c stable/8/sys/dev/mii/atphy.c stable/8/sys/dev/mii/axphy.c stable/8/sys/dev/mii/bmtphy.c stable/8/sys/dev/mii/brgphy.c stable/8/sys/dev/mii/ciphy.c stable/8/sys/dev/mii/e1000phy.c stable/8/sys/dev/mii/exphy.c stable/8/sys/dev/mii/gentbi.c stable/8/sys/dev/mii/icsphy.c stable/8/sys/dev/mii/inphy.c stable/8/sys/dev/mii/ip1000phy.c stable/8/sys/dev/mii/jmphy.c stable/8/sys/dev/mii/lxtphy.c stable/8/sys/dev/mii/mii_physubr.c stable/8/sys/dev/mii/mlphy.c stable/8/sys/dev/mii/nsgphy.c stable/8/sys/dev/mii/nsphy.c stable/8/sys/dev/mii/nsphyter.c stable/8/sys/dev/mii/pnaphy.c stable/8/sys/dev/mii/qsphy.c stable/8/sys/dev/mii/rgephy.c stable/8/sys/dev/mii/rlphy.c stable/8/sys/dev/mii/rlswitch.c stable/8/sys/dev/mii/ruephy.c stable/8/sys/dev/mii/smcphy.c stable/8/sys/dev/mii/tdkphy.c stable/8/sys/dev/mii/truephy.c stable/8/sys/dev/mii/ukphy.c stable/8/sys/dev/mii/xmphy.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/dc/dcphy.c ============================================================================== --- stable/8/sys/dev/dc/dcphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/dc/dcphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/dc/pnphy.c ============================================================================== --- stable/8/sys/dev/dc/pnphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/dc/pnphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/acphy.c ============================================================================== --- stable/8/sys/dev/mii/acphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/acphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/amphy.c ============================================================================== --- stable/8/sys/dev/mii/amphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/amphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/atphy.c ============================================================================== --- stable/8/sys/dev/mii/atphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/atphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/axphy.c ============================================================================== --- stable/8/sys/dev/mii/axphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/axphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -96,7 +96,7 @@ axphy_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/8/sys/dev/mii/bmtphy.c ============================================================================== --- stable/8/sys/dev/mii/bmtphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/bmtphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/brgphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/ciphy.c ============================================================================== --- stable/8/sys/dev/mii/ciphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/ciphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -115,7 +115,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/8/sys/dev/mii/e1000phy.c ============================================================================== --- stable/8/sys/dev/mii/e1000phy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/e1000phy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -141,7 +141,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/8/sys/dev/mii/exphy.c ============================================================================== --- stable/8/sys/dev/mii/exphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/exphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/gentbi.c ============================================================================== --- stable/8/sys/dev/mii/gentbi.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/gentbi.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/icsphy.c ============================================================================== --- stable/8/sys/dev/mii/icsphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/icsphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/inphy.c ============================================================================== --- stable/8/sys/dev/mii/inphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/inphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/ip1000phy.c ============================================================================== --- stable/8/sys/dev/mii/ip1000phy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/ip1000phy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/jmphy.c ============================================================================== --- stable/8/sys/dev/mii/jmphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/jmphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/lxtphy.c ============================================================================== --- stable/8/sys/dev/mii/lxtphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/lxtphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/mii_physubr.c ============================================================================== --- stable/8/sys/dev/mii/mii_physubr.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/mii_physubr.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/mlphy.c ============================================================================== --- stable/8/sys/dev/mii/mlphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/mlphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/nsgphy.c ============================================================================== --- stable/8/sys/dev/mii/nsgphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/nsgphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/nsphy.c ============================================================================== --- stable/8/sys/dev/mii/nsphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/nsphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/nsphyter.c ============================================================================== --- stable/8/sys/dev/mii/nsphyter.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/nsphyter.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/pnaphy.c ============================================================================== --- stable/8/sys/dev/mii/pnaphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/pnaphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/qsphy.c ============================================================================== --- stable/8/sys/dev/mii/qsphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/qsphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/rgephy.c ============================================================================== --- stable/8/sys/dev/mii/rgephy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/rgephy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/rlphy.c ============================================================================== --- stable/8/sys/dev/mii/rlphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/rlphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/rlswitch.c ============================================================================== --- stable/8/sys/dev/mii/rlswitch.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/rlswitch.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/ruephy.c ============================================================================== --- stable/8/sys/dev/mii/ruephy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/ruephy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/smcphy.c ============================================================================== --- stable/8/sys/dev/mii/smcphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/smcphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -102,7 +102,7 @@ smcphy_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/8/sys/dev/mii/tdkphy.c ============================================================================== --- stable/8/sys/dev/mii/tdkphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/tdkphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/truephy.c ============================================================================== --- stable/8/sys/dev/mii/truephy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/truephy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -150,7 +150,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/8/sys/dev/mii/ukphy.c ============================================================================== --- stable/8/sys/dev/mii/ukphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/ukphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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/8/sys/dev/mii/xmphy.c ============================================================================== --- stable/8/sys/dev/mii/xmphy.c Sun Oct 17 12:16:38 2010 (r213959) +++ stable/8/sys/dev/mii/xmphy.c Sun Oct 17 12:29:57 2010 (r213960) @@ -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@FreeBSD.ORG Sun Oct 17 12:30:05 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 12:33:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 322C1106564A; 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 1F4F98FC13; 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 o9HCXGdU030463; 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 o9HCXGp4030461; Sun, 17 Oct 2010 12:33:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171233.o9HCXGp4030461@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-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213962 - stable/8/sys/dev/mii X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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: 213962 URL: http://svn.freebsd.org/changeset/base/213962 Log: MFC: r213361 Try to adhere to style(9) and be consistent within this file. Modified: stable/8/sys/dev/mii/mii.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/mii.c ============================================================================== --- stable/8/sys/dev/mii/mii.c Sun Oct 17 12:30:01 2010 (r213961) +++ stable/8/sys/dev/mii/mii.c Sun Oct 17 12:33:15 2010 (r213962) @@ -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 @@ -180,7 +180,7 @@ miibus_attach(device_t dev) ivars->ifmedia_sts); bus_generic_attach(dev); - return(0); + return (0); } int @@ -193,7 +193,7 @@ miibus_detach(device_t dev) ifmedia_removeall(&mii->mii_media); mii->mii_ifp = NULL; - return(0); + return (0); } static int @@ -214,10 +214,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); } @@ -225,8 +227,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); } @@ -236,7 +240,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 @@ -245,7 +249,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 @@ -266,7 +270,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 @@ -308,13 +311,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 @@ -335,7 +336,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 @@ -345,12 +346,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); } /* @@ -382,7 +383,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); } /* @@ -397,7 +398,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@FreeBSD.ORG Sun Oct 17 12:33:16 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 12:34:20 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 12:43:16 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 12:47:08 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 13:06:18 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 13:07:35 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 13:10:22 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 13:11:46 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 13:13:13 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 13:13:13 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D2F6106566B; 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 4A2668FC1E; 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 o9HDDD2T032017; Sun, 17 Oct 2010 13:13:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HDDDnE032015; Sun, 17 Oct 2010 13:13:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171313.o9HDDDnE032015@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 13:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213972 - stable/8/sys/sun4v/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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:13 2010 New Revision: 213972 URL: http://svn.freebsd.org/changeset/base/213972 Log: MFC: r213575 Just use the sparc64 version of this header rather than duplicating it. Modified: stable/8/sys/sun4v/include/endian.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sun4v/include/endian.h ============================================================================== --- stable/8/sys/sun4v/include/endian.h Sun Oct 17 13:13:12 2010 (r213971) +++ stable/8/sys/sun4v/include/endian.h Sun Oct 17 13:13:13 2010 (r213972) @@ -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@FreeBSD.ORG Sun Oct 17 13:41:09 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E5D41065673; Sun, 17 Oct 2010 13:41:09 +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 613D18FC0A; Sun, 17 Oct 2010 13:41:09 +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 o9HDf9mp032839; Sun, 17 Oct 2010 13:41:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HDf9q0032837; Sun, 17 Oct 2010 13:41:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171341.o9HDf9q0032837@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 13:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213973 - stable/8/sys/sparc64/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 13:41:09 -0000 Author: marius Date: Sun Oct 17 13:41:09 2010 New Revision: 213973 URL: http://svn.freebsd.org/changeset/base/213973 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/8/sys/sparc64/include/endian.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/endian.h ============================================================================== --- stable/8/sys/sparc64/include/endian.h Sun Oct 17 13:13:13 2010 (r213972) +++ stable/8/sys/sparc64/include/endian.h Sun Oct 17 13:41:09 2010 (r213973) @@ -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@FreeBSD.ORG Sun Oct 17 13:41:13 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 13:47:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2FFB1065670; Sun, 17 Oct 2010 13:47:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0A888FC1B; Sun, 17 Oct 2010 13:47:03 +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 o9HDl3kX033073; Sun, 17 Oct 2010 13:47:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HDl3P7033071; Sun, 17 Oct 2010 13:47:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010171347.o9HDl3P7033071@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 17 Oct 2010 13:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213975 - stable/8/sys/compat/linux X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 13:47:03 -0000 Author: kib Date: Sun Oct 17 13:47:03 2010 New Revision: 213975 URL: http://svn.freebsd.org/changeset/base/213975 Log: MFC r213846: Remove stale comment. Modified: stable/8/sys/compat/linux/linux_util.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/compat/linux/linux_util.h ============================================================================== --- stable/8/sys/compat/linux/linux_util.h Sun Oct 17 13:41:12 2010 (r213974) +++ stable/8/sys/compat/linux/linux_util.h Sun Oct 17 13:47:03 2010 (r213975) @@ -31,11 +31,6 @@ * $FreeBSD$ */ -/* - * This file is pretty much the same as Christos' svr4_util.h - * (for now). - */ - #ifndef _LINUX_UTIL_H_ #define _LINUX_UTIL_H_ From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 14:25:01 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sun Oct 17 14:25:55 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89366106564A; Sun, 17 Oct 2010 14:25:55 +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 7676F8FC1C; Sun, 17 Oct 2010 14:25:55 +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 o9HEPt8Q034139; Sun, 17 Oct 2010 14:25:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HEPtRp034137; Sun, 17 Oct 2010 14:25:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201010171425.o9HEPtRp034137@svn.freebsd.org> From: Marius Strobl Date: Sun, 17 Oct 2010 14:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213977 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 14:25:55 -0000 Author: marius Date: Sun Oct 17 14:25:55 2010 New Revision: 213977 URL: http://svn.freebsd.org/changeset/base/213977 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/8/sys/sparc64/sparc64/mp_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_machdep.c Sun Oct 17 14:25:01 2010 (r213976) +++ stable/8/sys/sparc64/sparc64/mp_machdep.c Sun Oct 17 14:25:55 2010 (r213977) @@ -431,6 +431,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(); @@ -443,7 +449,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@FreeBSD.ORG Sun Oct 17 14:48:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63B6D1065693; Sun, 17 Oct 2010 14:48:53 +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 511848FC24; Sun, 17 Oct 2010 14:48:53 +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 o9HEmrGN034970; Sun, 17 Oct 2010 14:48:53 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HEmrUw034968; Sun, 17 Oct 2010 14:48:53 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201010171448.o9HEmrUw034968@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 17 Oct 2010 14:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213978 - stable/8/sbin/mount X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 14:48:53 -0000 Author: jh Date: Sun Oct 17 14:48:53 2010 New Revision: 213978 URL: http://svn.freebsd.org/changeset/base/213978 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/8/sbin/mount/mount.c Directory Properties: stable/8/sbin/mount/ (props changed) Modified: stable/8/sbin/mount/mount.c ============================================================================== --- stable/8/sbin/mount/mount.c Sun Oct 17 14:25:55 2010 (r213977) +++ stable/8/sbin/mount/mount.c Sun Oct 17 14:48:53 2010 (r213978) @@ -850,10 +850,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) { @@ -861,10 +869,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" : "", @@ -876,13 +880,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@FreeBSD.ORG Sun Oct 17 15:23:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33AF6106564A; Sun, 17 Oct 2010 15:23:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ECBE8FC0C; Sun, 17 Oct 2010 15:23:00 +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 o9HFN0G2035908; Sun, 17 Oct 2010 15:23:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HFN0oR035900; Sun, 17 Oct 2010 15:23:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201010171523.o9HFN0oR035900@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 17 Oct 2010 15:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213979 - in stable/8/sys/powerpc: aim include powerpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 15:23:00 -0000 Author: nwhitehorn Date: Sun Oct 17 15:22:59 2010 New Revision: 213979 URL: http://svn.freebsd.org/changeset/base/213979 Log: MFC r213307,213335: Add support for memory attributes (pmap_mapdev_attr() and friends) on PowerPC/AIM. This is currently stubbed out on Book-E, since I have no idea how to implement it there. Modified: stable/8/sys/powerpc/aim/mmu_oea.c stable/8/sys/powerpc/aim/mmu_oea64.c stable/8/sys/powerpc/include/pmap.h stable/8/sys/powerpc/include/vm.h stable/8/sys/powerpc/powerpc/bus_machdep.c stable/8/sys/powerpc/powerpc/mmu_if.m stable/8/sys/powerpc/powerpc/pmap_dispatch.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea.c Sun Oct 17 14:48:53 2010 (r213978) +++ stable/8/sys/powerpc/aim/mmu_oea.c Sun Oct 17 15:22:59 2010 (r213979) @@ -221,8 +221,6 @@ u_int moea_pteg_mask; struct pvo_head *moea_pvo_table; /* pvo entries by pteg index */ struct pvo_head moea_pvo_kunmanaged = LIST_HEAD_INITIALIZER(moea_pvo_kunmanaged); /* list of unmanaged pages */ -struct pvo_head moea_pvo_unmanaged = - LIST_HEAD_INITIALIZER(moea_pvo_unmanaged); /* list of unmanaged pages */ uma_zone_t moea_upvo_zone; /* zone for pvo entries for unmanaged pages */ uma_zone_t moea_mpvo_zone; /* zone for pvo entries for managed pages */ @@ -327,9 +325,12 @@ void moea_deactivate(mmu_t, struct threa void moea_cpu_bootstrap(mmu_t, int); void moea_bootstrap(mmu_t, vm_offset_t, vm_offset_t); void *moea_mapdev(mmu_t, vm_offset_t, vm_size_t); +void *moea_mapdev_attr(mmu_t, vm_offset_t, vm_size_t, vm_memattr_t); void moea_unmapdev(mmu_t, vm_offset_t, vm_size_t); vm_offset_t moea_kextract(mmu_t, vm_offset_t); +void moea_kenter_attr(mmu_t, vm_offset_t, vm_offset_t, vm_memattr_t); void moea_kenter(mmu_t, vm_offset_t, vm_offset_t); +void moea_page_set_memattr(mmu_t mmu, vm_page_t m, vm_memattr_t ma); boolean_t moea_dev_direct_mapped(mmu_t, vm_offset_t, vm_size_t); static void moea_sync_icache(mmu_t, pmap_t, vm_offset_t, vm_size_t); @@ -364,14 +365,17 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_zero_page_idle, moea_zero_page_idle), MMUMETHOD(mmu_activate, moea_activate), MMUMETHOD(mmu_deactivate, moea_deactivate), + MMUMETHOD(mmu_page_set_memattr, moea_page_set_memattr), /* Internal interfaces */ MMUMETHOD(mmu_bootstrap, moea_bootstrap), MMUMETHOD(mmu_cpu_bootstrap, moea_cpu_bootstrap), + MMUMETHOD(mmu_mapdev_attr, moea_mapdev_attr), MMUMETHOD(mmu_mapdev, moea_mapdev), MMUMETHOD(mmu_unmapdev, moea_unmapdev), MMUMETHOD(mmu_kextract, moea_kextract), MMUMETHOD(mmu_kenter, moea_kenter), + MMUMETHOD(mmu_kenter_attr, moea_kenter_attr), MMUMETHOD(mmu_dev_direct_mapped,moea_dev_direct_mapped), { 0, 0 } @@ -384,6 +388,41 @@ static mmu_def_t oea_mmu = { }; MMU_DEF(oea_mmu); +static __inline uint32_t +moea_calc_wimg(vm_offset_t pa, vm_memattr_t ma) +{ + uint32_t pte_lo; + int i; + + if (ma != VM_MEMATTR_DEFAULT) { + switch (ma) { + case VM_MEMATTR_UNCACHEABLE: + return (PTE_I | PTE_G); + case VM_MEMATTR_WRITE_COMBINING: + case VM_MEMATTR_WRITE_BACK: + case VM_MEMATTR_PREFETCHABLE: + return (PTE_I); + case VM_MEMATTR_WRITE_THROUGH: + return (PTE_W | PTE_M); + } + } + + /* + * Assume the page is cache inhibited and access is guarded unless + * it's in our available memory array. + */ + pte_lo = PTE_I | PTE_G; + for (i = 0; i < pregions_sz; i++) { + if ((pa >= pregions[i].mr_start) && + (pa < (pregions[i].mr_start + pregions[i].mr_size))) { + pte_lo = PTE_M; + break; + } + } + + return pte_lo; +} + static void tlbie(vm_offset_t va) { @@ -425,22 +464,6 @@ va_to_pteg(u_int sr, vm_offset_t addr) } static __inline struct pvo_head * -pa_to_pvoh(vm_offset_t pa, vm_page_t *pg_p) -{ - struct vm_page *pg; - - pg = PHYS_TO_VM_PAGE(pa); - - if (pg_p != NULL) - *pg_p = pg; - - if (pg == NULL) - return (&moea_pvo_unmanaged); - - return (&pg->md.mdpg_pvoh); -} - -static __inline struct pvo_head * vm_page_to_pvoh(vm_page_t m) { @@ -881,6 +904,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k struct vm_page m; m.phys_addr = translations[i].om_pa + off; + m.md.mdpg_cache_attrs = VM_MEMATTR_DEFAULT; PMAP_LOCK(&ofw_pmap); moea_enter_locked(&ofw_pmap, translations[i].om_va + off, &m, @@ -1087,7 +1111,7 @@ moea_enter_locked(pmap_t pmap, vm_offset struct pvo_head *pvo_head; uma_zone_t zone; vm_page_t pg; - u_int pte_lo, pvo_flags, was_exec, i; + u_int pte_lo, pvo_flags, was_exec; int error; if (!moea_initialized) { @@ -1126,19 +1150,7 @@ moea_enter_locked(pmap_t pmap, vm_offset } } - /* - * Assume the page is cache inhibited and access is guarded unless - * it's in our available memory array. - */ - pte_lo = PTE_I | PTE_G; - for (i = 0; i < pregions_sz; i++) { - if ((VM_PAGE_TO_PHYS(m) >= pregions[i].mr_start) && - (VM_PAGE_TO_PHYS(m) < - (pregions[i].mr_start + pregions[i].mr_size))) { - pte_lo = PTE_M; - break; - } - } + pte_lo = moea_calc_wimg(VM_PAGE_TO_PHYS(m), pmap_page_get_memattr(m)); if (prot & VM_PROT_WRITE) { pte_lo |= PTE_BW; @@ -1371,14 +1383,60 @@ moea_ts_referenced(mmu_t mmu, vm_page_t } /* + * Modify the WIMG settings of all mappings for a page. + */ +void +moea_page_set_memattr(mmu_t mmu, vm_page_t m, vm_memattr_t ma) +{ + struct pvo_entry *pvo; + struct pvo_head *pvo_head; + struct pte *pt; + pmap_t pmap; + u_int lo; + + if (m->flags & PG_FICTITIOUS) { + m->md.mdpg_cache_attrs = ma; + return; + } + + vm_page_lock_queues(); + pvo_head = vm_page_to_pvoh(m); + lo = moea_calc_wimg(VM_PAGE_TO_PHYS(m), ma); + + LIST_FOREACH(pvo, pvo_head, pvo_vlink) { + pmap = pvo->pvo_pmap; + PMAP_LOCK(pmap); + pt = moea_pvo_to_pte(pvo, -1); + pvo->pvo_pte.pte.pte_lo &= ~PTE_WIMG; + pvo->pvo_pte.pte.pte_lo |= lo; + if (pt != NULL) { + moea_pte_change(pt, &pvo->pvo_pte.pte, + pvo->pvo_vaddr); + if (pvo->pvo_pmap == kernel_pmap) + isync(); + } + mtx_unlock(&moea_table_mutex); + PMAP_UNLOCK(pmap); + } + m->md.mdpg_cache_attrs = ma; + vm_page_unlock_queues(); +} + +/* * Map a wired page into kernel virtual address space. */ void moea_kenter(mmu_t mmu, vm_offset_t va, vm_offset_t pa) { + + moea_kenter_attr(mmu, va, pa, VM_MEMATTR_DEFAULT); +} + +void +moea_kenter_attr(mmu_t mmu, vm_offset_t va, vm_offset_t pa, vm_memattr_t ma) +{ u_int pte_lo; int error; - int i; #if 0 if (va < VM_MIN_KERNEL_ADDRESS) @@ -1386,14 +1444,7 @@ moea_kenter(mmu_t mmu, vm_offset_t va, v va); #endif - pte_lo = PTE_I | PTE_G; - for (i = 0; i < pregions_sz; i++) { - if ((pa >= pregions[i].mr_start) && - (pa < (pregions[i].mr_start + pregions[i].mr_size))) { - pte_lo = PTE_M; - break; - } - } + pte_lo = moea_calc_wimg(pa, ma); PMAP_LOCK(kernel_pmap); error = moea_pvo_enter(kernel_pmap, moea_upvo_zone, @@ -2382,6 +2433,13 @@ moea_dev_direct_mapped(mmu_t mmu, vm_off void * moea_mapdev(mmu_t mmu, vm_offset_t pa, vm_size_t size) { + + return (moea_mapdev_attr(mmu, pa, size, VM_MEMATTR_DEFAULT)); +} + +void * +moea_mapdev_attr(mmu_t mmu, vm_offset_t pa, vm_size_t size, vm_memattr_t ma) +{ vm_offset_t va, tmpva, ppa, offset; int i; @@ -2404,7 +2462,7 @@ moea_mapdev(mmu_t mmu, vm_offset_t pa, v panic("moea_mapdev: Couldn't alloc kernel virtual memory"); for (tmpva = va; size > 0;) { - moea_kenter(mmu, tmpva, ppa); + moea_kenter_attr(mmu, tmpva, ppa, ma); tlbie(tmpva); size -= PAGE_SIZE; tmpva += PAGE_SIZE; Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sun Oct 17 14:48:53 2010 (r213978) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sun Oct 17 15:22:59 2010 (r213979) @@ -290,11 +290,8 @@ u_int moea64_pteg_mask; * PVO data. */ struct pvo_head *moea64_pvo_table; /* pvo entries by pteg index */ -/* lists of unmanaged pages */ -struct pvo_head moea64_pvo_kunmanaged = +struct pvo_head moea64_pvo_kunmanaged = /* list of unmanaged pages */ LIST_HEAD_INITIALIZER(moea64_pvo_kunmanaged); -struct pvo_head moea64_pvo_unmanaged = - LIST_HEAD_INITIALIZER(moea64_pvo_unmanaged); uma_zone_t moea64_upvo_zone; /* zone for pvo entries for unmanaged pages */ uma_zone_t moea64_mpvo_zone; /* zone for pvo entries for managed pages */ @@ -399,8 +396,11 @@ void moea64_zero_page_idle(mmu_t, vm_pag void moea64_activate(mmu_t, struct thread *); void moea64_deactivate(mmu_t, struct thread *); void *moea64_mapdev(mmu_t, vm_offset_t, vm_size_t); +void *moea64_mapdev_attr(mmu_t, vm_offset_t, vm_size_t, vm_memattr_t); void moea64_unmapdev(mmu_t, vm_offset_t, vm_size_t); vm_offset_t moea64_kextract(mmu_t, vm_offset_t); +void moea64_page_set_memattr(mmu_t, vm_page_t m, vm_memattr_t ma); +void moea64_kenter_attr(mmu_t, vm_offset_t, vm_offset_t, vm_memattr_t ma); void moea64_kenter(mmu_t, vm_offset_t, vm_offset_t); boolean_t moea64_dev_direct_mapped(mmu_t, vm_offset_t, vm_size_t); static void moea64_sync_icache(mmu_t, pmap_t, vm_offset_t, vm_size_t); @@ -436,14 +436,17 @@ static mmu_method_t moea64_bridge_method MMUMETHOD(mmu_zero_page_idle, moea64_zero_page_idle), MMUMETHOD(mmu_activate, moea64_activate), MMUMETHOD(mmu_deactivate, moea64_deactivate), + MMUMETHOD(mmu_page_set_memattr, moea64_page_set_memattr), /* Internal interfaces */ MMUMETHOD(mmu_bootstrap, moea64_bridge_bootstrap), MMUMETHOD(mmu_cpu_bootstrap, moea64_bridge_cpu_bootstrap), MMUMETHOD(mmu_mapdev, moea64_mapdev), + MMUMETHOD(mmu_mapdev_attr, moea64_mapdev_attr), MMUMETHOD(mmu_unmapdev, moea64_unmapdev), MMUMETHOD(mmu_kextract, moea64_kextract), MMUMETHOD(mmu_kenter, moea64_kenter), + MMUMETHOD(mmu_kenter_attr, moea64_kenter_attr), MMUMETHOD(mmu_dev_direct_mapped,moea64_dev_direct_mapped), { 0, 0 } @@ -467,22 +470,6 @@ va_to_pteg(uint64_t vsid, vm_offset_t ad } static __inline struct pvo_head * -pa_to_pvoh(vm_offset_t pa, vm_page_t *pg_p) -{ - struct vm_page *pg; - - pg = PHYS_TO_VM_PAGE(pa); - - if (pg_p != NULL) - *pg_p = pg; - - if (pg == NULL) - return (&moea64_pvo_unmanaged); - - return (&pg->md.mdpg_pvoh); -} - -static __inline struct pvo_head * vm_page_to_pvoh(vm_page_t m) { @@ -608,11 +595,24 @@ moea64_pte_change(struct lpte *pt, struc } static __inline uint64_t -moea64_calc_wimg(vm_offset_t pa) +moea64_calc_wimg(vm_offset_t pa, vm_memattr_t ma) { uint64_t pte_lo; int i; + if (ma != VM_MEMATTR_DEFAULT) { + switch (ma) { + case VM_MEMATTR_UNCACHEABLE: + return (LPTE_I | LPTE_G); + case VM_MEMATTR_WRITE_COMBINING: + case VM_MEMATTR_WRITE_BACK: + case VM_MEMATTR_PREFETCHABLE: + return (LPTE_I); + case VM_MEMATTR_WRITE_THROUGH: + return (LPTE_W | LPTE_M); + } + } + /* * Assume the page is cache inhibited and access is guarded unless * it's in our available memory array. @@ -1112,7 +1112,7 @@ void moea64_set_scratchpage_pa(int which moea64_scratchpage_pte[which]->pte_lo &= ~(LPTE_WIMG | LPTE_RPGN); moea64_scratchpage_pte[which]->pte_lo |= - moea64_calc_wimg(pa) | (uint64_t)pa; + moea64_calc_wimg(pa, VM_MEMATTR_DEFAULT) | (uint64_t)pa; EIEIO(); moea64_scratchpage_pte[which]->pte_hi |= LPTE_VALID; @@ -1243,7 +1243,7 @@ moea64_enter_locked(pmap_t pmap, vm_offs zone = moea64_upvo_zone; } - pte_lo = moea64_calc_wimg(VM_PAGE_TO_PHYS(m)); + pte_lo = moea64_calc_wimg(VM_PAGE_TO_PHYS(m), pmap_page_get_memattr(m)); if (prot & VM_PROT_WRITE) { pte_lo |= LPTE_BW; @@ -1560,22 +1560,55 @@ moea64_ts_referenced(mmu_t mmu, vm_page_ } /* + * Modify the WIMG settings of all mappings for a page. + */ +void +moea64_page_set_memattr(mmu_t mmu, vm_page_t m, vm_memattr_t ma) +{ + struct pvo_entry *pvo; + struct pvo_head *pvo_head; + struct lpte *pt; + pmap_t pmap; + uint64_t lo; + + if (m->flags & PG_FICTITIOUS) { + m->md.mdpg_cache_attrs = ma; + return; + } + + vm_page_lock_queues(); + pvo_head = vm_page_to_pvoh(m); + lo = moea64_calc_wimg(VM_PAGE_TO_PHYS(m), ma); + LIST_FOREACH(pvo, pvo_head, pvo_vlink) { + pmap = pvo->pvo_pmap; + PMAP_LOCK(pmap); + LOCK_TABLE(); + pt = moea64_pvo_to_pte(pvo, -1); + pvo->pvo_pte.lpte.pte_lo &= ~LPTE_WIMG; + pvo->pvo_pte.lpte.pte_lo |= lo; + if (pt != NULL) { + moea64_pte_change(pt, &pvo->pvo_pte.lpte, + pvo->pvo_pmap, PVO_VADDR(pvo)); + if (pvo->pvo_pmap == kernel_pmap) + isync(); + } + UNLOCK_TABLE(); + PMAP_UNLOCK(pmap); + } + m->md.mdpg_cache_attrs = ma; + vm_page_unlock_queues(); +} + +/* * Map a wired page into kernel virtual address space. */ void -moea64_kenter(mmu_t mmu, vm_offset_t va, vm_offset_t pa) +moea64_kenter_attr(mmu_t mmu, vm_offset_t va, vm_offset_t pa, vm_memattr_t ma) { uint64_t pte_lo; int error; -#if 0 - if (!pmap_bootstrapped) { - if (va >= VM_MIN_KERNEL_ADDRESS && va < virtual_end) - panic("Trying to enter an address in KVA -- %#x!\n",pa); - } -#endif - - pte_lo = moea64_calc_wimg(pa); + pte_lo = moea64_calc_wimg(pa, ma); PMAP_LOCK(kernel_pmap); error = moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, @@ -1595,6 +1628,13 @@ moea64_kenter(mmu_t mmu, vm_offset_t va, PMAP_UNLOCK(kernel_pmap); } +void +moea64_kenter(mmu_t mmu, vm_offset_t va, vm_offset_t pa) +{ + + moea64_kenter_attr(mmu, va, pa, VM_MEMATTR_DEFAULT); +} + /* * Extract the physical page address associated with the given kernel virtual * address. @@ -2477,7 +2517,7 @@ moea64_dev_direct_mapped(mmu_t mmu, vm_o * NOT real memory. */ void * -moea64_mapdev(mmu_t mmu, vm_offset_t pa, vm_size_t size) +moea64_mapdev_attr(mmu_t mmu, vm_offset_t pa, vm_size_t size, vm_memattr_t ma) { vm_offset_t va, tmpva, ppa, offset; @@ -2491,7 +2531,7 @@ moea64_mapdev(mmu_t mmu, vm_offset_t pa, panic("moea64_mapdev: Couldn't alloc kernel virtual memory"); for (tmpva = va; size > 0;) { - moea64_kenter(mmu, tmpva, ppa); + moea64_kenter_attr(mmu, tmpva, ppa, ma); size -= PAGE_SIZE; tmpva += PAGE_SIZE; ppa += PAGE_SIZE; @@ -2500,6 +2540,13 @@ moea64_mapdev(mmu_t mmu, vm_offset_t pa, return ((void *)(va + offset)); } +void * +moea64_mapdev(mmu_t mmu, vm_offset_t pa, vm_size_t size) +{ + + return moea64_mapdev_attr(mmu, pa, size, VM_MEMATTR_DEFAULT); +} + void moea64_unmapdev(mmu_t mmu, vm_offset_t va, vm_size_t size) { Modified: stable/8/sys/powerpc/include/pmap.h ============================================================================== --- stable/8/sys/powerpc/include/pmap.h Sun Oct 17 14:48:53 2010 (r213978) +++ stable/8/sys/powerpc/include/pmap.h Sun Oct 17 15:22:59 2010 (r213979) @@ -109,13 +109,13 @@ struct pvo_entry { LIST_HEAD(pvo_head, pvo_entry); struct md_page { - u_int64_t mdpg_attrs; + u_int64_t mdpg_attrs; + vm_memattr_t mdpg_cache_attrs; struct pvo_head mdpg_pvoh; }; -#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT +#define pmap_page_get_memattr(m) ((m)->md.mdpg_cache_attrs) #define pmap_page_is_mapped(m) (!LIST_EMPTY(&(m)->md.mdpg_pvoh)) -#define pmap_page_set_memattr(m, ma) (void)0 #else @@ -147,7 +147,6 @@ struct md_page { #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) -#define pmap_page_set_memattr(m, ma) (void)0 #endif /* AIM */ @@ -169,9 +168,12 @@ extern struct pmap kernel_pmap_store; void pmap_bootstrap(vm_offset_t, vm_offset_t); void pmap_kenter(vm_offset_t va, vm_offset_t pa); +void pmap_kenter_attr(vm_offset_t va, vm_offset_t pa, vm_memattr_t); void pmap_kremove(vm_offset_t); void *pmap_mapdev(vm_offset_t, vm_size_t); +void *pmap_mapdev_attr(vm_offset_t, vm_size_t, vm_memattr_t); void pmap_unmapdev(vm_offset_t, vm_size_t); +void pmap_page_set_memattr(vm_page_t, vm_memattr_t); void pmap_deactivate(struct thread *); vm_offset_t pmap_kextract(vm_offset_t); int pmap_dev_direct_mapped(vm_offset_t, vm_size_t); Modified: stable/8/sys/powerpc/include/vm.h ============================================================================== --- stable/8/sys/powerpc/include/vm.h Sun Oct 17 14:48:53 2010 (r213978) +++ stable/8/sys/powerpc/include/vm.h Sun Oct 17 15:22:59 2010 (r213979) @@ -32,11 +32,13 @@ #include /* Memory attributes. */ -#define VM_MEMATTR_CACHING_INHIBIT ((vm_memattr_t)PTE_I) -#define VM_MEMATTR_GUARD ((vm_memattr_t)PTE_G) -#define VM_MEMATTR_MEMORY_COHERENCE ((vm_memattr_t)PTE_M) -#define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)PTE_W) - #define VM_MEMATTR_DEFAULT 0 +#define VM_MEMATTR_UNCACHEABLE 0x01 +#define VM_MEMATTR_UNCACHED VM_MEMATTR_UNCACHEABLE +#define VM_MEMATTR_CACHEABLE 0x02 +#define VM_MEMATTR_WRITE_COMBINING 0x04 +#define VM_MEMATTR_WRITE_BACK 0x08 +#define VM_MEMATTR_WRITE_THROUGH 0x10 +#define VM_MEMATTR_PREFETCHABLE 0x20 #endif /* !_MACHINE_VM_H_ */ Modified: stable/8/sys/powerpc/powerpc/bus_machdep.c ============================================================================== --- stable/8/sys/powerpc/powerpc/bus_machdep.c Sun Oct 17 14:48:53 2010 (r213978) +++ stable/8/sys/powerpc/powerpc/bus_machdep.c Sun Oct 17 15:22:59 2010 (r213979) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); static struct { bus_addr_t addr; bus_size_t size; + int flags; } earlyboot_mappings[MAX_EARLYBOOT_MAPPINGS]; static int earlyboot_map_idx = 0; @@ -72,9 +73,11 @@ __ppc_ba(bus_space_handle_t bsh, bus_siz } static int -bs_gen_map(bus_addr_t addr, bus_size_t size __unused, int flags __unused, +bs_gen_map(bus_addr_t addr, bus_size_t size, int flags, bus_space_handle_t *bshp) { + vm_memattr_t ma; + /* * Record what we did if we haven't enabled the MMU yet. We * will need to remap it as soon as the MMU comes up. @@ -84,10 +87,20 @@ bs_gen_map(bus_addr_t addr, bus_size_t s ("%s: too many early boot mapping requests", __func__)); earlyboot_mappings[earlyboot_map_idx].addr = addr; earlyboot_mappings[earlyboot_map_idx].size = size; + earlyboot_mappings[earlyboot_map_idx].flags = flags; earlyboot_map_idx++; *bshp = addr; } else { - *bshp = (bus_space_handle_t)pmap_mapdev(addr,size); + ma = VM_MEMATTR_DEFAULT; + switch (flags) { + case BUS_SPACE_MAP_CACHEABLE: + ma = VM_MEMATTR_CACHEABLE; + break; + case BUS_SPACE_MAP_PREFETCHABLE: + ma = VM_MEMATTR_PREFETCHABLE; + break; + } + *bshp = (bus_space_handle_t)pmap_mapdev_attr(addr, size, ma); } return (0); @@ -98,6 +111,7 @@ bs_remap_earlyboot(void) { int i; vm_offset_t pa, spa; + vm_memattr_t ma; if (hw_direct_map) return; @@ -105,9 +119,19 @@ bs_remap_earlyboot(void) for (i = 0; i < earlyboot_map_idx; i++) { spa = earlyboot_mappings[i].addr; + ma = VM_MEMATTR_DEFAULT; + switch (earlyboot_mappings[i].flags) { + case BUS_SPACE_MAP_CACHEABLE: + ma = VM_MEMATTR_CACHEABLE; + break; + case BUS_SPACE_MAP_PREFETCHABLE: + ma = VM_MEMATTR_PREFETCHABLE; + break; + } + pa = trunc_page(spa); while (pa < spa + earlyboot_mappings[i].size) { - pmap_kenter(pa,pa); + pmap_kenter_attr(pa, pa, ma); pa += PAGE_SIZE; } } Modified: stable/8/sys/powerpc/powerpc/mmu_if.m ============================================================================== --- stable/8/sys/powerpc/powerpc/mmu_if.m Sun Oct 17 14:48:53 2010 (r213978) +++ stable/8/sys/powerpc/powerpc/mmu_if.m Sun Oct 17 15:22:59 2010 (r213979) @@ -110,6 +110,24 @@ CODE { { return (NULL); } + + static void *mmu_null_mapdev_attr(mmu_t mmu, vm_offset_t pa, + vm_size_t size, vm_memattr_t ma) + { + return MMU_MAPDEV(mmu, pa, size); + } + + static void mmu_null_kenter_attr(mmu_t mmu, vm_offset_t va, + vm_offset_t pa, vm_memattr_t ma) + { + MMU_KENTER(mmu, va, pa); + } + + static void mmu_null_page_set_memattr(mmu_t mmu, vm_page_t m, + vm_memattr_t ma) + { + return; + } }; @@ -732,6 +750,37 @@ METHOD void * mapdev { vm_size_t _size; }; +/** + * @brief Create a kernel mapping for a given physical address range. + * Called by bus code on behalf of device drivers. The mapping does not + * have to be a virtual address: it can be a direct-mapped physical address + * if that is supported by the MMU. + * + * @param _pa start physical address + * @param _size size in bytes of mapping + * @param _attr cache attributes + * + * @retval addr address of mapping. + */ +METHOD void * mapdev_attr { + mmu_t _mmu; + vm_offset_t _pa; + vm_size_t _size; + vm_memattr_t _attr; +} DEFAULT mmu_null_mapdev_attr; + +/** + * @brief Change cache control attributes for a page. Should modify all + * mappings for that page. + * + * @param _m page to modify + * @param _ma new cache control attributes + */ +METHOD void page_set_memattr { + mmu_t _mmu; + vm_page_t _pg; + vm_memattr_t _ma; +} DEFAULT mmu_null_page_set_memattr; /** * @brief Remove the mapping created by mapdev. Called when a driver @@ -772,6 +821,19 @@ METHOD void kenter { vm_offset_t _pa; }; +/** + * @brief Map a wired page into kernel virtual address space + * + * @param _va mapping virtual address + * @param _pa mapping physical address + * @param _ma mapping cache control attributes + */ +METHOD void kenter_attr { + mmu_t _mmu; + vm_offset_t _va; + vm_offset_t _pa; + vm_memattr_t _ma; +} DEFAULT mmu_null_kenter_attr; /** * @brief Determine if the given physical address range has been direct-mapped. Modified: stable/8/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- stable/8/sys/powerpc/powerpc/pmap_dispatch.c Sun Oct 17 14:48:53 2010 (r213978) +++ stable/8/sys/powerpc/powerpc/pmap_dispatch.c Sun Oct 17 15:22:59 2010 (r213979) @@ -425,6 +425,22 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si return (MMU_MAPDEV(mmu_obj, pa, size)); } +void * +pmap_mapdev_attr(vm_offset_t pa, vm_size_t size, vm_memattr_t attr) +{ + + CTR3(KTR_PMAP, "%s(%#x, %#x)", __func__, pa, size); + return (MMU_MAPDEV_ATTR(mmu_obj, pa, size, attr)); +} + +void +pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) +{ + + CTR3(KTR_PMAP, "%s(%#x, %#x)", __func__, pa, size); + return (MMU_PAGE_SET_MEMATTR(mmu_obj, m, ma)); +} + void pmap_unmapdev(vm_offset_t va, vm_size_t size) { @@ -449,6 +465,14 @@ pmap_kenter(vm_offset_t va, vm_offset_t MMU_KENTER(mmu_obj, va, pa); } +void +pmap_kenter_attr(vm_offset_t va, vm_offset_t pa, vm_memattr_t ma) +{ + + CTR3(KTR_PMAP, "%s(%#x, %#x)", __func__, va, pa); + MMU_KENTER_ATTR(mmu_obj, va, pa, ma); +} + boolean_t pmap_dev_direct_mapped(vm_offset_t pa, vm_size_t size) { From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 15:25:33 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D36CE106564A; Sun, 17 Oct 2010 15:25:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C08018FC0A; Sun, 17 Oct 2010 15:25: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 o9HFPX2Y036039; Sun, 17 Oct 2010 15:25:33 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HFPXTT036037; Sun, 17 Oct 2010 15:25:33 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201010171525.o9HFPXTT036037@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 17 Oct 2010 15:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213980 - stable/8/usr.sbin/ntp X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 15:25:33 -0000 Author: glebius Date: Sun Oct 17 15:25:33 2010 New Revision: 213980 URL: http://svn.freebsd.org/changeset/base/213980 Log: Merge 213831: Enable the shared memory reference clock driver. The GPS devices are getting more and more popular, as source of precise time, and the gpsd daemon from ports is using the shared memory to synchronize with ntpd. Reviewed by: roberto Modified: stable/8/usr.sbin/ntp/config.h Directory Properties: stable/8/usr.sbin/ntp/ (props changed) Modified: stable/8/usr.sbin/ntp/config.h ============================================================================== --- stable/8/usr.sbin/ntp/config.h Sun Oct 17 15:22:59 2010 (r213979) +++ stable/8/usr.sbin/ntp/config.h Sun Oct 17 15:25:33 2010 (r213980) @@ -126,7 +126,7 @@ /* #undef CLOCK_SCHMID */ /* clock thru shared memory */ -/* #undef CLOCK_SHM */ +#define CLOCK_SHM /* Spectracom 8170/Netclock/2 WWVB receiver */ /* #undef CLOCK_SPECTRACOM */ From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 15:55:46 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A0771065674; Sun, 17 Oct 2010 15:55:46 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 569188FC13; Sun, 17 Oct 2010 15:55: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 o9HFtkIN036892; Sun, 17 Oct 2010 15:55:46 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HFtkRJ036890; Sun, 17 Oct 2010 15:55:46 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201010171555.o9HFtkRJ036890@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 17 Oct 2010 15:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213982 - stable/8/sys/powerpc/powerpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 15:55:46 -0000 Author: nwhitehorn Date: Sun Oct 17 15:55:46 2010 New Revision: 213982 URL: http://svn.freebsd.org/changeset/base/213982 Log: MFC r213360: Missed some changes in the last commit required to build LINT. Modified: stable/8/sys/powerpc/powerpc/pmap_dispatch.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- stable/8/sys/powerpc/powerpc/pmap_dispatch.c Sun Oct 17 15:47:27 2010 (r213981) +++ stable/8/sys/powerpc/powerpc/pmap_dispatch.c Sun Oct 17 15:55:46 2010 (r213982) @@ -429,7 +429,7 @@ void * pmap_mapdev_attr(vm_offset_t pa, vm_size_t size, vm_memattr_t attr) { - CTR3(KTR_PMAP, "%s(%#x, %#x)", __func__, pa, size); + CTR4(KTR_PMAP, "%s(%#x, %#x, %#x)", __func__, pa, size, attr); return (MMU_MAPDEV_ATTR(mmu_obj, pa, size, attr)); } @@ -437,7 +437,7 @@ void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) { - CTR3(KTR_PMAP, "%s(%#x, %#x)", __func__, pa, size); + CTR3(KTR_PMAP, "%s(%p, %#x)", __func__, m, ma); return (MMU_PAGE_SET_MEMATTR(mmu_obj, m, ma)); } @@ -469,7 +469,7 @@ void pmap_kenter_attr(vm_offset_t va, vm_offset_t pa, vm_memattr_t ma) { - CTR3(KTR_PMAP, "%s(%#x, %#x)", __func__, va, pa); + CTR4(KTR_PMAP, "%s(%#x, %#x, %#x)", __func__, va, pa, ma); MMU_KENTER_ATTR(mmu_obj, va, pa, ma); } From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 16:43:21 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAB451065674; Sun, 17 Oct 2010 16:43:20 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C69CE8FC16; Sun, 17 Oct 2010 16:43: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 o9HGhKBX038345; Sun, 17 Oct 2010 16:43:20 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HGhKkF038338; Sun, 17 Oct 2010 16:43:20 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201010171643.o9HGhKkF038338@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 17 Oct 2010 16:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213984 - stable/8/sbin/hastd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 16:43:21 -0000 Author: pjd Date: Sun Oct 17 16:43:20 2010 New Revision: 213984 URL: http://svn.freebsd.org/changeset/base/213984 Log: MFC r213183,r213428,r213429,r213430,r213529,r213530,r213531,r213533,r213579, r213580,r213938,r213939,r213981: r213183: Plug memory leak on fork(2) failure. Submitted by: Mikolaj Golub r213428: We can't mask ignored signal, so install dummy signal hander for SIGCHLD before masking it. This fixes bogus reports about hooks running for too long and other problems related to garbage-collecting child processes. Reported by: Mikolaj Golub r213429: hook_check() is now only used to report about long-running hooks, so the argument is redundant, remove it. r213430: Decrease report interval to 5 seconds, as this also means we will check for signals every 5 seconds and not every 10 seconds as before. r213529: Don't close local component on exit as we can hang waiting on g_waitidle. I'm unable to reproduce the race described in comment anymore and also the comment is incorrect - localfd represents local component from configuration file, eg. /dev/da0 and not HAST provider. Reported by: Mikolaj Golub r213530: Start the guard thread first, so we can handle signals from the very begining. Reported by: Mikolaj Golub r213531: Log error message when we fail to destroy ggate provider. r213533: Clear ggate structures before using them. We don't initialize all the field and there can be some garbage from the stack. r213579: We close the event socketpair early in the mainloop to prevent spaming with error messages, so when we clean up after child process, we have to check if the event socketpair is still there. Submitted by: Mikolaj Golub r213580: We can't zero out ggio request, as we have some fields in there we initialize once during start-up. Reported by: Mikolaj Golub r213938: Clear signal mask before executing a hook. Submitted by: Mikolaj Golub r213939: Use one fprintf() instead of two. r213981: Log correct connection when canceling half-open connection. Submitted by: Mikolaj Golub Modified: stable/8/sbin/hastd/control.c stable/8/sbin/hastd/hastd.c stable/8/sbin/hastd/hooks.c stable/8/sbin/hastd/hooks.h stable/8/sbin/hastd/pjdlog.c stable/8/sbin/hastd/primary.c Directory Properties: stable/8/sbin/hastd/ (props changed) Modified: stable/8/sbin/hastd/control.c ============================================================================== --- stable/8/sbin/hastd/control.c Sun Oct 17 16:30:33 2010 (r213983) +++ stable/8/sbin/hastd/control.c Sun Oct 17 16:43:20 2010 (r213984) @@ -58,8 +58,10 @@ child_cleanup(struct hast_resource *res) proto_close(res->hr_ctrl); res->hr_ctrl = NULL; - proto_close(res->hr_event); - res->hr_event = NULL; + if (res->hr_event != NULL) { + proto_close(res->hr_event); + res->hr_event = NULL; + } res->hr_workerpid = 0; } Modified: stable/8/sbin/hastd/hastd.c ============================================================================== --- stable/8/sbin/hastd/hastd.c Sun Oct 17 16:30:33 2010 (r213983) +++ stable/8/sbin/hastd/hastd.c Sun Oct 17 16:43:20 2010 (r213984) @@ -69,7 +69,7 @@ bool sigexit_received = false; struct pidfh *pfh; /* How often check for hooks running for too long. */ -#define REPORT_INTERVAL 10 +#define REPORT_INTERVAL 5 static void usage(void) @@ -527,7 +527,8 @@ listen_accept(void) } else if (res->hr_remotein != NULL) { char oaddr[256]; - proto_remote_address(conn, oaddr, sizeof(oaddr)); + proto_remote_address(res->hr_remotein, oaddr, + sizeof(oaddr)); pjdlog_debug(1, "Canceling half-open connection from %s on connection from %s.", oaddr, raddr); @@ -659,7 +660,7 @@ main_loop(void) assert(maxfd + 1 <= (int)FD_SETSIZE); ret = select(maxfd + 1, &rfds, NULL, NULL, &seltimeout); if (ret == 0) - hook_check(false); + hook_check(); else if (ret == -1) { if (errno == EINTR) continue; @@ -685,6 +686,12 @@ main_loop(void) } } +static void +dummy_sighandler(int sig __unused) +{ + /* Nothing to do. */ +} + int main(int argc, char *argv[]) { @@ -743,6 +750,11 @@ main(int argc, char *argv[]) cfg = yy_config_parse(cfgpath, true); assert(cfg != NULL); + /* + * Because SIGCHLD is ignored by default, setup dummy handler for it, + * so we can mask it. + */ + PJDLOG_VERIFY(signal(SIGCHLD, dummy_sighandler) != SIG_ERR); PJDLOG_VERIFY(sigemptyset(&mask) == 0); PJDLOG_VERIFY(sigaddset(&mask, SIGHUP) == 0); PJDLOG_VERIFY(sigaddset(&mask, SIGINT) == 0); Modified: stable/8/sbin/hastd/hooks.c ============================================================================== --- stable/8/sbin/hastd/hooks.c Sun Oct 17 16:30:33 2010 (r213983) +++ stable/8/sbin/hastd/hooks.c Sun Oct 17 16:43:20 2010 (r213984) @@ -293,24 +293,14 @@ hook_check_one(pid_t pid, int status) } void -hook_check(bool sigchld) +hook_check(void) { struct hookproc *hp, *hp2; - int status; time_t now; - pid_t pid; assert(hooks_initialized); /* - * If SIGCHLD was received, garbage collect finished processes. - */ - if (sigchld) { - while ((pid = wait3(&status, WNOHANG, NULL)) > 0) - hook_check_one(pid, status); - } - - /* * Report about processes that are running for a long time. */ now = time(NULL); @@ -364,6 +354,7 @@ hook_execv(const char *path, va_list ap) struct hookproc *hp; char *args[64]; unsigned int ii; + sigset_t mask; pid_t pid; assert(hooks_initialized); @@ -388,9 +379,12 @@ hook_execv(const char *path, va_list ap) switch (pid) { case -1: /* Error. */ pjdlog_errno(LOG_ERR, "Unable to fork to execute %s", path); + hook_free(hp); return; case 0: /* Child. */ descriptors(); + PJDLOG_VERIFY(sigemptyset(&mask) == 0); + PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); execv(path, args); pjdlog_errno(LOG_ERR, "Unable to execute %s", path); exit(EX_SOFTWARE); Modified: stable/8/sbin/hastd/hooks.h ============================================================================== --- stable/8/sbin/hastd/hooks.h Sun Oct 17 16:30:33 2010 (r213983) +++ stable/8/sbin/hastd/hooks.h Sun Oct 17 16:43:20 2010 (r213984) @@ -41,7 +41,7 @@ void hook_init(void); void hook_fini(void); void hook_check_one(pid_t pid, int status); -void hook_check(bool sigchld); +void hook_check(void); void hook_exec(const char *path, ...); void hook_execv(const char *path, va_list ap); Modified: stable/8/sbin/hastd/pjdlog.c ============================================================================== --- stable/8/sbin/hastd/pjdlog.c Sun Oct 17 16:30:33 2010 (r213983) +++ stable/8/sbin/hastd/pjdlog.c Sun Oct 17 16:43:20 2010 (r213984) @@ -214,8 +214,7 @@ pjdlogv_common(int loglevel, int debugle /* Attach debuglevel if this is debug log. */ if (loglevel == LOG_DEBUG) fprintf(out, "[%d]", debuglevel); - fprintf(out, " "); - fprintf(out, "%s", pjdlog_prefix); + fprintf(out, " %s", pjdlog_prefix); vfprintf(out, fmt, ap); if (error != -1) fprintf(out, ": %s.", strerror(error)); Modified: stable/8/sbin/hastd/primary.c ============================================================================== --- stable/8/sbin/hastd/primary.c Sun Oct 17 16:30:33 2010 (r213983) +++ stable/8/sbin/hastd/primary.c Sun Oct 17 16:43:20 2010 (r213984) @@ -234,21 +234,17 @@ cleanup(struct hast_resource *res) /* Remember errno. */ rerrno = errno; - /* - * Close descriptor to /dev/hast/ - * to work-around race in the kernel. - */ - close(res->hr_localfd); - /* Destroy ggate provider if we created one. */ if (res->hr_ggateunit >= 0) { struct g_gate_ctl_destroy ggiod; + bzero(&ggiod, sizeof(ggiod)); ggiod.gctl_version = G_GATE_VERSION; ggiod.gctl_unit = res->hr_ggateunit; ggiod.gctl_force = 1; if (ioctl(res->hr_ggatefd, G_GATE_CMD_DESTROY, &ggiod) < 0) { - pjdlog_warning("Unable to destroy hast/%s device", + pjdlog_errno(LOG_WARNING, + "Unable to destroy hast/%s device", res->hr_provname); } res->hr_ggateunit = -1; @@ -705,6 +701,7 @@ init_ggate(struct hast_resource *res) * Create provider before trying to connect, as connection failure * is not critical, but may take some time. */ + bzero(&ggiocreate, sizeof(ggiocreate)); ggiocreate.gctl_version = G_GATE_VERSION; ggiocreate.gctl_mediasize = res->hr_datasize; ggiocreate.gctl_sectorsize = res->hr_local_sectorsize; @@ -714,7 +711,6 @@ init_ggate(struct hast_resource *res) ggiocreate.gctl_unit = G_GATE_NAME_GIVEN; snprintf(ggiocreate.gctl_name, sizeof(ggiocreate.gctl_name), "hast/%s", res->hr_provname); - bzero(ggiocreate.gctl_info, sizeof(ggiocreate.gctl_info)); if (ioctl(res->hr_ggatefd, G_GATE_CMD_CREATE, &ggiocreate) == 0) { pjdlog_info("Device hast/%s created.", res->hr_provname); res->hr_ggateunit = ggiocreate.gctl_unit; @@ -732,6 +728,7 @@ init_ggate(struct hast_resource *res) * provider died and didn't clean up. In that case we will start from * where he left of. */ + bzero(&ggiocancel, sizeof(ggiocancel)); ggiocancel.gctl_version = G_GATE_VERSION; ggiocancel.gctl_unit = G_GATE_NAME_GIVEN; snprintf(ggiocancel.gctl_name, sizeof(ggiocancel.gctl_name), "hast/%s", @@ -797,6 +794,12 @@ hastd_primary(struct hast_resource *res) init_ggate(res); init_environment(res); /* + * Create the guard thread first, so we can handle signals from the + * very begining. + */ + error = pthread_create(&td, NULL, guard_thread, res); + assert(error == 0); + /* * Create the control thread before sending any event to the parent, * as we can deadlock when parent sends control request to worker, * but worker has no control thread started yet, so parent waits. @@ -818,9 +821,7 @@ hastd_primary(struct hast_resource *res) assert(error == 0); error = pthread_create(&td, NULL, ggate_send_thread, res); assert(error == 0); - error = pthread_create(&td, NULL, sync_thread, res); - assert(error == 0); - (void)guard_thread(res); + (void)sync_thread(res); } static void From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 17:39:54 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D96551065693; Sun, 17 Oct 2010 17:39:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5E138FC13; Sun, 17 Oct 2010 17:39:54 +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 o9HHdshN040028; Sun, 17 Oct 2010 17:39:54 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HHdsOE040023; Sun, 17 Oct 2010 17:39:54 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201010171739.o9HHdsOE040023@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 17 Oct 2010 17:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213987 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 17:39:55 -0000 Author: glebius Date: Sun Oct 17 17:39:54 2010 New Revision: 213987 URL: http://svn.freebsd.org/changeset/base/213987 Log: Merge from head 213480,213481,213717: Add support to Alcatel/TCTMobile X080S USB 3G modem. The device needs special eject command to reappear as modem. It also requires DIR_IN flag in the command message, so we supply some dummy data along with the command. Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usb_msctest.c stable/8/sys/dev/usb/usb_msctest.h stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Sun Oct 17 17:31:49 2010 (r213986) +++ stable/8/sys/dev/usb/serial/u3g.c Sun Oct 17 17:39:54 2010 (r213987) @@ -93,6 +93,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #define U3GINIT_WAIT 7 /* Device reappears after a delay */ #define U3GINIT_SAEL_M460 8 /* Requires vendor init */ #define U3GINIT_HUAWEISCSI 9 /* Requires Huawei SCSI init command */ +#define U3GINIT_TCT 10 /* Requires TCT Mobile init command */ enum { U3G_BULK_WR, @@ -491,6 +492,7 @@ static const struct usb_device_id u3g_de U3G_DEV(STELERA, E1011, 0), U3G_DEV(STELERA, E1012, 0), U3G_DEV(TCTMOBILE, X060S, 0), + U3G_DEV(TCTMOBILE, X080S, U3GINIT_TCT), U3G_DEV(TELIT, UC864E, 0), U3G_DEV(TELIT, UC864G, 0), U3G_DEV(TLAYTECH, TEU800, 0), @@ -668,6 +670,9 @@ u3g_test_autoinst(void *arg, struct usb_ case U3GINIT_CMOTECH: error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH); break; + case U3GINIT_TCT: + error = usb_msc_eject(udev, 0, MSC_EJECT_TCT); + break; case U3GINIT_SIERRA: error = u3g_sierra_init(udev); break; Modified: stable/8/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.c Sun Oct 17 17:31:49 2010 (r213986) +++ stable/8/sys/dev/usb/usb_msctest.c Sun Oct 17 17:39:54 2010 (r213987) @@ -97,6 +97,7 @@ static uint8_t scsi_cmotech_eject[] = static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_tct_eject[] = { 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -467,7 +468,6 @@ bbb_command_start(struct bbb_transfer *s sc->data_rem = data_len; sc->data_timeout = (data_timeout + USB_MS_HZ); sc->actlen = 0; - sc->data_ptr = data_ptr; sc->cmd_len = cmd_len; bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); @@ -619,6 +619,15 @@ usb_msc_eject(struct usb_device *udev, u &scsi_huawei_eject, sizeof(scsi_huawei_eject), USB_MS_HZ); break; + case MSC_EJECT_TCT: + /* + * TCTMobile needs DIR_IN flag. To get it, we + * supply a dummy data with the command. + */ + err = bbb_command_start(sc, DIR_IN, 0, &sc->buffer, + sizeof(sc->buffer), &scsi_tct_eject, + sizeof(scsi_tct_eject), USB_MS_HZ); + break; default: printf("usb_msc_eject: unknown eject method (%d)\n", method); break; Modified: stable/8/sys/dev/usb/usb_msctest.h ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.h Sun Oct 17 17:31:49 2010 (r213986) +++ stable/8/sys/dev/usb/usb_msctest.h Sun Oct 17 17:39:54 2010 (r213987) @@ -33,6 +33,7 @@ enum { MSC_EJECT_ZTESTOR, MSC_EJECT_CMOTECH, MSC_EJECT_HUAWEI, + MSC_EJECT_TCT, }; int usb_iface_is_cdrom(struct usb_device *udev, Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Oct 17 17:31:49 2010 (r213986) +++ stable/8/sys/dev/usb/usbdevs Sun Oct 17 17:39:54 2010 (r213987) @@ -3127,6 +3127,7 @@ product TAUGA CAMERAMATE 0x0005 CameraMa /* TCTMobile products */ product TCTMOBILE X060S 0x0000 X060S 3G modem +product TCTMOBILE X080S 0xf000 X080S 3G modem /* TDK products */ product TDK UPA9664 0x0115 USB-PDC Adapter UPA9664 From owner-svn-src-stable@FreeBSD.ORG Sun Oct 17 20:10:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96E3E106566C; Sun, 17 Oct 2010 20:10:00 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6D78FC15; Sun, 17 Oct 2010 20:10:00 +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 o9HKA0wi044621; Sun, 17 Oct 2010 20:10:00 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9HKA0MT044610; Sun, 17 Oct 2010 20:10:00 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201010172010.o9HKA0MT044610@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 17 Oct 2010 20:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213994 - in stable/8: etc/periodic/daily etc/rc.d sbin/geom/class/part sbin/geom/class/sched sys/boot/common sys/boot/i386/common sys/boot/i386/gptboot sys/boot/i386/gptzfsboot sys/boo... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 20:10:00 -0000 Author: pjd Date: Sun Oct 17 20:10:00 2010 New Revision: 213994 URL: http://svn.freebsd.org/changeset/base/213994 Log: MFC r213133,r213135,r213136,r213137,r213245: r213133: Add three GPT attributes: GPT_ENT_ATTR_BOOTME - this is bootable partition GPT_ENT_ATTR_BOOTONCE - try to boot only once from this partition GPT_ENT_ATTR_BOOTFAILED - set this flag if we cannot boot from partition containing GPT_ENT_ATTR_BOOTONCE flag; note that if we cannot boot from partition that contains only GPT_ENT_ATTR_BOOTME flag, the GPT_ENT_ATTR_BOOTFAILED flag won't be set According to wikipedia Microsoft TechNet says that attributes are divided into two halves: the lower 4 bytes representing partition independent attributes, and the upper 4 bytes are partition type dependent. Microsoft is already using bits 60 (read-only), 62 (hidden) and 63 (do not automount) and I'd like to not collide with those, so we are using bit 59 (bootme), 58 (bootonce) and 57 (bootfailed). Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) r213135: Allow to configure GPT attributes. It shouldn't be allowed to set bootfailed attribute (it should be allowed only to unset it), but for test purposes it might be useful, so the current code allows it. Reviewed by: arch@ (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) r213136: - Split code shared by almost any boot loader into separate files and clean up most layering violations: sys/boot/i386/common/rbx.h: RBX_* defines OPT_SET() OPT_CHECK() sys/boot/common/util.[ch]: memcpy() memset() memcmp() bcpy() bzero() bcmp() strcmp() strncmp() [new] strcpy() strcat() strchr() strlen() printf() sys/boot/i386/common/cons.[ch]: ioctrl putc() xputc() putchar() getc() xgetc() keyhit() [now takes number of seconds as an argument] getstr() sys/boot/i386/common/drv.[ch]: struct dsk drvread() drvwrite() [new] drvsize() [new] sys/boot/common/crc32.[ch] [new] sys/boot/common/gpt.[ch] [new] - Teach gptboot and gptzfsboot about new files. I haven't touched the rest, but there is still a lot of code duplication to be removed. - Implement full GPT support. Currently we just read primary header and partition table and don't care about checksums, etc. After this change we verify checksums of primary header and primary partition table and if there is a problem we fall back to backup header and backup partition table. - Clean up most messages to use prefix of boot program, so in case of an error we know where the error comes from, eg.: gptboot: unable to read primary GPT header - If we can't boot, print boot prompt only once and not every five seconds. - Honour newly added GPT attributes: bootme - this is bootable partition bootonce - try to boot from this partition only once bootfailed - we failed to boot from this partition - Change boot order of gptboot to the following: 1. Try to boot from all the partitions that have both 'bootme' and 'bootonce' attributes one by one. 2. Try to boot from all the partitions that have only 'bootme' attribute one by one. 3. If there are no partitions with 'bootme' attribute, boot from the first UFS partition. - The 'bootonce' functionality is implemented in the following way: 1. Walk through all the partitions and when 'bootonce' attribute is found without 'bootme' attribute, remove 'bootonce' attribute and set 'bootfailed' attribute. 'bootonce' attribute alone means that we tried to boot from this partition, but boot failed after leaving gptboot and machine was restarted. 2. Find partition with both 'bootme' and 'bootonce' attributes. 3. Remove 'bootme' attribute. 4. Try to execute /boot/loader or /boot/kernel/kernel from that partition. If succeeded we stop here. 5. If execution failed, remove 'bootonce' and set 'bootfailed'. 6. Go to 2. If whole boot succeeded there is new /etc/rc.d/gptboot script coming that will log all partitions that we failed to boot from (the ones with 'bootfailed' attribute) and will remove this attribute. It will also find partition with 'bootonce' attribute - this is the partition we booted from successfully. The script will log success and remove the attribute. All the GPT updates we do here goes to both primary and backup GPT if they are valid. We don't touch headers or partition tables when checksum doesn't match. Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com r213137: Add gptboot script that is responsible for: - looking for partition with 'bootonce' attribute alone (without 'bootme' attribute), removing it and logging that we successfully booted from this partition. - looking for partitions with 'bootfailed' attribute, removing it and logging that we failed to boot from this partition. Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com r213245: Document recently added GPT attributes (bootme, bootonce, bootfailed) and list other schemes attributes. Reviewed by: simon, rpaulo Added: stable/8/etc/rc.d/gptboot - copied unchanged from r213137, head/etc/rc.d/gptboot stable/8/sys/boot/common/crc32.c - copied unchanged from r213136, head/sys/boot/common/crc32.c stable/8/sys/boot/common/crc32.h - copied unchanged from r213136, head/sys/boot/common/crc32.h stable/8/sys/boot/common/gpt.c - copied unchanged from r213136, head/sys/boot/common/gpt.c stable/8/sys/boot/common/gpt.h - copied unchanged from r213136, head/sys/boot/common/gpt.h stable/8/sys/boot/common/util.c - copied unchanged from r213136, head/sys/boot/common/util.c stable/8/sys/boot/common/util.h - copied unchanged from r213136, head/sys/boot/common/util.h stable/8/sys/boot/i386/common/ - copied from r213136, head/sys/boot/i386/common/ Modified: stable/8/etc/rc.d/Makefile stable/8/sbin/geom/class/part/gpart.8 stable/8/sys/boot/i386/gptboot/Makefile stable/8/sys/boot/i386/gptboot/gptboot.c stable/8/sys/boot/i386/gptzfsboot/Makefile stable/8/sys/boot/i386/zfsboot/Makefile stable/8/sys/boot/i386/zfsboot/zfsboot.c stable/8/sys/boot/zfs/Makefile stable/8/sys/boot/zfs/zfsimpl.c stable/8/sys/geom/part/g_part_gpt.c stable/8/sys/sys/gpt.h Directory Properties: stable/8/etc/ (props changed) stable/8/etc/periodic/daily/ (props changed) stable/8/etc/periodic/daily/800.scrub-zfs (props changed) stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/sched/gsched.8 (props changed) stable/8/sbin/geom/class/stripe/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/etc/rc.d/Makefile ============================================================================== --- stable/8/etc/rc.d/Makefile Sun Oct 17 20:01:56 2010 (r213993) +++ stable/8/etc/rc.d/Makefile Sun Oct 17 20:10:00 2010 (r213994) @@ -11,7 +11,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI dmesg dumpon \ encswap \ fsck ftp-proxy ftpd \ - gbde geli geli2 gssd \ + gbde geli geli2 gptboot gssd \ hastd hcsecd \ hostapd hostid hostid_save hostname \ inetd initrandom \ Copied: stable/8/etc/rc.d/gptboot (from r213137, head/etc/rc.d/gptboot) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/etc/rc.d/gptboot Sun Oct 17 20:10:00 2010 (r213994, copy of r213137, head/etc/rc.d/gptboot) @@ -0,0 +1,76 @@ +#!/bin/sh +# +# Copyright (c) 2010 Pawel Jakub Dawidek +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# PROVIDE: gptboot +# REQUIRE: mountcritremote +# KEYWORD: nojail + +. /etc/rc.subr + +name="gptboot" +start_cmd="gptboot_report" + +gptboot_report() +{ + gpart show | \ + egrep '(^=>| freebsd-ufs .*(\[|,)(bootfailed|bootonce)(,|\]))' | \ + sed 's/^=>//' | \ + egrep -v '(\[|,)bootme(,|\])' | \ + while read start size pos type attrs rest; do + case "${pos}" in + [0-9]*) + if [ -n "${disk}" ]; then + part="${disk}p${pos}" + echo "${attrs}" | egrep -q '(\[|,)bootfailed(,|\])' + bootfailed=$? + echo "${attrs}" | egrep -q '(\[|,)bootonce(,|\])' + bootonce=$? + if [ ${bootfailed} -eq 0 ]; then + logger -t gptboot -p local0.notice "Boot from ${part} failed." + gpart unset -a bootfailed -i ${pos} ${disk} >/dev/null + elif [ ${bootonce} -eq 0 ]; then + # We want to log success after all failures. + echo -n "Boot from ${part} succeeded." + gpart unset -a bootonce -i ${pos} ${disk} >/dev/null + fi + fi + ;; + *) + if [ "${type}" = "GPT" ]; then + disk="${pos}" + else + disk="" + fi + ;; + esac + done | logger -t gptboot -p local0.notice +} + +load_rc_config $name +run_rc_command "$1" Modified: stable/8/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/8/sbin/geom/class/part/gpart.8 Sun Oct 17 20:01:56 2010 (r213993) +++ stable/8/sbin/geom/class/part/gpart.8 Sun Oct 17 20:10:00 2010 (r213994) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 24, 2010 +.Dd September 28, 2010 .Dt GPART 8 .Os .Sh NAME @@ -382,6 +382,9 @@ about its use. .\" ==== SET ==== .It Cm set Set the named attribute on the partition entry. +See the section entitled +.Sx "ATTRIBUTES" +below for a list of available attributes. .Pp Additional options include: .Bl -tag -width 10n @@ -406,6 +409,9 @@ action and can be used to undo any chang .\" ==== UNSET ==== .It Cm unset Clear the named attribute on the partition entry. +See the section entitled +.Sx "ATTRIBUTES" +below for a list of available attributes. .Pp Additional options include: .Bl -tag -width 10n @@ -502,6 +508,103 @@ This type is known as .Qq Li "!024dee41-33e7-11d3-9d69-0008c781f39f" by GPT. .El +.Sh ATTRIBUTES +The scheme-specific attributes for EBR: +.Bl -tag -width ".Ar active" +.It Ar active +.El +.Pp +The scheme-specific attributes for GPT: +.Bl -tag -width ".Ar bootfailed" +.It Ar bootme +When set, the +.Nm gptboot +stage 1 boot loader will try to boot the system from this partition. +Multiple partitions might be marked with the +.Ar bootme +attribute. +In such scenario the +.Nm gptboot +will try all +.Ar bootme +partitions one by one, until the next boot stage is successfully entered. +.It Ar bootonce +Setting this attribute automatically sets the +.Ar bootme +attribute. +When set, the +.Nm gptboot +stage 1 boot loader will try to boot the system from this partition only once. +Partitions with both +.Ar bootonce +and +.Ar bootme +attributes are tried before partitions with only the +.Ar bootme +attribute. +Before +.Ar bootonce +partition is tried, the +.Nm gptboot +removes the +.Ar bootme +attribute and tries to execute the next boot stage. +If it fails, the +.Ar bootonce +attribute that is now alone is replaced with the +.Ar bootfailed +attribute. +If the execution of the next boot stage succeeds, but the system is not fully +booted, the +.Nm gptboot +will look for +.Ar bootonce +attributes alone (without the +.Ar bootme +attribute) on the next system boot and will replace those with the +.Ar bootfailed +attribute. +If the system is fully booted, the +.Pa /etc/rc.d/gptboot +start-up script will look for partition with the +.Ar bootonce +attribute alone, will remove the attribute and log that the system was +successfully booted from this partition. +There should be at most one +.Ar bootonce +partition when system is successfully booted. +Multiple partitions might be marked with the +.Ar bootonce +and +.Ar bootme +attribute pairs. +.It Ar bootfailed +This attribute should not be manually managed. +It is managed by the +.Nm gptboot +stage 1 boot loader and the +.Pa /etc/rc.d/gptboot +start-up script. +This attribute is used to mark partitions that had the +.Ar bootonce +attribute set, but we failed to boot from them. +Once we successfully boot, the +.Pa /etc/rc.d/gptboot +script will log all the partitions we failed to boot from and will remove the +.Ar bootfailed +attributes. +.El +.Pp +The scheme-specific attributes for MBR: +.Bl -tag -width ".Ar active" +.It Ar active +.El +.Pp +The scheme-specific attributes for PC98: +.Bl -tag -width ".Ar bootable" +.It Ar active +.It Ar bootable +.El .Sh OPERATIONAL FLAGS Actions other than the .Cm commit Copied: stable/8/sys/boot/common/crc32.c (from r213136, head/sys/boot/common/crc32.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/common/crc32.c Sun Oct 17 20:10:00 2010 (r213994, copy of r213136, head/sys/boot/common/crc32.c) @@ -0,0 +1,108 @@ +/*- + * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or + * code or tables extracted from it, as desired without restriction. + */ + +/* + * First, the polynomial itself and its table of feedback terms. The + * polynomial is + * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 + * + * Note that we take it "backwards" and put the highest-order term in + * the lowest-order bit. The X^32 term is "implied"; the LSB is the + * X^31 term, etc. The X^0 term (usually shown as "+1") results in + * the MSB being 1 + * + * Note that the usual hardware shift register implementation, which + * is what we're using (we're merely optimizing it by doing eight-bit + * chunks at a time) shifts bits into the lowest-order term. In our + * implementation, that means shifting towards the right. Why do we + * do it this way? Because the calculated CRC must be transmitted in + * order from highest-order term to lowest-order term. UARTs transmit + * characters in order from LSB to MSB. By storing the CRC this way + * we hand it to the UART in the order low-byte to high-byte; the UART + * sends each low-bit to hight-bit; and the result is transmission bit + * by bit from highest- to lowest-order term without requiring any bit + * shuffling on our part. Reception works similarly + * + * The feedback terms table consists of 256, 32-bit entries. Notes + * + * The table can be generated at runtime if desired; code to do so + * is shown later. It might not be obvious, but the feedback + * terms simply represent the results of eight shift/xor opera + * tions for all combinations of data and CRC register values + * + * The values must be right-shifted by eight bits by the "updcrc + * logic; the shift must be unsigned (bring in zeroes). On some + * hardware you could probably optimize the shift in assembler by + * using byte-swap instructions + * polynomial $edb88320 + * + * + * CRC32 code derived from work by Gary S. Brown. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "crc32.h" + +static uint32_t crc32_tab[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, + 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, + 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, + 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, + 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, + 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, + 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, + 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, + 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, + 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, + 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, + 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, + 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, + 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, + 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, + 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, + 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, + 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d +}; + +uint32_t +crc32(const void *buf, size_t size) +{ + const uint8_t *p = buf; + uint32_t crc; + + crc = ~0U; + while (size--) + crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); + return (crc ^ ~0U); +} Copied: stable/8/sys/boot/common/crc32.h (from r213136, head/sys/boot/common/crc32.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/common/crc32.h Sun Oct 17 20:10:00 2010 (r213994, copy of r213136, head/sys/boot/common/crc32.h) @@ -0,0 +1,13 @@ +/*- + * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or + * code or tables extracted from it, as desired without restriction. + * + * $FreeBSD$ + */ + +#ifndef _CRC32_H_ +#define _CRC32_H_ + +uint32_t crc32(const void *buf, size_t size); + +#endif /* !_CRC32_H_ */ Copied: stable/8/sys/boot/common/gpt.c (from r213136, head/sys/boot/common/gpt.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/common/gpt.c Sun Oct 17 20:10:00 2010 (r213994, copy of r213136, head/sys/boot/common/gpt.c) @@ -0,0 +1,381 @@ +/*- + * Copyright (c) 2010 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifndef LITTLE_ENDIAN +#error gpt.c works only for little endian architectures +#endif + +#include "crc32.h" +#include "drv.h" +#include "util.h" +#include "gpt.h" + +#define MAXTBLENTS 128 + +static struct gpt_hdr hdr_primary, hdr_backup, *gpthdr; +static uint64_t hdr_primary_lba, hdr_backup_lba; +static struct gpt_ent table_primary[MAXTBLENTS], table_backup[MAXTBLENTS]; +static struct gpt_ent *gpttable; +static int curent, bootonce; + +/* + * Buffer below 64kB passed on gptread(), which can hold at least + * one sector od data (512 bytes). + */ +static char *secbuf; + +static void +gptupdate(const char *which, struct dsk *dskp, struct gpt_hdr *hdr, + struct gpt_ent *table) +{ + int entries_per_sec, firstent; + daddr_t slba; + + /* + * We need to update the following for both primary and backup GPT: + * 1. Sector on disk that contains curent partition. + * 2. Partition table checksum. + * 3. Header checksum. + * 4. Header on disk. + */ + + entries_per_sec = DEV_BSIZE / hdr->hdr_entsz; + slba = curent / entries_per_sec; + firstent = slba * entries_per_sec; + bcpy(&table[firstent], secbuf, DEV_BSIZE); + slba += hdr->hdr_lba_table; + if (drvwrite(dskp, secbuf, slba, 1)) { + printf("%s: unable to update %s GPT partition table\n", + BOOTPROG, which); + return; + } + hdr->hdr_crc_table = crc32(table, hdr->hdr_entries * hdr->hdr_entsz); + hdr->hdr_crc_self = 0; + hdr->hdr_crc_self = crc32(hdr, hdr->hdr_size); + bzero(secbuf, DEV_BSIZE); + bcpy(hdr, secbuf, hdr->hdr_size); + if (drvwrite(dskp, secbuf, hdr->hdr_lba_self, 1)) { + printf("%s: unable to update %s GPT header\n", BOOTPROG, which); + return; + } +} + +int +gptfind(const uuid_t *uuid, struct dsk *dskp, int part) +{ + struct gpt_ent *ent; + int firsttry; + + if (part >= 0) { + if (part == 0 || part > gpthdr->hdr_entries) { + printf("%s: invalid partition index\n", BOOTPROG); + return (-1); + } + ent = &gpttable[part - 1]; + if (bcmp(&ent->ent_type, uuid, sizeof(uuid_t)) != 0) { + printf("%s: specified partition is not UFS\n", + BOOTPROG); + return (-1); + } + curent = part - 1; + goto found; + } + + firsttry = (curent == -1); + curent++; + if (curent >= gpthdr->hdr_entries) { + curent = gpthdr->hdr_entries; + return (-1); + } + if (bootonce) { + /* + * First look for partition with both GPT_ENT_ATTR_BOOTME and + * GPT_ENT_ATTR_BOOTONCE flags. + */ + for (; curent < gpthdr->hdr_entries; curent++) { + ent = &gpttable[curent]; + if (bcmp(&ent->ent_type, uuid, sizeof(uuid_t)) != 0) + continue; + if (!(ent->ent_attr & GPT_ENT_ATTR_BOOTME)) + continue; + if (!(ent->ent_attr & GPT_ENT_ATTR_BOOTONCE)) + continue; + /* Ok, found one. */ + goto found; + } + bootonce = 0; + curent = 0; + } + for (; curent < gpthdr->hdr_entries; curent++) { + ent = &gpttable[curent]; + if (bcmp(&ent->ent_type, uuid, sizeof(uuid_t)) != 0) + continue; + if (!(ent->ent_attr & GPT_ENT_ATTR_BOOTME)) + continue; + if (ent->ent_attr & GPT_ENT_ATTR_BOOTONCE) + continue; + /* Ok, found one. */ + goto found; + } + if (firsttry) { + /* + * No partition with BOOTME flag was found, try to boot from + * first UFS partition. + */ + for (curent = 0; curent < gpthdr->hdr_entries; curent++) { + ent = &gpttable[curent]; + if (bcmp(&ent->ent_type, uuid, sizeof(uuid_t)) != 0) + continue; + /* Ok, found one. */ + goto found; + } + } + return (-1); +found: + dskp->part = curent + 1; + ent = &gpttable[curent]; + dskp->start = ent->ent_lba_start; + if (ent->ent_attr & GPT_ENT_ATTR_BOOTONCE) { + /* + * Clear BOOTME, but leave BOOTONCE set before trying to + * boot from this partition. + */ + if (hdr_primary_lba > 0) { + table_primary[curent].ent_attr &= ~GPT_ENT_ATTR_BOOTME; + gptupdate("primary", dskp, &hdr_primary, table_primary); + } + if (hdr_backup_lba > 0) { + table_backup[curent].ent_attr &= ~GPT_ENT_ATTR_BOOTME; + gptupdate("backup", dskp, &hdr_backup, table_backup); + } + } + return (0); +} + +static int +gptread_hdr(const char *which, struct dsk *dskp, struct gpt_hdr *hdr, + uint64_t hdrlba) +{ + uint32_t crc; + + if (drvread(dskp, secbuf, hdrlba, 1)) { + printf("%s: unable to read %s GPT header\n", BOOTPROG, which); + return (-1); + } + bcpy(secbuf, hdr, sizeof(*hdr)); + if (bcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0 || + hdr->hdr_lba_self != hdrlba || hdr->hdr_revision < 0x00010000 || + hdr->hdr_entsz < sizeof(struct gpt_ent) || + hdr->hdr_entries > MAXTBLENTS || DEV_BSIZE % hdr->hdr_entsz != 0) { + printf("%s: invalid %s GPT header\n", BOOTPROG, which); + return (-1); + } + crc = hdr->hdr_crc_self; + hdr->hdr_crc_self = 0; + if (crc32(hdr, hdr->hdr_size) != crc) { + printf("%s: %s GPT header checksum mismatch\n", BOOTPROG, + which); + return (-1); + } + hdr->hdr_crc_self = crc; + return (0); +} + +void +gptbootfailed(struct dsk *dskp) +{ + + if (!(gpttable[curent].ent_attr & GPT_ENT_ATTR_BOOTONCE)) + return; + + if (hdr_primary_lba > 0) { + table_primary[curent].ent_attr &= ~GPT_ENT_ATTR_BOOTONCE; + table_primary[curent].ent_attr |= GPT_ENT_ATTR_BOOTFAILED; + gptupdate("primary", dskp, &hdr_primary, table_primary); + } + if (hdr_backup_lba > 0) { + table_backup[curent].ent_attr &= ~GPT_ENT_ATTR_BOOTONCE; + table_backup[curent].ent_attr |= GPT_ENT_ATTR_BOOTFAILED; + gptupdate("backup", dskp, &hdr_backup, table_backup); + } +} + +static void +gptbootconv(const char *which, struct dsk *dskp, struct gpt_hdr *hdr, + struct gpt_ent *table) +{ + struct gpt_ent *ent; + daddr_t slba; + int table_updated, sector_updated; + int entries_per_sec, nent, part; + + table_updated = 0; + entries_per_sec = DEV_BSIZE / hdr->hdr_entsz; + for (nent = 0, slba = hdr->hdr_lba_table; + slba < hdr->hdr_lba_table + hdr->hdr_entries / entries_per_sec; + slba++, nent += entries_per_sec) { + sector_updated = 0; + for (part = 0; part < entries_per_sec; part++) { + ent = &table[nent + part]; + if ((ent->ent_attr & (GPT_ENT_ATTR_BOOTME | + GPT_ENT_ATTR_BOOTONCE | + GPT_ENT_ATTR_BOOTFAILED)) != + GPT_ENT_ATTR_BOOTONCE) { + continue; + } + ent->ent_attr &= ~GPT_ENT_ATTR_BOOTONCE; + ent->ent_attr |= GPT_ENT_ATTR_BOOTFAILED; + table_updated = 1; + sector_updated = 1; + } + if (!sector_updated) + continue; + bcpy(&table[nent], secbuf, DEV_BSIZE); + if (drvwrite(dskp, secbuf, slba, 1)) { + printf("%s: unable to update %s GPT partition table\n", + BOOTPROG, which); + } + } + if (!table_updated) + return; + hdr->hdr_crc_table = crc32(table, hdr->hdr_entries * hdr->hdr_entsz); + hdr->hdr_crc_self = 0; + hdr->hdr_crc_self = crc32(hdr, hdr->hdr_size); + bzero(secbuf, DEV_BSIZE); + bcpy(hdr, secbuf, hdr->hdr_size); + if (drvwrite(dskp, secbuf, hdr->hdr_lba_self, 1)) + printf("%s: unable to update %s GPT header\n", BOOTPROG, which); +} + +static int +gptread_table(const char *which, const uuid_t *uuid, struct dsk *dskp, + struct gpt_hdr *hdr, struct gpt_ent *table) +{ + struct gpt_ent *ent; + int entries_per_sec; + int part, nent; + daddr_t slba; + + if (hdr->hdr_entries == 0) + return (0); + + entries_per_sec = DEV_BSIZE / hdr->hdr_entsz; + slba = hdr->hdr_lba_table; + nent = 0; + for (;;) { + if (drvread(dskp, secbuf, slba, 1)) { + printf("%s: unable to read %s GPT partition table\n", + BOOTPROG, which); + return (-1); + } + ent = (struct gpt_ent *)secbuf; + for (part = 0; part < entries_per_sec; part++, ent++) { + bcpy(ent, &table[nent], sizeof(table[nent])); + if (++nent >= hdr->hdr_entries) + break; + } + if (nent >= hdr->hdr_entries) + break; + slba++; + } + if (crc32(table, nent * hdr->hdr_entsz) != hdr->hdr_crc_table) { + printf("%s: %s GPT table checksum mismatch\n", BOOTPROG, which); + return (-1); + } + return (0); +} + +int +gptread(const uuid_t *uuid, struct dsk *dskp, char *buf) +{ + uint64_t altlba; + + /* + * Read and verify both GPT headers: primary and backup. + */ + + secbuf = buf; + hdr_primary_lba = hdr_backup_lba = 0; + curent = -1; + bootonce = 1; + dskp->start = 0; + + if (gptread_hdr("primary", dskp, &hdr_primary, 1) == 0 && + gptread_table("primary", uuid, dskp, &hdr_primary, + table_primary) == 0) { + hdr_primary_lba = hdr_primary.hdr_lba_self; + gpthdr = &hdr_primary; + gpttable = table_primary; + } + + altlba = drvsize(dskp); + if (altlba > 0) + altlba--; + else if (hdr_primary_lba > 0) { + /* + * If we cannot obtain disk size, but primary header + * is valid, we can get backup header location from + * there. + */ + altlba = hdr_primary.hdr_lba_alt; + } + if (altlba == 0) + printf("%s: unable to locate backup GPT header\n", BOOTPROG); + else if (gptread_hdr("backup", dskp, &hdr_backup, altlba) == 0 && + gptread_table("backup", uuid, dskp, &hdr_backup, + table_backup) == 0) { + hdr_backup_lba = hdr_backup.hdr_lba_self; + if (hdr_primary_lba == 0) { + gpthdr = &hdr_backup; + gpttable = table_backup; + printf("%s: using backup GPT\n", BOOTPROG); + } + } + + /* + * Convert all BOOTONCE without BOOTME flags into BOOTFAILED. + * BOOTONCE without BOOTME means that we tried to boot from it, + * but failed after leaving gptboot and machine was rebooted. + * We don't want to leave partitions marked as BOOTONCE only, + * because when we boot successfully start-up scripts should + * find at most one partition with only BOOTONCE flag and this + * will mean that we booted from that partition. + */ + if (hdr_primary_lba != 0) + gptbootconv("primary", dskp, &hdr_primary, table_primary); + if (hdr_backup_lba != 0) + gptbootconv("backup", dskp, &hdr_backup, table_backup); + + if (hdr_primary_lba == 0 && hdr_backup_lba == 0) + return (-1); + return (0); +} Copied: stable/8/sys/boot/common/gpt.h (from r213136, head/sys/boot/common/gpt.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/common/gpt.h Sun Oct 17 20:10:00 2010 (r213994, copy of r213136, head/sys/boot/common/gpt.h) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2010 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _GPT_H_ +#define _GPT_H_ + +#include +#include + +int gptread(const uuid_t *uuid, struct dsk *dskp, char *buf); +int gptfind(const uuid_t *uuid, struct dsk *dskp, int part); +void gptbootfailed(struct dsk *dskp); + +#endif /* !_GPT_H_ */ Copied: stable/8/sys/boot/common/util.c (from r213136, head/sys/boot/common/util.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/common/util.c Sun Oct 17 20:10:00 2010 (r213994, copy of r213136, head/sys/boot/common/util.c) @@ -0,0 +1,176 @@ +/*- + * Copyright (c) 1998 Robert Nordier + * Copyright (c) 2010 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms are freely + * permitted provided that the above copyright notice and this + * paragraph and the following disclaimer are duplicated in all + * such forms. + * + * This software is provided "AS IS" and without any express or + * implied warranties, including, without limitation, the implied + * warranties of merchantability and fitness for a particular + * purpose. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include + +#include "cons.h" +#include "util.h" + +void +memcpy(void *dst, const void *src, int len) +{ + const char *s = src; + char *d = dst; + + while (len--) + *d++ = *s++; +} + +void +memset(void *b, int c, size_t len) +{ + char *bp = b; + + while (len--) + *bp++ = (unsigned char)c; +} + +int +memcmp(const void *b1, const void *b2, size_t len) +{ + const unsigned char *p1, *p2; + + for (p1 = b1, p2 = b2; len > 0; len--, p1++, p2++) { + if (*p1 != *p2) + return ((*p1) - (*p2)); + } + return (0); +} + +int +strcmp(const char *s1, const char *s2) +{ + + for (; *s1 == *s2 && *s1 != '\0'; s1++, s2++) + ; + return ((unsigned char)*s1 - (unsigned char)*s2); +} + +int +strncmp(const char *s1, const char *s2, size_t len) +{ + + for (; *s1 == *s2 && *s1 != '\0' && len > 0; len--, s1++, s2++) + ; + return ((unsigned char)*s1 - (unsigned char)*s2); +} + +void +strcpy(char *dst, const char *src) +{ + + while (*src != '\0') + *dst++ = *src++; + *dst = '\0'; +} + +void +strcat(char *dst, const char *src) +{ + + while (*dst != '\0') + dst++; + while (*src != '\0') + *dst++ = *src++; + *dst = '\0'; +} + +char * +strchr(const char *s, char ch) +{ + + for (; *s != '\0'; s++) { + if (*s == ch) + return ((char *)(uintptr_t)(const void *)s); + } + return (NULL); +} + +size_t +strlen(const char *s) +{ + size_t len = 0; + + while (*s++ != '\0') + len++; + return (len); +} + +void +printf(const char *fmt, ...) +{ + va_list ap; + const char *hex = "0123456789abcdef"; + char buf[10], *s; + unsigned long long u; + int c, l; + + va_start(ap, fmt); + while ((c = *fmt++) != '\0') { + if (c != '%') { + putchar(c); + continue; + } + l = 0; +nextfmt: + c = *fmt++; + switch (c) { + case 'l': + l++; + goto nextfmt; + case 'c': + putchar(va_arg(ap, int)); + break; + case 's': + for (s = va_arg(ap, char *); *s != '\0'; s++) + putchar(*s); + break; + case 'd': /* A lie, always prints unsigned */ + case 'u': + case 'x': + switch (l) { + case 2: + u = va_arg(ap, unsigned long long); + break; + case 1: + u = va_arg(ap, unsigned long); + break; + default: + u = va_arg(ap, unsigned int); + break; + } + s = buf; + if (c == 'd' || c == 'u') { + do + *s++ = '0' + (u % 10U); + while (u /= 10); + } else { + do + *s++ = hex[u & 0xfu]; + while (u >>= 4); + } + while (--s >= buf) + putchar(*s); + break; + } + } + va_end(ap); +} Copied: stable/8/sys/boot/common/util.h (from r213136, head/sys/boot/common/util.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/common/util.h Sun Oct 17 20:10:00 2010 (r213994, copy of r213136, head/sys/boot/common/util.h) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2010 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _UTIL_H_ +#define _UTIL_H_ + +#include + +#include + +void memcpy(void *dst, const void *src, int len); +void memset(void *b, int c, size_t len); +int memcmp(const void *b1, const void *b2, size_t len); + +#define bcpy(src, dst, len) memcpy((dst), (src), (len)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Oct 18 08:54:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E5321065679; Mon, 18 Oct 2010 08:54:34 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 254EA8FC21; Mon, 18 Oct 2010 08:54: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 o9I8sYHw037231; Mon, 18 Oct 2010 08:54:34 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9I8sXgx037212; Mon, 18 Oct 2010 08:54:33 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201010180854.o9I8sXgx037212@svn.freebsd.org> From: Martin Matuska Date: Mon, 18 Oct 2010 08:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214013 - in stable/8: cddl/contrib/opensolaris/cmd/zinject cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs ... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 08:54:34 -0000 Author: mm Date: Mon Oct 18 08:54:33 2010 New Revision: 214013 URL: http://svn.freebsd.org/changeset/base/214013 Log: MFC r213197, r213198: MFC r213197: Enable offlining of log devices. OpenSolaris revision and Bug IDs: 9701:cc5b64682e64 6803605 should be able to offline log devices 6726045 vdev_deflate_ratio is not set when offlining a log device 6599442 zpool import has faults in the display MFC r213198: Properly handle IO with B_FAILFAST Retry IO once with ZIO_FLAG_TRYHARD before declaring a pool faulted OpenSolaris revision and Bug IDs: 9725:0bf7402e8022 6843014 ZFS B_FAILFAST handling is broken As FreeBSD does not support B_FAILFAST and we don't use vdev_disk.c, MFC of r213198 is a no-op with the purpose of diff reduction against latest ZFS code and making future updates easier. Approved by: delphij (mentor) Obtained from: OpenSolaris (Bug ID 6803605, 6726045, 6599442, 6843014) Modified: stable/8/cddl/contrib/opensolaris/cmd/zinject/zinject.c stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zinject/zinject.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zinject/zinject.c Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/cddl/contrib/opensolaris/cmd/zinject/zinject.c Mon Oct 18 08:54:33 2010 (r214013) @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * ZFS Fault Injector * @@ -227,7 +225,7 @@ usage(void) "\t\tClear the particular record (if given a numeric ID), or\n" "\t\tall records if 'all' is specificed.\n" "\n" - "\tzinject -d device [-e errno] [-L ] pool\n" + "\tzinject -d device [-e errno] [-L ] [-F] pool\n" "\t\tInject a fault into a particular device or the device's\n" "\t\tlabel. Label injection can either be 'nvlist' or 'uber'.\n" "\t\t'errno' can either be 'nxio' (the default) or 'io'.\n" @@ -519,7 +517,7 @@ main(int argc, char **argv) return (0); } - while ((c = getopt(argc, argv, ":ab:d:f:qhc:t:l:mr:e:uL:")) != -1) { + while ((c = getopt(argc, argv, ":ab:d:f:Fqhc:t:l:mr:e:uL:")) != -1) { switch (c) { case 'a': flags |= ZINJECT_FLUSH_ARC; @@ -556,6 +554,9 @@ main(int argc, char **argv) return (1); } break; + case 'F': + record.zi_failfast = B_TRUE; + break; case 'h': usage(); return (0); Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Oct 18 08:54:33 2010 (r214013) @@ -980,14 +980,189 @@ max_width(zpool_handle_t *zhp, nvlist_t return (max); } +typedef struct spare_cbdata { + uint64_t cb_guid; + zpool_handle_t *cb_zhp; +} spare_cbdata_t; + +static boolean_t +find_vdev(nvlist_t *nv, uint64_t search) +{ + uint64_t guid; + nvlist_t **child; + uint_t c, children; + + if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &guid) == 0 && + search == guid) + return (B_TRUE); + + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, + &child, &children) == 0) { + for (c = 0; c < children; c++) + if (find_vdev(child[c], search)) + return (B_TRUE); + } + + return (B_FALSE); +} + +static int +find_spare(zpool_handle_t *zhp, void *data) +{ + spare_cbdata_t *cbp = data; + nvlist_t *config, *nvroot; + + config = zpool_get_config(zhp, NULL); + verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, + &nvroot) == 0); + + if (find_vdev(nvroot, cbp->cb_guid)) { + cbp->cb_zhp = zhp; + return (1); + } + + zpool_close(zhp); + return (0); +} + +/* + * Print out configuration state as requested by status_callback. + */ +void +print_status_config(zpool_handle_t *zhp, const char *name, nvlist_t *nv, + int namewidth, int depth, boolean_t isspare) +{ + nvlist_t **child; + uint_t c, children; + vdev_stat_t *vs; + char rbuf[6], wbuf[6], cbuf[6], repaired[7]; + char *vname; + uint64_t notpresent; + spare_cbdata_t cb; + char *state; + + verify(nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_STATS, + (uint64_t **)&vs, &c) == 0); + + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, + &child, &children) != 0) + children = 0; + + state = zpool_state_to_name(vs->vs_state, vs->vs_aux); + if (isspare) { + /* + * For hot spares, we use the terms 'INUSE' and 'AVAILABLE' for + * online drives. + */ + if (vs->vs_aux == VDEV_AUX_SPARED) + state = "INUSE"; + else if (vs->vs_state == VDEV_STATE_HEALTHY) + state = "AVAIL"; + } + + (void) printf("\t%*s%-*s %-8s", depth, "", namewidth - depth, + name, state); + + if (!isspare) { + zfs_nicenum(vs->vs_read_errors, rbuf, sizeof (rbuf)); + zfs_nicenum(vs->vs_write_errors, wbuf, sizeof (wbuf)); + zfs_nicenum(vs->vs_checksum_errors, cbuf, sizeof (cbuf)); + (void) printf(" %5s %5s %5s", rbuf, wbuf, cbuf); + } + + if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_NOT_PRESENT, + ¬present) == 0) { + char *path; + verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0); + (void) printf(" was %s", path); + } else if (vs->vs_aux != 0) { + (void) printf(" "); + + switch (vs->vs_aux) { + case VDEV_AUX_OPEN_FAILED: + (void) printf(gettext("cannot open")); + break; + + case VDEV_AUX_BAD_GUID_SUM: + (void) printf(gettext("missing device")); + break; + + case VDEV_AUX_NO_REPLICAS: + (void) printf(gettext("insufficient replicas")); + break; + + case VDEV_AUX_VERSION_NEWER: + (void) printf(gettext("newer version")); + break; + + case VDEV_AUX_SPARED: + verify(nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, + &cb.cb_guid) == 0); + if (zpool_iter(g_zfs, find_spare, &cb) == 1) { + if (strcmp(zpool_get_name(cb.cb_zhp), + zpool_get_name(zhp)) == 0) + (void) printf(gettext("currently in " + "use")); + else + (void) printf(gettext("in use by " + "pool '%s'"), + zpool_get_name(cb.cb_zhp)); + zpool_close(cb.cb_zhp); + } else { + (void) printf(gettext("currently in use")); + } + break; + + case VDEV_AUX_ERR_EXCEEDED: + (void) printf(gettext("too many errors")); + break; + + case VDEV_AUX_IO_FAILURE: + (void) printf(gettext("experienced I/O failures")); + break; + + case VDEV_AUX_BAD_LOG: + (void) printf(gettext("bad intent log")); + break; + + default: + (void) printf(gettext("corrupted data")); + break; + } + } else if (vs->vs_scrub_repaired != 0 && children == 0) { + /* + * Report bytes resilvered/repaired on leaf devices. + */ + zfs_nicenum(vs->vs_scrub_repaired, repaired, sizeof (repaired)); + (void) printf(gettext(" %s %s"), repaired, + (vs->vs_scrub_type == POOL_SCRUB_RESILVER) ? + "resilvered" : "repaired"); + } + + (void) printf("\n"); + + for (c = 0; c < children; c++) { + uint64_t is_log = B_FALSE; + + /* Don't print logs here */ + (void) nvlist_lookup_uint64(child[c], ZPOOL_CONFIG_IS_LOG, + &is_log); + if (is_log) + continue; + vname = zpool_vdev_name(g_zfs, zhp, child[c]); + print_status_config(zhp, vname, child[c], + namewidth, depth + 2, isspare); + free(vname); + } +} + /* * Print the configuration of an exported pool. Iterate over all vdevs in the * pool, printing out the name and status for each one. */ void -print_import_config(const char *name, nvlist_t *nv, int namewidth, int depth, - boolean_t print_logs) +print_import_config(const char *name, nvlist_t *nv, int namewidth, int depth) { nvlist_t **child; uint_t c, children; @@ -1044,12 +1219,11 @@ print_import_config(const char *name, nv (void) nvlist_lookup_uint64(child[c], ZPOOL_CONFIG_IS_LOG, &is_log); - if ((is_log && !print_logs) || (!is_log && print_logs)) + if (is_log) continue; vname = zpool_vdev_name(g_zfs, NULL, child[c]); - print_import_config(vname, child[c], - namewidth, depth + 2, B_FALSE); + print_import_config(vname, child[c], namewidth, depth + 2); free(vname); } @@ -1075,6 +1249,43 @@ print_import_config(const char *name, nv } /* + * Print log vdevs. + * Logs are recorded as top level vdevs in the main pool child array + * but with "is_log" set to 1. We use either print_status_config() or + * print_import_config() to print the top level logs then any log + * children (eg mirrored slogs) are printed recursively - which + * works because only the top level vdev is marked "is_log" + */ +static void +print_logs(zpool_handle_t *zhp, nvlist_t *nv, int namewidth, boolean_t verbose) +{ + uint_t c, children; + nvlist_t **child; + + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, &child, + &children) != 0) + return; + + (void) printf(gettext("\tlogs\n")); + + for (c = 0; c < children; c++) { + uint64_t is_log = B_FALSE; + char *name; + + (void) nvlist_lookup_uint64(child[c], ZPOOL_CONFIG_IS_LOG, + &is_log); + if (!is_log) + continue; + name = zpool_vdev_name(g_zfs, zhp, child[c]); + if (verbose) + print_status_config(zhp, name, child[c], namewidth, + 2, B_FALSE); + else + print_import_config(name, child[c], namewidth, 2); + free(name); + } +} +/* * Display the status for the given pool. */ static void @@ -1242,11 +1453,9 @@ show_import(nvlist_t *config) if (namewidth < 10) namewidth = 10; - print_import_config(name, nvroot, namewidth, 0, B_FALSE); - if (num_logs(nvroot) > 0) { - (void) printf(gettext("\tlogs\n")); - print_import_config(name, nvroot, namewidth, 0, B_TRUE); - } + print_import_config(name, nvroot, namewidth, 0); + if (num_logs(nvroot) > 0) + print_logs(NULL, nvroot, namewidth, B_FALSE); if (reason == ZPOOL_STATUS_BAD_GUID_SUM) { (void) printf(gettext("\n\tAdditional devices are known to " @@ -2717,182 +2926,6 @@ print_scrub_status(nvlist_t *nvroot) (u_longlong_t)(minutes_left / 60), (uint_t)(minutes_left % 60)); } -typedef struct spare_cbdata { - uint64_t cb_guid; - zpool_handle_t *cb_zhp; -} spare_cbdata_t; - -static boolean_t -find_vdev(nvlist_t *nv, uint64_t search) -{ - uint64_t guid; - nvlist_t **child; - uint_t c, children; - - if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &guid) == 0 && - search == guid) - return (B_TRUE); - - if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, - &child, &children) == 0) { - for (c = 0; c < children; c++) - if (find_vdev(child[c], search)) - return (B_TRUE); - } - - return (B_FALSE); -} - -static int -find_spare(zpool_handle_t *zhp, void *data) -{ - spare_cbdata_t *cbp = data; - nvlist_t *config, *nvroot; - - config = zpool_get_config(zhp, NULL); - verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, - &nvroot) == 0); - - if (find_vdev(nvroot, cbp->cb_guid)) { - cbp->cb_zhp = zhp; - return (1); - } - - zpool_close(zhp); - return (0); -} - -/* - * Print out configuration state as requested by status_callback. - */ -void -print_status_config(zpool_handle_t *zhp, const char *name, nvlist_t *nv, - int namewidth, int depth, boolean_t isspare) -{ - nvlist_t **child; - uint_t c, children; - vdev_stat_t *vs; - char rbuf[6], wbuf[6], cbuf[6], repaired[7]; - char *vname; - uint64_t notpresent; - spare_cbdata_t cb; - char *state; - - verify(nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_STATS, - (uint64_t **)&vs, &c) == 0); - - if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, - &child, &children) != 0) - children = 0; - - state = zpool_state_to_name(vs->vs_state, vs->vs_aux); - if (isspare) { - /* - * For hot spares, we use the terms 'INUSE' and 'AVAILABLE' for - * online drives. - */ - if (vs->vs_aux == VDEV_AUX_SPARED) - state = "INUSE"; - else if (vs->vs_state == VDEV_STATE_HEALTHY) - state = "AVAIL"; - } - - (void) printf("\t%*s%-*s %-8s", depth, "", namewidth - depth, - name, state); - - if (!isspare) { - zfs_nicenum(vs->vs_read_errors, rbuf, sizeof (rbuf)); - zfs_nicenum(vs->vs_write_errors, wbuf, sizeof (wbuf)); - zfs_nicenum(vs->vs_checksum_errors, cbuf, sizeof (cbuf)); - (void) printf(" %5s %5s %5s", rbuf, wbuf, cbuf); - } - - if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_NOT_PRESENT, - ¬present) == 0) { - char *path; - verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0); - (void) printf(" was %s", path); - } else if (vs->vs_aux != 0) { - (void) printf(" "); - - switch (vs->vs_aux) { - case VDEV_AUX_OPEN_FAILED: - (void) printf(gettext("cannot open")); - break; - - case VDEV_AUX_BAD_GUID_SUM: - (void) printf(gettext("missing device")); - break; - - case VDEV_AUX_NO_REPLICAS: - (void) printf(gettext("insufficient replicas")); - break; - - case VDEV_AUX_VERSION_NEWER: - (void) printf(gettext("newer version")); - break; - - case VDEV_AUX_SPARED: - verify(nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, - &cb.cb_guid) == 0); - if (zpool_iter(g_zfs, find_spare, &cb) == 1) { - if (strcmp(zpool_get_name(cb.cb_zhp), - zpool_get_name(zhp)) == 0) - (void) printf(gettext("currently in " - "use")); - else - (void) printf(gettext("in use by " - "pool '%s'"), - zpool_get_name(cb.cb_zhp)); - zpool_close(cb.cb_zhp); - } else { - (void) printf(gettext("currently in use")); - } - break; - - case VDEV_AUX_ERR_EXCEEDED: - (void) printf(gettext("too many errors")); - break; - - case VDEV_AUX_IO_FAILURE: - (void) printf(gettext("experienced I/O failures")); - break; - - case VDEV_AUX_BAD_LOG: - (void) printf(gettext("bad intent log")); - break; - - default: - (void) printf(gettext("corrupted data")); - break; - } - } else if (vs->vs_scrub_repaired != 0 && children == 0) { - /* - * Report bytes resilvered/repaired on leaf devices. - */ - zfs_nicenum(vs->vs_scrub_repaired, repaired, sizeof (repaired)); - (void) printf(gettext(" %s %s"), repaired, - (vs->vs_scrub_type == POOL_SCRUB_RESILVER) ? - "resilvered" : "repaired"); - } - - (void) printf("\n"); - - for (c = 0; c < children; c++) { - uint64_t is_log = B_FALSE; - - /* Don't print logs here */ - (void) nvlist_lookup_uint64(child[c], ZPOOL_CONFIG_IS_LOG, - &is_log); - if (is_log) - continue; - vname = zpool_vdev_name(g_zfs, zhp, child[c]); - print_status_config(zhp, vname, child[c], - namewidth, depth + 2, isspare); - free(vname); - } -} - static void print_error_log(zpool_handle_t *zhp) { @@ -2969,39 +3002,6 @@ print_l2cache(zpool_handle_t *zhp, nvlis } /* - * Print log vdevs. - * Logs are recorded as top level vdevs in the main pool child array but with - * "is_log" set to 1. We use print_status_config() to print the top level logs - * then any log children (eg mirrored slogs) are printed recursively - which - * works because only the top level vdev is marked "is_log" - */ -static void -print_logs(zpool_handle_t *zhp, nvlist_t *nv, int namewidth) -{ - uint_t c, children; - nvlist_t **child; - - if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, &child, - &children) != 0) - return; - - (void) printf(gettext("\tlogs\n")); - - for (c = 0; c < children; c++) { - uint64_t is_log = B_FALSE; - char *name; - - (void) nvlist_lookup_uint64(child[c], ZPOOL_CONFIG_IS_LOG, - &is_log); - if (!is_log) - continue; - name = zpool_vdev_name(g_zfs, zhp, child[c]); - print_status_config(zhp, name, child[c], namewidth, 2, B_FALSE); - free(name); - } -} - -/* * Display a summary of pool status. Displays a summary such as: * * pool: tank @@ -3229,7 +3229,7 @@ status_callback(zpool_handle_t *zhp, voi namewidth, 0, B_FALSE); if (num_logs(nvroot) > 0) - print_logs(zhp, nvroot, namewidth); + print_logs(zhp, nvroot, namewidth, B_TRUE); if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, &l2cache, &nl2cache) == 0) print_l2cache(zhp, l2cache, nl2cache, namewidth); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Oct 18 08:54:33 2010 (r214013) @@ -116,6 +116,7 @@ enum { EZFS_VDEVNOTSUP, /* unsupported vdev type */ EZFS_NOTSUP, /* ops not supported on this dataset */ EZFS_ACTIVE_SPARE, /* pool has active shared spare devices */ + EZFS_UNPLAYED_LOGS, /* log device has unplayed logs */ EZFS_UNKNOWN }; Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Oct 18 08:54:33 2010 (r214013) @@ -1720,6 +1720,12 @@ zpool_vdev_fault(zpool_handle_t *zhp, ui */ return (zfs_error(hdl, EZFS_NOREPLICAS, msg)); + case EEXIST: + /* + * The log device has unplayed logs + */ + return (zfs_error(hdl, EZFS_UNPLAYED_LOGS, msg)); + default: return (zpool_standard_error(hdl, errno, msg)); } Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Mon Oct 18 08:54:33 2010 (r214013) @@ -210,6 +210,9 @@ libzfs_error_description(libzfs_handle_t case EZFS_ACTIVE_SPARE: return (dgettext(TEXT_DOMAIN, "pool has active shared spare " "device")); + case EZFS_UNPLAYED_LOGS: + return (dgettext(TEXT_DOMAIN, "log device has unplayed intent " + "logs")); case EZFS_UNKNOWN: return (dgettext(TEXT_DOMAIN, "unknown error")); default: Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c Mon Oct 18 08:54:33 2010 (r214013) @@ -351,7 +351,7 @@ traverse_zil_block(zilog_t *zilog, blkpt return; /* - * One block ("stumpy") can be allocated a long time ago; we + * One block ("stubby") can be allocated a long time ago; we * want to visit that one because it has been allocated * (on-disk) even if it hasn't been claimed (even though for * plain scrub there's nothing to do to it). Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Oct 18 08:54:33 2010 (r214013) @@ -1110,6 +1110,33 @@ spa_check_removed(vdev_t *vd) } /* + * Load the slog device state from the config object since it's possible + * that the label does not contain the most up-to-date information. + */ +void +spa_load_log_state(spa_t *spa) +{ + nvlist_t *nv, *nvroot, **child; + uint64_t is_log; + uint_t children, c; + vdev_t *rvd = spa->spa_root_vdev; + + VERIFY(load_nvlist(spa, spa->spa_config_object, &nv) == 0); + VERIFY(nvlist_lookup_nvlist(nv, ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); + VERIFY(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, + &child, &children) == 0); + + for (c = 0; c < children; c++) { + vdev_t *tvd = rvd->vdev_child[c]; + + if (nvlist_lookup_uint64(child[c], ZPOOL_CONFIG_IS_LOG, + &is_log) == 0 && is_log) + vdev_load_log_state(tvd, child[c]); + } + nvlist_free(nv); +} + +/* * Check for missing log devices */ int @@ -1125,13 +1152,7 @@ spa_check_logs(spa_t *spa) return (1); } break; - - case SPA_LOG_CLEAR: - (void) dmu_objset_find(spa->spa_name, zil_clear_log_chain, NULL, - DS_FIND_CHILDREN); - break; } - spa->spa_log_state = SPA_LOG_GOOD; return (0); } @@ -1455,6 +1476,8 @@ spa_load(spa_t *spa, nvlist_t *config, s spa_config_exit(spa, SCL_ALL, FTAG); } + spa_load_log_state(spa); + if (spa_check_logs(spa)) { vdev_set_state(rvd, B_TRUE, VDEV_STATE_CANT_OPEN, VDEV_AUX_BAD_LOG); @@ -1542,6 +1565,7 @@ spa_load(spa_t *spa, nvlist_t *config, s zil_claim, tx, DS_FIND_CHILDREN); dmu_tx_commit(tx); + spa->spa_log_state = SPA_LOG_GOOD; spa->spa_sync_on = B_TRUE; txg_sync_start(spa->spa_dsl_pool); @@ -4222,10 +4246,16 @@ spa_sync(spa_t *spa, uint64_t txg) if (svdcount == SPA_DVAS_PER_BP) break; } - error = vdev_config_sync(svd, svdcount, txg); + error = vdev_config_sync(svd, svdcount, txg, B_FALSE); + if (error != 0) + error = vdev_config_sync(svd, svdcount, txg, + B_TRUE); } else { error = vdev_config_sync(rvd->vdev_child, - rvd->vdev_children, txg); + rvd->vdev_children, txg, B_FALSE); + if (error != 0) + error = vdev_config_sync(rvd->vdev_child, + rvd->vdev_children, txg, B_TRUE); } spa_config_exit(spa, SCL_STATE, FTAG); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h Mon Oct 18 08:54:33 2010 (r214013) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -113,7 +113,8 @@ extern void vdev_queue_io_done(zio_t *zi extern void vdev_config_dirty(vdev_t *vd); extern void vdev_config_clean(vdev_t *vd); -extern int vdev_config_sync(vdev_t **svd, int svdcount, uint64_t txg); +extern int vdev_config_sync(vdev_t **svd, int svdcount, uint64_t txg, + boolean_t); extern void vdev_state_dirty(vdev_t *vd); extern void vdev_state_clean(vdev_t *vd); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Mon Oct 18 08:54:33 2010 (r214013) @@ -259,6 +259,7 @@ extern void vdev_remove_parent(vdev_t *c /* * vdev sync load and sync */ +extern void vdev_load_log_state(vdev_t *vd, nvlist_t *nv); extern void vdev_load(vdev_t *vd); extern void vdev_sync(vdev_t *vd, uint64_t txg); extern void vdev_sync_done(vdev_t *vd, uint64_t txg); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Mon Oct 18 08:54:33 2010 (r214013) @@ -118,7 +118,7 @@ typedef struct zinject_record { uint32_t zi_error; uint64_t zi_type; uint32_t zi_freq; - uint32_t zi_pad; /* pad out to 64 bit alignment */ + uint32_t zi_failfast; } zinject_record_t; #define ZINJECT_NULL 0x1 Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h Mon Oct 18 08:54:33 2010 (r214013) @@ -366,9 +366,9 @@ extern uint64_t zil_itx_assign(zilog_t * extern void zil_commit(zilog_t *zilog, uint64_t seq, uint64_t oid); +extern int zil_vdev_offline(char *osname, void *txarg); extern int zil_claim(char *osname, void *txarg); extern int zil_check_log_chain(char *osname, void *txarg); -extern int zil_clear_log_chain(char *osname, void *txarg); extern void zil_sync(zilog_t *zilog, dmu_tx_t *tx); extern void zil_clean(zilog_t *zilog); extern int zil_is_committed(zilog_t *zilog); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Mon Oct 18 08:54:33 2010 (r214013) @@ -117,31 +117,33 @@ enum zio_compress { #define ZIO_PRIORITY_SCRUB (zio_priority_table[10]) #define ZIO_PRIORITY_TABLE_SIZE 11 -#define ZIO_FLAG_MUSTSUCCEED 0x00000 -#define ZIO_FLAG_CANFAIL 0x00001 -#define ZIO_FLAG_SPECULATIVE 0x00002 -#define ZIO_FLAG_CONFIG_WRITER 0x00004 -#define ZIO_FLAG_DONT_RETRY 0x00008 - -#define ZIO_FLAG_DONT_CACHE 0x00010 -#define ZIO_FLAG_DONT_QUEUE 0x00020 -#define ZIO_FLAG_DONT_AGGREGATE 0x00040 -#define ZIO_FLAG_DONT_PROPAGATE 0x00080 - -#define ZIO_FLAG_IO_BYPASS 0x00100 -#define ZIO_FLAG_IO_REPAIR 0x00200 -#define ZIO_FLAG_IO_RETRY 0x00400 -#define ZIO_FLAG_IO_REWRITE 0x00800 - -#define ZIO_FLAG_SELF_HEAL 0x01000 -#define ZIO_FLAG_RESILVER 0x02000 -#define ZIO_FLAG_SCRUB 0x04000 -#define ZIO_FLAG_SCRUB_THREAD 0x08000 - -#define ZIO_FLAG_PROBE 0x10000 -#define ZIO_FLAG_GANG_CHILD 0x20000 -#define ZIO_FLAG_RAW 0x40000 -#define ZIO_FLAG_GODFATHER 0x80000 +#define ZIO_FLAG_MUSTSUCCEED 0x000000 +#define ZIO_FLAG_CANFAIL 0x000001 +#define ZIO_FLAG_SPECULATIVE 0x000002 +#define ZIO_FLAG_CONFIG_WRITER 0x000004 +#define ZIO_FLAG_DONT_RETRY 0x000008 + +#define ZIO_FLAG_DONT_CACHE 0x000010 +#define ZIO_FLAG_DONT_QUEUE 0x000020 +#define ZIO_FLAG_DONT_AGGREGATE 0x000040 +#define ZIO_FLAG_DONT_PROPAGATE 0x000080 + +#define ZIO_FLAG_IO_BYPASS 0x000100 +#define ZIO_FLAG_IO_REPAIR 0x000200 +#define ZIO_FLAG_IO_RETRY 0x000400 +#define ZIO_FLAG_IO_REWRITE 0x000800 + +#define ZIO_FLAG_SELF_HEAL 0x001000 +#define ZIO_FLAG_RESILVER 0x002000 +#define ZIO_FLAG_SCRUB 0x004000 +#define ZIO_FLAG_SCRUB_THREAD 0x008000 + +#define ZIO_FLAG_PROBE 0x010000 +#define ZIO_FLAG_GANG_CHILD 0x020000 +#define ZIO_FLAG_RAW 0x040000 +#define ZIO_FLAG_GODFATHER 0x080000 + +#define ZIO_FLAG_TRYHARD 0x100000 #define ZIO_FLAG_GANG_INHERIT \ (ZIO_FLAG_CANFAIL | \ @@ -159,7 +161,8 @@ enum zio_compress { (ZIO_FLAG_GANG_INHERIT | \ ZIO_FLAG_IO_REPAIR | \ ZIO_FLAG_IO_RETRY | \ - ZIO_FLAG_PROBE) + ZIO_FLAG_PROBE | \ + ZIO_FLAG_TRYHARD) #define ZIO_FLAG_AGG_INHERIT \ (ZIO_FLAG_DONT_AGGREGATE | \ @@ -440,7 +443,7 @@ extern int zio_inject_list_next(int *id, struct zinject_record *record); extern int zio_clear_fault(int id); extern int zio_handle_fault_injection(zio_t *zio, int error); -extern int zio_handle_device_injection(vdev_t *vd, int error); +extern int zio_handle_device_injection(vdev_t *vd, zio_t *zio, int error); extern int zio_handle_label_injection(zio_t *zio, int error); #ifdef __cplusplus Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Oct 18 08:36:03 2010 (r214012) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Oct 18 08:54:33 2010 (r214013) @@ -39,6 +39,7 @@ #include #include #include +#include SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CTLFLAG_RW, 0, "ZFS VDEV"); @@ -765,6 +766,15 @@ vdev_metaslab_init(vdev_t *vd, uint64_t if (vd->vdev_ms_shift == 0) /* not being allocated from yet */ return (0); + /* + * Compute the raidz-deflation ratio. Note, we hard-code + * in 128k (1 << 17) because it is the current "typical" blocksize. + * Even if SPA_MAXBLOCKSIZE changes, this algorithm must never change, + * or we will inconsistently account for existing bp's. + */ + vd->vdev_deflate_ratio = (1 << 17) / + (vdev_psize_to_asize(vd, 1 << 17) >> SPA_MINBLOCKSHIFT); + ASSERT(oldc <= newc); if (vd->vdev_islog) @@ -918,7 +928,7 @@ vdev_probe(vdev_t *vd, zio_t *zio) vps->vps_flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_PROBE | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_AGGREGATE | - ZIO_FLAG_DONT_RETRY; + ZIO_FLAG_TRYHARD; if (spa_config_held(spa, SCL_ZIO, RW_WRITER)) { /* @@ -998,6 +1008,8 @@ vdev_open(vdev_t *vd) vd->vdev_state == VDEV_STATE_OFFLINE); vd->vdev_stat.vs_aux = VDEV_AUX_NONE; + vd->vdev_cant_read = B_FALSE; + vd->vdev_cant_write = B_FALSE; if (!vd->vdev_removed && vd->vdev_faulted) { ASSERT(vd->vdev_children == 0); @@ -1013,7 +1025,7 @@ vdev_open(vdev_t *vd) error = vd->vdev_ops->vdev_op_open(vd, &osize, &ashift); if (zio_injection_enabled && error == 0) - error = zio_handle_device_injection(vd, ENXIO); + error = zio_handle_device_injection(vd, NULL, ENXIO); if (error) { if (vd->vdev_removed && @@ -1113,18 +1125,6 @@ vdev_open(vdev_t *vd) } /* - * If this is a top-level vdev, compute the raidz-deflation - * ratio. Note, we hard-code in 128k (1<<17) because it is the - * current "typical" blocksize. Even if SPA_MAXBLOCKSIZE - * changes, this algorithm must never change, or we will - * inconsistently account for existing bp's. - */ - if (vd->vdev_top == vd) { - vd->vdev_deflate_ratio = (1<<17) / - (vdev_psize_to_asize(vd, 1<<17) >> SPA_MINBLOCKSHIFT); - } - - /* * If a leaf vdev has a DTL, and seems healthy, then kick off a * resilver. But don't do this if we are doing a reopen for a scrub, * since this would just restart the scrub we are already doing. @@ -1937,7 +1937,8 @@ vdev_online(spa_t *spa, uint64_t guid, u int vdev_offline(spa_t *spa, uint64_t guid, uint64_t flags) { - vdev_t *vd; + vdev_t *vd, *tvd; + int error; spa_vdev_state_enter(spa); @@ -1947,34 +1948,58 @@ vdev_offline(spa_t *spa, uint64_t guid, if (!vd->vdev_ops->vdev_op_leaf) return (spa_vdev_state_exit(spa, NULL, ENOTSUP)); + tvd = vd->vdev_top; + /* * If the device isn't already offline, try to offline it. */ if (!vd->vdev_offline) { /* * If this device has the only valid copy of some data, - * don't allow it to be offlined. + * don't allow it to be offlined. Log devices are always + * expendable. */ - if (vd->vdev_aux == NULL && vdev_dtl_required(vd)) + if (!tvd->vdev_islog && vd->vdev_aux == NULL && + vdev_dtl_required(vd)) return (spa_vdev_state_exit(spa, NULL, EBUSY)); /* * Offline this device and reopen its top-level vdev. - * If this action results in the top-level vdev becoming - * unusable, undo it and fail the request. + * If the top-level vdev is a log device then just offline + * it. Otherwise, if this action results in the top-level + * vdev becoming unusable, undo it and fail the request. */ vd->vdev_offline = B_TRUE; - vdev_reopen(vd->vdev_top); - if (vd->vdev_aux == NULL && vdev_is_dead(vd->vdev_top)) { + vdev_reopen(tvd); + + if (!tvd->vdev_islog && vd->vdev_aux == NULL && + vdev_is_dead(tvd)) { vd->vdev_offline = B_FALSE; - vdev_reopen(vd->vdev_top); + vdev_reopen(tvd); return (spa_vdev_state_exit(spa, NULL, EBUSY)); } } vd->vdev_tmpoffline = !!(flags & ZFS_OFFLINE_TEMPORARY); - return (spa_vdev_state_exit(spa, vd, 0)); + if (!tvd->vdev_islog || !vdev_is_dead(tvd)) + return (spa_vdev_state_exit(spa, vd, 0)); + + (void) spa_vdev_state_exit(spa, vd, 0); + + error = dmu_objset_find(spa_name(spa), zil_vdev_offline, + NULL, DS_FIND_CHILDREN); + if (error) { + (void) vdev_online(spa, guid, 0, NULL); + return (error); + } + /* + * If we successfully offlined the log device then we need to + * sync out the current txg so that the "stubby" block can be + * removed by zil_sync(). + */ + txg_wait_synced(spa->spa_dsl_pool, 0); + return (0); } /* @@ -2182,6 +2207,16 @@ vdev_stat_update(zio_t *zio, uint64_t ps if (flags & ZIO_FLAG_SPECULATIVE) return; + /* + * If this is an I/O error that is going to be retried, then ignore the + * error. Otherwise, the user may interpret B_FAILFAST I/O errors as + * hard errors, when in reality they can happen for any number of + * innocuous reasons (bus resets, MPxIO link failure, etc). + */ + if (zio->io_error == EIO && + !(zio->io_flags & ZIO_FLAG_IO_RETRY)) + return; + mutex_enter(&vd->vdev_stat_lock); if (type == ZIO_TYPE_READ && !vdev_is_dead(vd)) { if (zio->io_error == ECKSUM) @@ -2279,6 +2314,7 @@ vdev_space_update(vdev_t *vd, int64_t sp * childrens', thus not accurate enough for us. */ ASSERT((dspace_delta & (SPA_MINBLOCKSIZE-1)) == 0); + ASSERT(vd->vdev_deflate_ratio != 0 || vd->vdev_isl2cache); dspace_delta = (dspace_delta >> SPA_MINBLOCKSHIFT) * vd->vdev_deflate_ratio; @@ -2631,11 +2667,7 @@ vdev_set_state(vdev_t *vd, boolean_t iso boolean_t vdev_is_bootable(vdev_t *vd) { -#ifdef __FreeBSD_version - return (B_TRUE); -#else - int c; - +#ifdef sun if (!vd->vdev_ops->vdev_op_leaf) { char *vdev_type = vd->vdev_ops->vdev_op_type; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Oct 18 09:26:39 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD31A1065670; Mon, 18 Oct 2010 09:26:39 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA3118FC0C; Mon, 18 Oct 2010 09:26: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 o9I9QdJc054051; Mon, 18 Oct 2010 09:26:39 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9I9QdMm054048; Mon, 18 Oct 2010 09:26:39 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201010180926.o9I9QdMm054048@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 18 Oct 2010 09:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214014 - stable/8/sys/boot/zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 09:26:39 -0000 Author: pjd Date: Mon Oct 18 09:26:39 2010 New Revision: 214014 URL: http://svn.freebsd.org/changeset/base/214014 Log: MFC r212382,r212383,r212384,r212387: r212382: Remove duplicated code. r212383: Allow to boot from a pool within which replacing is in progress. Before the change it wasn't possible and the following error was printed: ZFS: can only boot from disk, mirror or raidz vdevs Now if the original vdev (the one we are replacing) is still present we will read from it, but if it is not present we won't read from the new vdev, as it might not have enough valid data yet. r212384: Ignore log vdevs. r212387: Remove empty lines committed by accident. Modified: stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Mon Oct 18 08:54:33 2010 (r214013) +++ stable/8/sys/boot/zfs/zfsimpl.c Mon Oct 18 09:26:39 2010 (r214014) @@ -376,6 +376,27 @@ vdev_mirror_read(vdev_t *vdev, const blk return (rc); } +static int +vdev_replacing_read(vdev_t *vdev, const blkptr_t *bp, void *buf, + off_t offset, size_t bytes) +{ + vdev_t *kid; + + /* + * Here we should have two kids: + * First one which is the one we are replacing and we can trust + * only this one to have valid data, but it might not be present. + * Second one is that one we are replacing with. It is most likely + * healthy, but we can't trust it has needed data, so we won't use it. + */ + kid = STAILQ_FIRST(&vdev->v_children); + if (kid == NULL) + return (EIO); + if (kid->v_state != VDEV_STATE_HEALTHY) + return (EIO); + return (kid->v_read(kid, bp, buf, offset, bytes)); +} + static vdev_t * vdev_find(uint64_t guid) { @@ -416,7 +437,7 @@ vdev_init_from_nvlist(const unsigned cha vdev_t *vdev, *kid; const unsigned char *kids; int nkids, i, is_new; - uint64_t is_offline, is_faulted, is_degraded, is_removed; + uint64_t is_offline, is_faulted, is_degraded, is_removed, isnt_present; if (nvlist_find(nvlist, ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64, 0, &guid) @@ -430,12 +451,13 @@ vdev_init_from_nvlist(const unsigned cha if (strcmp(type, VDEV_TYPE_MIRROR) && strcmp(type, VDEV_TYPE_DISK) - && strcmp(type, VDEV_TYPE_RAIDZ)) { + && strcmp(type, VDEV_TYPE_RAIDZ) + && strcmp(type, VDEV_TYPE_REPLACING)) { printf("ZFS: can only boot from disk, mirror or raidz vdevs\n"); return (EIO); } - is_offline = is_removed = is_faulted = is_degraded = 0; + is_offline = is_removed = is_faulted = is_degraded = isnt_present = 0; nvlist_find(nvlist, ZPOOL_CONFIG_OFFLINE, DATA_TYPE_UINT64, 0, &is_offline); @@ -445,6 +467,8 @@ vdev_init_from_nvlist(const unsigned cha &is_faulted); nvlist_find(nvlist, ZPOOL_CONFIG_DEGRADED, DATA_TYPE_UINT64, 0, &is_degraded); + nvlist_find(nvlist, ZPOOL_CONFIG_NOT_PRESENT, DATA_TYPE_UINT64, 0, + &isnt_present); vdev = vdev_find(guid); if (!vdev) { @@ -454,6 +478,8 @@ vdev_init_from_nvlist(const unsigned cha vdev = vdev_create(guid, vdev_mirror_read); else if (!strcmp(type, VDEV_TYPE_RAIDZ)) vdev = vdev_create(guid, vdev_raidz_read); + else if (!strcmp(type, VDEV_TYPE_REPLACING)) + vdev = vdev_create(guid, vdev_replacing_read); else vdev = vdev_create(guid, vdev_disk_read); @@ -483,7 +509,16 @@ vdev_init_from_nvlist(const unsigned cha vdev->v_name = strdup(type); } } + } else { + is_new = 0; + } + if (is_new || is_newer) { + /* + * This is either new vdev or we've already seen this vdev, + * but from an older vdev label, so let's refresh its state + * from the newer label. + */ if (is_offline) vdev->v_state = VDEV_STATE_OFFLINE; else if (is_removed) @@ -492,28 +527,10 @@ vdev_init_from_nvlist(const unsigned cha vdev->v_state = VDEV_STATE_FAULTED; else if (is_degraded) vdev->v_state = VDEV_STATE_DEGRADED; + else if (isnt_present) + vdev->v_state = VDEV_STATE_CANT_OPEN; else vdev->v_state = VDEV_STATE_HEALTHY; - } else { - is_new = 0; - - if (is_newer) { - /* - * We've already seen this vdev, but from an older - * vdev label, so let's refresh its state from the - * newer label. - */ - if (is_offline) - vdev->v_state = VDEV_STATE_OFFLINE; - else if (is_removed) - vdev->v_state = VDEV_STATE_REMOVED; - else if (is_faulted) - vdev->v_state = VDEV_STATE_FAULTED; - else if (is_degraded) - vdev->v_state = VDEV_STATE_DEGRADED; - else - vdev->v_state = VDEV_STATE_HEALTHY; - } } rc = nvlist_find(nvlist, ZPOOL_CONFIG_CHILDREN, @@ -749,6 +766,7 @@ vdev_probe(vdev_phys_read_t *read, void uint64_t val; uint64_t guid; uint64_t pool_txg, pool_guid; + uint64_t is_log; const char *pool_name; const unsigned char *vdevs; int i, rc, is_newer; @@ -825,6 +843,12 @@ vdev_probe(vdev_phys_read_t *read, void return (EIO); } + is_log = 0; + (void) nvlist_find(nvlist, ZPOOL_CONFIG_IS_LOG, DATA_TYPE_UINT64, 0, + &is_log); + if (is_log) + return (EIO); + /* * Create the pool if this is the first time we've seen it. */ From owner-svn-src-stable@FreeBSD.ORG Mon Oct 18 12:12:39 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BEBF106566B; Mon, 18 Oct 2010 12:12:39 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDCCA8FC13; Mon, 18 Oct 2010 12:12:38 +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 o9ICCchA071171; Mon, 18 Oct 2010 12:12:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9ICCc1N071169; Mon, 18 Oct 2010 12:12:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201010181212.o9ICCc1N071169@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 18 Oct 2010 12:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214017 - stable/8/sys/cddl/boot/zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 12:12:39 -0000 Author: pjd Date: Mon Oct 18 12:12:38 2010 New Revision: 214017 URL: http://svn.freebsd.org/changeset/base/214017 Log: MFC r212407: Forgot to commit this file. Add ZPOOL_CONFIG_IS_LOG. Reported by: keramida, dhw Modified: stable/8/sys/cddl/boot/zfs/zfsimpl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/8/sys/cddl/boot/zfs/zfsimpl.h Mon Oct 18 11:30:13 2010 (r214016) +++ stable/8/sys/cddl/boot/zfs/zfsimpl.h Mon Oct 18 12:12:38 2010 (r214017) @@ -546,6 +546,7 @@ typedef enum { #define ZPOOL_CONFIG_NPARITY "nparity" #define ZPOOL_CONFIG_HOSTID "hostid" #define ZPOOL_CONFIG_HOSTNAME "hostname" +#define ZPOOL_CONFIG_IS_LOG "is_log" #define ZPOOL_CONFIG_TIMESTAMP "timestamp" /* not stored on disk */ /* From owner-svn-src-stable@FreeBSD.ORG Mon Oct 18 14:36:51 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Oct 18 14:40:49 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Mon Oct 18 15:00:02 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 661D71065674; Mon, 18 Oct 2010 15:00:02 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by mx1.freebsd.org (Postfix) with ESMTP id 11F858FC20; Mon, 18 Oct 2010 15:00:01 +0000 (UTC) Received: from ws64.jh.dy.fi (a91-153-123-205.elisa-laajakaista.fi [91.153.123.205]) by gw03.mail.saunalahti.fi (Postfix) with SMTP id DCBF521661D; Mon, 18 Oct 2010 17:43:54 +0300 (EEST) Date: Mon, 18 Oct 2010 17:43:53 +0300 From: Jaakko Heinonen To: "David E. O'Brien" Message-ID: <20101018144353.GA1381@ws64.jh.dy.fi> References: <201010140121.o9E1Li3e006863@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010140121.o9E1Li3e006863@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r213817 - in stable/8: . contrib/top etc/periodic/daily gnu/usr.bin lib/libusb release/picobsd/floppy.tree/sbin sbin/geom/class/sched tools/regression/lib/msun tools/regression/usr.bin/... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 15:00:02 -0000 On 2010-10-14, David E. O'Brien wrote: > MFC r212770 & r212832: > + Add the SCRIPT environmental variable to the sub-shell. > + Add the 'command' argument (if supplied on the command line) > to the typescript file. I don't think that this commit placed mergeinfo correctly. The mergeinfo should have been placed to usr.bin/script like r213828 did for stable/7. > Modified: > stable/8/usr.bin/script/script.1 > stable/8/usr.bin/script/script.c > Directory Properties: > stable/8/ (props changed) > stable/8/Makefile (props changed) > stable/8/Makefile.inc1 (props changed) > stable/8/ObsoleteFiles.inc (props changed) . . . > stable/8/usr.sbin/wpa/ (props changed) > stable/8/usr.sbin/ypserv/ (props changed) > stable/8/usr.sbin/zic/ (props changed) -- Jaakko From owner-svn-src-stable@FreeBSD.ORG Mon Oct 18 23:10:32 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C406106564A; Mon, 18 Oct 2010 23:10:32 +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 773118FC20; Mon, 18 Oct 2010 23:10:32 +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 o9INAWSR089631; Mon, 18 Oct 2010 23:10:32 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9INAWPU089616; Mon, 18 Oct 2010 23:10:32 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010182310.o9INAWPU089616@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 18 Oct 2010 23:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214045 - in stable/8/tools/regression/bin/sh: builtins errors execution expansion set-e X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 23:10:32 -0000 Author: obrien Date: Mon Oct 18 23:10:32 2010 New Revision: 214045 URL: http://svn.freebsd.org/changeset/base/214045 Log: MFC: r199955: disable job control when running 'sh -i' in the testsuite r204801: make sure to popredir() even if a special builtin caused an error r204802: make sure to popredir() even if a function caused an error r211399: get rid of unnecessary non-standard empty lists. r211609: add a test for breaking from a loop outside the current function r211622: test that all bytes from 128 to 255 can be used in IFS r211973: weaken builtins/command4 test to only require a non-0 exit status Added: stable/8/tools/regression/bin/sh/builtins/break3.0 - copied unchanged from r211609, head/tools/regression/bin/sh/builtins/break3.0 stable/8/tools/regression/bin/sh/builtins/command10.0 - copied unchanged from r204802, head/tools/regression/bin/sh/builtins/command10.0 stable/8/tools/regression/bin/sh/builtins/command4.0 - copied unchanged from r211973, head/tools/regression/bin/sh/builtins/command4.0 stable/8/tools/regression/bin/sh/builtins/command9.0 - copied unchanged from r204801, head/tools/regression/bin/sh/builtins/command9.0 stable/8/tools/regression/bin/sh/expansion/ifs3.0 - copied unchanged from r211622, head/tools/regression/bin/sh/expansion/ifs3.0 Deleted: stable/8/tools/regression/bin/sh/builtins/command4.127 Modified: stable/8/tools/regression/bin/sh/builtins/command3.0 stable/8/tools/regression/bin/sh/builtins/command5.0 stable/8/tools/regression/bin/sh/errors/backquote-error1.0 stable/8/tools/regression/bin/sh/execution/func2.0 stable/8/tools/regression/bin/sh/set-e/elif1.0 stable/8/tools/regression/bin/sh/set-e/elif2.0 stable/8/tools/regression/bin/sh/set-e/if1.0 stable/8/tools/regression/bin/sh/set-e/if3.0 stable/8/tools/regression/bin/sh/set-e/while1.0 stable/8/tools/regression/bin/sh/set-e/while2.0 Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Copied: stable/8/tools/regression/bin/sh/builtins/break3.0 (from r211609, head/tools/regression/bin/sh/builtins/break3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/break3.0 Mon Oct 18 23:10:32 2010 (r214045, copy of r211609, head/tools/regression/bin/sh/builtins/break3.0) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +# We accept this and people might rely on it. +# However, various other shells do not accept it. + +f() { + break + echo bad1 +} + +while :; do + f + echo bad2 + exit 2 +done Copied: stable/8/tools/regression/bin/sh/builtins/command10.0 (from r204802, head/tools/regression/bin/sh/builtins/command10.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/command10.0 Mon Oct 18 23:10:32 2010 (r214045, copy of r204802, head/tools/regression/bin/sh/builtins/command10.0) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$(f() { shift x; }; { command eval f 2>/dev/null; } >/dev/null; echo hi)" = hi' + +exit $((failures > 0)) Modified: stable/8/tools/regression/bin/sh/builtins/command3.0 ============================================================================== --- stable/8/tools/regression/bin/sh/builtins/command3.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/builtins/command3.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -4,6 +4,7 @@ command -v true command -v /bin/ls fun() { + : } command -v fun command -v break Copied: stable/8/tools/regression/bin/sh/builtins/command4.0 (from r211973, head/tools/regression/bin/sh/builtins/command4.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/command4.0 Mon Oct 18 23:10:32 2010 (r214045, copy of r211973, head/tools/regression/bin/sh/builtins/command4.0) @@ -0,0 +1,2 @@ +# $FreeBSD$ +! command -v nonexisting Modified: stable/8/tools/regression/bin/sh/builtins/command5.0 ============================================================================== --- stable/8/tools/regression/bin/sh/builtins/command5.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/builtins/command5.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -4,6 +4,7 @@ command -V true command -V /bin/ls fun() { + : } command -V fun command -V break Copied: stable/8/tools/regression/bin/sh/builtins/command9.0 (from r204801, head/tools/regression/bin/sh/builtins/command9.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/command9.0 Mon Oct 18 23:10:32 2010 (r214045, copy of r204801, head/tools/regression/bin/sh/builtins/command9.0) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$({ command eval shift x 2>/dev/null; } >/dev/null; echo hi)" = hi' + +exit $((failures > 0)) Modified: stable/8/tools/regression/bin/sh/errors/backquote-error1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/errors/backquote-error1.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/errors/backquote-error1.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -1,4 +1,4 @@ # $FreeBSD$ -echo 'echo `for` echo ".BAD"CODE.' | sh -i 2>&1 | grep -q BADCODE && exit 1 +echo 'echo `for` echo ".BAD"CODE.' | sh +m -i 2>&1 | grep -q BADCODE && exit 1 exit 0 Modified: stable/8/tools/regression/bin/sh/execution/func2.0 ============================================================================== --- stable/8/tools/regression/bin/sh/execution/func2.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/execution/func2.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -1,4 +1,5 @@ # $FreeBSD$ +# The empty pairs of braces here are to test that this does not cause a crash. f() { } f Copied: stable/8/tools/regression/bin/sh/expansion/ifs3.0 (from r211622, head/tools/regression/bin/sh/expansion/ifs3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/ifs3.0 Mon Oct 18 23:10:32 2010 (r214045, copy of r211622, head/tools/regression/bin/sh/expansion/ifs3.0) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +failures=0 +unset LC_ALL +export LC_CTYPE=en_US.ISO8859-1 +i=128 +set -f +while [ "$i" -le 255 ]; do + i2=$((i^2)) + c=$(printf \\"$(printf %o "$i")") + c2=$(printf \\"$(printf %o "$i2")") + IFS=$c + set -- $c2$c$c2$c$c2 + if [ "$#" -ne 3 ] || [ "$1" != "$c2" ] || [ "$2" != "$c2" ] || + [ "$3" != "$c2" ]; then + echo "Bad results for separator $i (word $i2)" >&2 + : $((failures += 1)) + fi + i=$((i+1)) +done +exit $((failures > 0)) Modified: stable/8/tools/regression/bin/sh/set-e/elif1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/set-e/elif1.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/set-e/elif1.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -1,5 +1,7 @@ # $FreeBSD$ set -e if false; then + : elif false; then + : fi Modified: stable/8/tools/regression/bin/sh/set-e/elif2.0 ============================================================================== --- stable/8/tools/regression/bin/sh/set-e/elif2.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/set-e/elif2.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -1,5 +1,7 @@ # $FreeBSD$ set -e if false; then + : elif false; false; then + : fi Modified: stable/8/tools/regression/bin/sh/set-e/if1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/set-e/if1.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/set-e/if1.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -1,4 +1,5 @@ # $FreeBSD$ set -e if false; then + : fi Modified: stable/8/tools/regression/bin/sh/set-e/if3.0 ============================================================================== --- stable/8/tools/regression/bin/sh/set-e/if3.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/set-e/if3.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -1,4 +1,5 @@ # $FreeBSD$ set -e if false; false; then + : fi Modified: stable/8/tools/regression/bin/sh/set-e/while1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/set-e/while1.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/set-e/while1.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -1,4 +1,5 @@ # $FreeBSD$ set -e while false; do + : done Modified: stable/8/tools/regression/bin/sh/set-e/while2.0 ============================================================================== --- stable/8/tools/regression/bin/sh/set-e/while2.0 Mon Oct 18 22:30:58 2010 (r214044) +++ stable/8/tools/regression/bin/sh/set-e/while2.0 Mon Oct 18 23:10:32 2010 (r214045) @@ -1,4 +1,5 @@ # $FreeBSD$ set -e while false; false; do + : done From owner-svn-src-stable@FreeBSD.ORG Tue Oct 19 09:25:58 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAB8310656A8; Tue, 19 Oct 2010 09:25:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A76088FC20; Tue, 19 Oct 2010 09:25:58 +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 o9J9Pwl5007152; Tue, 19 Oct 2010 09:25:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9J9PwWB007150; Tue, 19 Oct 2010 09:25:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201010190925.o9J9PwWB007150@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 19 Oct 2010 09:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214050 - stable/8/sys/compat/linprocfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 09:25:58 -0000 Author: kib Date: Tue Oct 19 09:25:58 2010 New Revision: 214050 URL: http://svn.freebsd.org/changeset/base/214050 Log: MFC r212723 (by des): Implement proc/$$/environment. MFC r213246: Rework linprocfs_doprocenviron() and linprocfs_doproccmdline(). Modified: stable/8/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/8/sys/compat/linprocfs/linprocfs.c Tue Oct 19 08:55:31 2010 (r214049) +++ stable/8/sys/compat/linprocfs/linprocfs.c Tue Oct 19 09:25:58 2010 (r214050) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -96,6 +97,10 @@ __FBSDID("$FreeBSD$"); #include #endif /* __i386__ || __amd64__ */ +#ifdef COMPAT_FREEBSD32 +#include +#endif + #ifdef COMPAT_LINUX32 /* XXX */ #include #else @@ -880,57 +885,172 @@ linprocfs_doprocroot(PFS_FILL_ARGS) return (0); } +#define MAX_ARGV_STR 512 /* Max number of argv-like strings */ +#define UIO_CHUNK_SZ 256 /* Max chunk size (bytes) for uiomove */ + +static int +linprocfs_doargv(struct thread *td, struct proc *p, struct sbuf *sb, + void (*resolver)(const struct ps_strings, u_long *, int *)) +{ + struct iovec iov; + struct uio tmp_uio; + struct ps_strings pss; + int ret, i, n_elements, elm_len; + u_long addr, pbegin; + char **env_vector, *envp; + char env_string[UIO_CHUNK_SZ]; +#ifdef COMPAT_FREEBSD32 + struct freebsd32_ps_strings pss32; + uint32_t *env_vector32; +#endif + +#define UIO_HELPER(uio, iov, base, len, cnt, offset, sz, flg, rw, td) \ +do { \ + iov.iov_base = (caddr_t)(base); \ + iov.iov_len = (len); \ + uio.uio_iov = &(iov); \ + uio.uio_iovcnt = (cnt); \ + uio.uio_offset = (off_t)(offset); \ + uio.uio_resid = (sz); \ + uio.uio_segflg = (flg); \ + uio.uio_rw = (rw); \ + uio.uio_td = (td); \ +} while (0) + + env_vector = malloc(sizeof(char *) * MAX_ARGV_STR, M_TEMP, M_WAITOK); + +#ifdef COMPAT_FREEBSD32 + env_vector32 = NULL; + if ((p->p_sysent->sv_flags & SV_ILP32) != 0) { + env_vector32 = malloc(sizeof(*env_vector32) * MAX_ARGV_STR, + M_TEMP, M_WAITOK); + elm_len = sizeof(int32_t); + envp = (char *)env_vector32; + + UIO_HELPER(tmp_uio, iov, &pss32, sizeof(pss32), 1, + (off_t)(p->p_sysent->sv_psstrings), + sizeof(pss32), UIO_SYSSPACE, UIO_READ, td); + ret = proc_rwmem(p, &tmp_uio); + if (ret != 0) + goto done; + pss.ps_argvstr = PTRIN(pss32.ps_argvstr); + pss.ps_nargvstr = pss32.ps_nargvstr; + pss.ps_envstr = PTRIN(pss32.ps_envstr); + pss.ps_nenvstr = pss32.ps_nenvstr; + } else { +#endif + elm_len = sizeof(char *); + envp = (char *)env_vector; + + UIO_HELPER(tmp_uio, iov, &pss, sizeof(pss), 1, + (off_t)(p->p_sysent->sv_psstrings), + sizeof(pss), UIO_SYSSPACE, UIO_READ, td); + ret = proc_rwmem(p, &tmp_uio); + if (ret != 0) + goto done; +#ifdef COMPAT_FREEBSD32 + } +#endif + + /* Get the array address and the number of elements */ + resolver(pss, &addr, &n_elements); + + /* Consistent with lib/libkvm/kvm_proc.c */ + if (n_elements > MAX_ARGV_STR) { + ret = E2BIG; + goto done; + } + + UIO_HELPER(tmp_uio, iov, envp, n_elements * elm_len, 1, + (vm_offset_t)(addr), iov.iov_len, UIO_SYSSPACE, UIO_READ, td); + ret = proc_rwmem(p, &tmp_uio); + if (ret != 0) + goto done; +#ifdef COMPAT_FREEBSD32 + if (env_vector32 != NULL) { + for (i = 0; i < n_elements; i++) + env_vector[i] = PTRIN(env_vector32[i]); + } +#endif + + /* Now we can iterate through the list of strings */ + for (i = 0; i < n_elements; i++) { + pbegin = (vm_offset_t)env_vector[i]; + for (;;) { + UIO_HELPER(tmp_uio, iov, env_string, sizeof(env_string), + 1, pbegin, iov.iov_len, UIO_SYSSPACE, UIO_READ, td); + ret = proc_rwmem(p, &tmp_uio); + if (ret != 0) + goto done; + + if (!strvalid(env_string, UIO_CHUNK_SZ)) { + /* + * We didn't find the end of the string. + * Add the string to the buffer and move + * the pointer. But do not allow strings + * of unlimited length. + */ + sbuf_bcat(sb, env_string, UIO_CHUNK_SZ); + if (sbuf_len(sb) >= ARG_MAX) { + ret = E2BIG; + goto done; + } + pbegin += UIO_CHUNK_SZ; + } else { + sbuf_cat(sb, env_string); + break; + } + } + sbuf_bcat(sb, "", 1); + } +#undef UIO_HELPER + +done: + free(env_vector, M_TEMP); +#ifdef COMPAT_FREEBSD32 + free(env_vector32, M_TEMP); +#endif + return (ret); +} + +static void +ps_string_argv(const struct ps_strings ps, u_long *addr, int *n) +{ + + *addr = (u_long) ps.ps_argvstr; + *n = ps.ps_nargvstr; +} + +static void +ps_string_env(const struct ps_strings ps, u_long *addr, int *n) +{ + + *addr = (u_long) ps.ps_envstr; + *n = ps.ps_nenvstr; +} + /* * Filler function for proc/pid/cmdline */ static int linprocfs_doproccmdline(PFS_FILL_ARGS) { - struct ps_strings pstr; - char **ps_argvstr; - int error, i; - - /* - * If we are using the ps/cmdline caching, use that. Otherwise - * revert back to the old way which only implements full cmdline - * for the currept process and just p->p_comm for all other - * processes. - * Note that if the argv is no longer available, we deliberately - * don't fall back on p->p_comm or return an error: the authentic - * Linux behaviour is to return zero-length in this case. - */ + int ret; PROC_LOCK(p); - if (p->p_args && p_cansee(td, p) == 0) { - sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length); - PROC_UNLOCK(p); - } else if (p != td->td_proc) { + if ((ret = p_cansee(td, p)) != 0) { PROC_UNLOCK(p); - sbuf_printf(sb, "%.*s", MAXCOMLEN, p->p_comm); - } else { + return (ret); + } + if (p->p_args != NULL) { + sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length); PROC_UNLOCK(p); - error = copyin((void *)p->p_sysent->sv_psstrings, &pstr, - sizeof(pstr)); - if (error) - return (error); - if (pstr.ps_nargvstr > ARG_MAX) - return (E2BIG); - ps_argvstr = malloc(pstr.ps_nargvstr * sizeof(char *), - M_TEMP, M_WAITOK); - error = copyin((void *)pstr.ps_argvstr, ps_argvstr, - pstr.ps_nargvstr * sizeof(char *)); - if (error) { - free(ps_argvstr, M_TEMP); - return (error); - } - for (i = 0; i < pstr.ps_nargvstr; i++) { - sbuf_copyin(sb, ps_argvstr[i], 0); - sbuf_printf(sb, "%c", '\0'); - } - free(ps_argvstr, M_TEMP); + return (0); } + PROC_UNLOCK(p); - return (0); + ret = linprocfs_doargv(td, p, sb, ps_string_argv); + return (ret); } /* @@ -939,9 +1059,17 @@ linprocfs_doproccmdline(PFS_FILL_ARGS) static int linprocfs_doprocenviron(PFS_FILL_ARGS) { + int ret; - sbuf_printf(sb, "doprocenviron\n%c", '\0'); - return (0); + PROC_LOCK(p); + if ((ret = p_cansee(td, p)) != 0) { + PROC_UNLOCK(p); + return (ret); + } + PROC_UNLOCK(p); + + ret = linprocfs_doargv(td, p, sb, ps_string_env); + return (ret); } /* From owner-svn-src-stable@FreeBSD.ORG Tue Oct 19 10:51:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 845311065674; Tue, 19 Oct 2010 10:51:18 +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 572768FC27; Tue, 19 Oct 2010 10:51: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 o9JApI58012245; Tue, 19 Oct 2010 10:51:18 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JApINS012243; Tue, 19 Oct 2010 10:51:18 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201010191051.o9JApINS012243@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 19 Oct 2010 10:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214051 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 10:51:18 -0000 Author: pluknet Date: Tue Oct 19 10:51:18 2010 New Revision: 214051 URL: http://svn.freebsd.org/changeset/base/214051 Log: MFC r213514: Wrap lines for SiS and Promise entries to 80 columns. PR: docs/146195 Approved by: avg (mentor) Modified: stable/8/share/man/man4/ata.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ata.4 ============================================================================== --- stable/8/share/man/man4/ata.4 Tue Oct 19 09:25:58 2010 (r214050) +++ stable/8/share/man/man4/ata.4 Tue Oct 19 10:51:18 2010 (r214051) @@ -167,13 +167,19 @@ NC3000, NC5000. nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4, MCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89. .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, From owner-svn-src-stable@FreeBSD.ORG Tue Oct 19 10:56:57 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Oct 19 13:06:26 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FD021065670; Tue, 19 Oct 2010 13:06:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DA148FC15; Tue, 19 Oct 2010 13:06: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 o9JD6QVY015527; Tue, 19 Oct 2010 13:06:26 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JD6Q5O015525; Tue, 19 Oct 2010 13:06:26 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201010191306.o9JD6Q5O015525@svn.freebsd.org> From: Ed Maste Date: Tue, 19 Oct 2010 13:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214055 - stable/8/lib/libgeom X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 13:06:26 -0000 Author: emaste Date: Tue Oct 19 13:06:26 2010 New Revision: 214055 URL: http://svn.freebsd.org/changeset/base/214055 Log: MFC r213451: Handle null return from XML_ParserCreate and fix a few memory leaks on error conditions. Modified: stable/8/lib/libgeom/geom_xml2tree.c Directory Properties: stable/8/lib/libgeom/ (props changed) Modified: stable/8/lib/libgeom/geom_xml2tree.c ============================================================================== --- stable/8/lib/libgeom/geom_xml2tree.c Tue Oct 19 12:35:40 2010 (r214054) +++ stable/8/lib/libgeom/geom_xml2tree.c Tue Oct 19 13:06:26 2010 (r214055) @@ -339,21 +339,27 @@ geom_xml2tree(struct gmesh *gmp, char *p memset(gmp, 0, sizeof *gmp); LIST_INIT(&gmp->lg_class); parser = XML_ParserCreate(NULL); + if (parser == NULL) + return (ENOMEM); mt = calloc(1, sizeof *mt); - if (mt == NULL) + if (mt == NULL) { + XML_ParserFree(parser); return (ENOMEM); + } mt->mesh = gmp; XML_SetUserData(parser, mt); XML_SetElementHandler(parser, StartElement, EndElement); XML_SetCharacterDataHandler(parser, CharData); i = XML_Parse(parser, p, strlen(p), 1); - if (i != 1) - return (-1); XML_ParserFree(parser); + if (i != 1) { + free(mt); + return (-1); + } gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1); + free(mt); if (gmp->lg_ident == NULL) return (ENOMEM); - free(mt); i = 0; /* Collect all identifiers */ LIST_FOREACH(cl, &gmp->lg_class, lg_class) { From owner-svn-src-stable@FreeBSD.ORG Tue Oct 19 14:09:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D9FD106566B; Tue, 19 Oct 2010 14:09:18 +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 302D48FC14; Tue, 19 Oct 2010 14:09: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 o9JE9HgV016980; Tue, 19 Oct 2010 14:09:17 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JE9HBI016977; Tue, 19 Oct 2010 14:09:17 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201010191409.o9JE9HBI016977@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 19 Oct 2010 14:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214057 - in stable/8/tools/tools/netrate: juggle tcpconnect X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 14:09:18 -0000 Author: pluknet Date: Tue Oct 19 14:09:17 2010 New Revision: 214057 URL: http://svn.freebsd.org/changeset/base/214057 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/8/tools/tools/netrate/juggle/juggle.c stable/8/tools/tools/netrate/tcpconnect/tcpconnect.c Directory Properties: stable/8/tools/tools/netrate/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) Modified: stable/8/tools/tools/netrate/juggle/juggle.c ============================================================================== --- stable/8/tools/tools/netrate/juggle/juggle.c Tue Oct 19 13:31:43 2010 (r214056) +++ stable/8/tools/tools/netrate/juggle/juggle.c Tue Oct 19 14:09:17 2010 (r214057) @@ -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/8/tools/tools/netrate/tcpconnect/tcpconnect.c ============================================================================== --- stable/8/tools/tools/netrate/tcpconnect/tcpconnect.c Tue Oct 19 13:31:43 2010 (r214056) +++ stable/8/tools/tools/netrate/tcpconnect/tcpconnect.c Tue Oct 19 14:09:17 2010 (r214057) @@ -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@FreeBSD.ORG Tue Oct 19 14:11:51 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Oct 19 21:04:45 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A81B8106566B; Tue, 19 Oct 2010 21:04:45 +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 9645C8FC08; Tue, 19 Oct 2010 21:04: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 o9JL4j2P027128; Tue, 19 Oct 2010 21:04:45 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JL4j5w027126; Tue, 19 Oct 2010 21:04:45 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201010192104.o9JL4j5w027126@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 19 Oct 2010 21:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214079 - stable/8/lib/libc/stdtime X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 21:04:45 -0000 Author: edwin Date: Tue Oct 19 21:04:45 2010 New Revision: 214079 URL: http://svn.freebsd.org/changeset/base/214079 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/8/lib/libc/stdtime/strptime.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/stdtime/strptime.c ============================================================================== --- stable/8/lib/libc/stdtime/strptime.c Tue Oct 19 21:02:05 2010 (r214078) +++ stable/8/lib/libc/stdtime/strptime.c Tue Oct 19 21:04:45 2010 (r214079) @@ -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@FreeBSD.ORG Tue Oct 19 21:05:23 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Tue Oct 19 22:11:51 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 230EB106566C; Tue, 19 Oct 2010 22:11:51 +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 109F88FC0C; Tue, 19 Oct 2010 22:11: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 o9JMBoid029011; Tue, 19 Oct 2010 22:11:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JMBolX029009; Tue, 19 Oct 2010 22:11:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010192211.o9JMBolX029009@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 19 Oct 2010 22:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214086 - stable/8/lib/libc/i386/string X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 22:11:51 -0000 Author: jilles Date: Tue Oct 19 22:11:50 2010 New Revision: 214086 URL: http://svn.freebsd.org/changeset/base/214086 Log: MFC r213326: libc: Remove the i386 assembler version of strlen(3). On anything modern, the C version, which processes a word at a time, is much faster. The Intel optimization manual explicitly warns against using REP prefixes with SCAS or CMPS, which is exactly what the assembler version does. A simple test on a Phenom II showed the C version, compiled with -O2, to be about twice as fast determining the length of 100000 strings between 0 and 255 bytes long. Deleted: stable/8/lib/libc/i386/string/strlen.S Modified: stable/8/lib/libc/i386/string/Makefile.inc Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/i386/string/Makefile.inc ============================================================================== --- stable/8/lib/libc/i386/string/Makefile.inc Tue Oct 19 21:43:48 2010 (r214085) +++ stable/8/lib/libc/i386/string/Makefile.inc Tue Oct 19 22:11:50 2010 (r214086) @@ -3,5 +3,5 @@ MDSRCS+=bcmp.S bcopy.S bzero.S ffs.S index.S memchr.S memcmp.S memcpy.S \ memmove.S memset.S rindex.S strcat.S strchr.S strcmp.S strcpy.S \ - strlen.S strncmp.S strrchr.S swab.S wcschr.S wcscmp.S wcslen.S \ + strncmp.S strrchr.S swab.S wcschr.S wcscmp.S wcslen.S \ wmemchr.S From owner-svn-src-stable@FreeBSD.ORG Tue Oct 19 23:57:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4342106566B; Tue, 19 Oct 2010 23:57:34 +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 CE8E48FC16; Tue, 19 Oct 2010 23:57: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 o9JNvYuD031213; Tue, 19 Oct 2010 23:57:34 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JNvYR4031193; Tue, 19 Oct 2010 23:57:34 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010192357.o9JNvYR4031193@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 19 Oct 2010 23:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214088 - in stable/8: . bin/sh contrib/top etc/periodic/daily gnu/usr.bin lib/libusb release/picobsd/floppy.tree/sbin sbin/geom/class/sched tools/regression/bin/sh tools/regression/bin... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 23:57:35 -0000 Author: obrien Date: Tue Oct 19 23:57:34 2010 New Revision: 214088 URL: http://svn.freebsd.org/changeset/base/214088 Log: MFC r213738: allow one to regression test 'sh' changes without having to install a potentially bad /bin/sh first. Modified: stable/8/bin/sh/Makefile stable/8/tools/regression/bin/sh/Makefile stable/8/tools/regression/bin/sh/builtins/exec1.0 stable/8/tools/regression/bin/sh/builtins/trap1.0 stable/8/tools/regression/bin/sh/builtins/var-assign.0 stable/8/tools/regression/bin/sh/errors/backquote-error1.0 stable/8/tools/regression/bin/sh/errors/option-error.0 stable/8/tools/regression/bin/sh/errors/redirection-error.0 stable/8/tools/regression/bin/sh/errors/redirection-error2.2 stable/8/tools/regression/bin/sh/execution/fork1.0 stable/8/tools/regression/bin/sh/execution/fork2.0 stable/8/tools/regression/bin/sh/execution/func1.0 stable/8/tools/regression/bin/sh/expansion/question1.0 stable/8/tools/regression/bin/sh/expansion/set-u1.0 stable/8/tools/regression/bin/sh/parameters/mail1.0 stable/8/tools/regression/bin/sh/parameters/mail2.0 stable/8/tools/regression/bin/sh/parameters/pwd1.0 stable/8/tools/regression/bin/sh/regress.sh stable/8/tools/regression/bin/sh/regress.t Directory Properties: stable/8/ (props changed) stable/8/Makefile (props changed) stable/8/Makefile.inc1 (props changed) stable/8/ObsoleteFiles.inc (props changed) stable/8/UPDATING (props changed) stable/8/bin/ (props changed) stable/8/bin/chio/ (props changed) stable/8/bin/chmod/ (props changed) stable/8/bin/cp/ (props changed) stable/8/bin/csh/ (props changed) stable/8/bin/date/ (props changed) stable/8/bin/expr/ (props changed) stable/8/bin/getfacl/ (props changed) stable/8/bin/kill/ (props changed) stable/8/bin/ln/ (props changed) stable/8/bin/ls/ (props changed) stable/8/bin/mv/ (props changed) stable/8/bin/pax/ (props changed) stable/8/bin/pkill/ (props changed) stable/8/bin/ps/ (props changed) stable/8/bin/pwait/ (props changed) stable/8/bin/setfacl/ (props changed) stable/8/bin/sh/ (props changed) stable/8/bin/sleep/ (props changed) stable/8/bin/test/ (props changed) stable/8/cddl/compat/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/lib/libnvpair/ (props changed) stable/8/cddl/lib/libzpool/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/bind9/ (props changed) stable/8/contrib/binutils/ (props changed) stable/8/contrib/bsnmp/ (props changed) stable/8/contrib/bzip2/ (props changed) stable/8/contrib/com_err/ (props changed) stable/8/contrib/csup/ (props changed) stable/8/contrib/ee/ (props changed) stable/8/contrib/expat/ (props changed) stable/8/contrib/file/ (props changed) stable/8/contrib/gcc/ (props changed) stable/8/contrib/gdb/ (props changed) stable/8/contrib/gdtoa/ (props changed) stable/8/contrib/groff/ (props changed) stable/8/contrib/ipfilter/ (props changed) stable/8/contrib/less/ (props changed) stable/8/contrib/libpcap/ (props changed) stable/8/contrib/ncurses/ (props changed) stable/8/contrib/netcat/ (props changed) stable/8/contrib/ntp/ (props changed) stable/8/contrib/nvi/ (props changed) stable/8/contrib/one-true-awk/ (props changed) stable/8/contrib/openbsm/ (props changed) stable/8/contrib/openpam/ (props changed) stable/8/contrib/pf/ (props changed) stable/8/contrib/sendmail/ (props changed) stable/8/contrib/tcp_wrappers/ (props changed) stable/8/contrib/tcpdump/ (props changed) stable/8/contrib/tcsh/ (props changed) stable/8/contrib/telnet/ (props changed) stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) stable/8/contrib/traceroute/ (props changed) stable/8/contrib/wpa/ (props changed) stable/8/contrib/xz/ (props changed) stable/8/crypto/heimdal/ (props changed) stable/8/crypto/openssh/ (props changed) stable/8/crypto/openssl/ (props changed) stable/8/etc/ (props changed) stable/8/etc/periodic/daily/ (props changed) stable/8/etc/periodic/daily/800.scrub-zfs (props changed) stable/8/games/factor/ (props changed) stable/8/games/fortune/ (props changed) stable/8/games/grdc/ (props changed) stable/8/games/pom/ (props changed) stable/8/gnu/lib/csu/ (props changed) stable/8/gnu/lib/libstdc++/ (props changed) stable/8/gnu/usr.bin/ (props changed) stable/8/gnu/usr.bin/Makefile (props changed) stable/8/gnu/usr.bin/dialog/ (props changed) stable/8/gnu/usr.bin/gdb/ (props changed) stable/8/gnu/usr.bin/gdb/kgdb/ (props changed) stable/8/gnu/usr.bin/groff/ (props changed) stable/8/gnu/usr.bin/patch/ (props changed) stable/8/include/ (props changed) stable/8/kerberos5/lib/libgssapi_krb5/ (props changed) stable/8/kerberos5/lib/libgssapi_spnego/ (props changed) stable/8/kerberos5/usr.bin/kdestroy/ (props changed) stable/8/kerberos5/usr.bin/kpasswd/ (props changed) stable/8/lib/ (props changed) stable/8/lib/bind/ (props changed) stable/8/lib/csu/ (props changed) stable/8/lib/libarchive/ (props changed) stable/8/lib/libbluetooth/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/lib/libc_r/ (props changed) stable/8/lib/libcam/ (props changed) stable/8/lib/libcompat/ (props changed) stable/8/lib/libdevinfo/ (props changed) stable/8/lib/libdisk/ (props changed) stable/8/lib/libedit/ (props changed) stable/8/lib/libelf/ (props changed) stable/8/lib/libexpat/ (props changed) stable/8/lib/libfetch/ (props changed) stable/8/lib/libgeom/ (props changed) stable/8/lib/libgpib/ (props changed) stable/8/lib/libgssapi/ (props changed) stable/8/lib/libjail/ (props changed) stable/8/lib/libkse/ (props changed) stable/8/lib/libkvm/ (props changed) stable/8/lib/liblzma/ (props changed) stable/8/lib/libmagic/ (props changed) stable/8/lib/libmemstat/ (props changed) stable/8/lib/libpam/ (props changed) stable/8/lib/libpmc/ (props changed) stable/8/lib/libradius/ (props changed) stable/8/lib/librpcsec_gss/ (props changed) stable/8/lib/libsm/ (props changed) stable/8/lib/libstand/ (props changed) stable/8/lib/libtacplus/ (props changed) stable/8/lib/libthr/ (props changed) stable/8/lib/libufs/ (props changed) stable/8/lib/libugidfw/ (props changed) stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) stable/8/lib/libusbhid/ (props changed) stable/8/lib/libutil/ (props changed) stable/8/lib/libz/ (props changed) stable/8/lib/libz/contrib/ (props changed) stable/8/lib/msun/ (props changed) stable/8/libexec/ (props changed) stable/8/libexec/ftpd/ (props changed) stable/8/libexec/rtld-elf/ (props changed) stable/8/libexec/tftpd/ (props changed) stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) stable/8/release/picobsd/tinyware/login/ (props changed) stable/8/sbin/ (props changed) stable/8/sbin/atacontrol/ (props changed) stable/8/sbin/bsdlabel/ (props changed) stable/8/sbin/camcontrol/ (props changed) stable/8/sbin/ddb/ (props changed) stable/8/sbin/devd/ (props changed) stable/8/sbin/devfs/ (props changed) stable/8/sbin/dhclient/ (props changed) stable/8/sbin/dump/ (props changed) stable/8/sbin/dumpfs/ (props changed) stable/8/sbin/fsck/ (props changed) stable/8/sbin/fsck_ffs/ (props changed) stable/8/sbin/fsck_msdosfs/ (props changed) stable/8/sbin/fsirand/ (props changed) stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/sched/gsched.8 (props changed) stable/8/sbin/geom/class/stripe/ (props changed) stable/8/sbin/ggate/ (props changed) stable/8/sbin/growfs/ (props changed) stable/8/sbin/hastctl/ (props changed) stable/8/sbin/hastd/ (props changed) stable/8/sbin/ifconfig/ (props changed) stable/8/sbin/ipfw/ (props changed) stable/8/sbin/iscontrol/ (props changed) stable/8/sbin/kldload/ (props changed) stable/8/sbin/kldstat/ (props changed) stable/8/sbin/mdconfig/ (props changed) stable/8/sbin/mksnap_ffs/ (props changed) stable/8/sbin/mount/ (props changed) stable/8/sbin/mount_cd9660/ (props changed) stable/8/sbin/mount_msdosfs/ (props changed) stable/8/sbin/mount_nfs/ (props changed) stable/8/sbin/natd/ (props changed) stable/8/sbin/newfs/ (props changed) stable/8/sbin/newfs_msdos/ (props changed) stable/8/sbin/ping6/ (props changed) stable/8/sbin/reboot/ (props changed) stable/8/sbin/restore/ (props changed) stable/8/sbin/routed/ (props changed) stable/8/sbin/setkey/ (props changed) stable/8/sbin/spppcontrol/ (props changed) stable/8/sbin/sysctl/ (props changed) stable/8/sbin/tunefs/ (props changed) stable/8/sbin/umount/ (props changed) stable/8/secure/ (props changed) stable/8/secure/lib/libcrypto/ (props changed) stable/8/secure/lib/libssl/ (props changed) stable/8/secure/usr.bin/bdes/ (props changed) stable/8/secure/usr.bin/openssl/ (props changed) stable/8/share/dict/ (props changed) stable/8/share/examples/ (props changed) stable/8/share/examples/etc/ (props changed) stable/8/share/examples/kld/syscall/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/share/misc/ (props changed) stable/8/share/mk/ (props changed) stable/8/share/termcap/ (props changed) stable/8/share/timedef/ (props changed) stable/8/share/zoneinfo/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/tools/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/tools/debugscripts/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/aio/aiotest/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/tools/regression/geom/ (props changed) stable/8/tools/regression/lib/libc/ (props changed) stable/8/tools/regression/lib/msun/test-conj.t (props changed) stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/posixsem/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/regression/usr.bin/tr/ (props changed) stable/8/tools/test/ (props changed) stable/8/tools/tools/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/nanobsd/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/umastat/ (props changed) stable/8/tools/tools/vimage/ (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.bin/apply/ (props changed) stable/8/usr.bin/ar/ (props changed) stable/8/usr.bin/awk/ (props changed) stable/8/usr.bin/biff/ (props changed) stable/8/usr.bin/c89/ (props changed) stable/8/usr.bin/c99/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/column/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/du/ (props changed) stable/8/usr.bin/ee/ (props changed) stable/8/usr.bin/enigma/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/find/ (props changed) stable/8/usr.bin/finger/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/gcore/ (props changed) stable/8/usr.bin/getopt/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/hexdump/ (props changed) stable/8/usr.bin/indent/ (props changed) stable/8/usr.bin/jot/ (props changed) stable/8/usr.bin/kdump/ (props changed) stable/8/usr.bin/killall/ (props changed) stable/8/usr.bin/ktrace/ (props changed) stable/8/usr.bin/locale/ (props changed) stable/8/usr.bin/lockf/ (props changed) stable/8/usr.bin/look/ (props changed) stable/8/usr.bin/mail/ (props changed) stable/8/usr.bin/make/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.bin/minigzip/ (props changed) stable/8/usr.bin/ncal/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/pathchk/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/rpcgen/ (props changed) stable/8/usr.bin/ruptime/ (props changed) stable/8/usr.bin/script/ (props changed) stable/8/usr.bin/sed/ (props changed) stable/8/usr.bin/sockstat/ (props changed) stable/8/usr.bin/split/ (props changed) stable/8/usr.bin/stat/ (props changed) stable/8/usr.bin/systat/ (props changed) stable/8/usr.bin/tar/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/touch/ (props changed) stable/8/usr.bin/tr/ (props changed) stable/8/usr.bin/truss/ (props changed) stable/8/usr.bin/uname/ (props changed) stable/8/usr.bin/unifdef/ (props changed) stable/8/usr.bin/uniq/ (props changed) stable/8/usr.bin/unzip/ (props changed) stable/8/usr.bin/vmstat/ (props changed) stable/8/usr.bin/w/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.bin/xinstall/ (props changed) stable/8/usr.bin/xlint/ (props changed) stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/Makefile (props changed) stable/8/usr.sbin/acpi/ (props changed) stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/asf/ (props changed) stable/8/usr.sbin/bluetooth/ (props changed) stable/8/usr.sbin/bluetooth/bthidcontrol/ (props changed) stable/8/usr.sbin/bluetooth/bthidd/ (props changed) stable/8/usr.sbin/boot0cfg/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) stable/8/usr.sbin/burncd/ (props changed) stable/8/usr.sbin/cdcontrol/ (props changed) stable/8/usr.sbin/chown/ (props changed) stable/8/usr.sbin/config/ (props changed) stable/8/usr.sbin/cpucontrol/ (props changed) stable/8/usr.sbin/crashinfo/ (props changed) stable/8/usr.sbin/cron/ (props changed) stable/8/usr.sbin/crunch/examples/ (props changed) stable/8/usr.sbin/ctm/ (props changed) stable/8/usr.sbin/cxgbtool/ (props changed) stable/8/usr.sbin/devinfo/ (props changed) stable/8/usr.sbin/diskinfo/ (props changed) stable/8/usr.sbin/dumpcis/cardinfo.h (props changed) stable/8/usr.sbin/dumpcis/cis.h (props changed) stable/8/usr.sbin/faithd/ (props changed) stable/8/usr.sbin/fdcontrol/ (props changed) stable/8/usr.sbin/fdformat/ (props changed) stable/8/usr.sbin/fdread/ (props changed) stable/8/usr.sbin/fdwrite/ (props changed) stable/8/usr.sbin/fifolog/ (props changed) stable/8/usr.sbin/flowctl/ (props changed) stable/8/usr.sbin/freebsd-update/ (props changed) stable/8/usr.sbin/i2c/ (props changed) stable/8/usr.sbin/inetd/ (props changed) stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/mailwrapper/ (props changed) stable/8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) stable/8/usr.sbin/makefs/ffs/ffs_subr.c (props changed) stable/8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) stable/8/usr.sbin/makefs/getid.c (props changed) stable/8/usr.sbin/mergemaster/ (props changed) stable/8/usr.sbin/mfiutil/mfiutil.8 (props changed) stable/8/usr.sbin/mountd/ (props changed) stable/8/usr.sbin/moused/ (props changed) stable/8/usr.sbin/mptutil/ (props changed) stable/8/usr.sbin/mtest/ (props changed) stable/8/usr.sbin/mtree/ (props changed) stable/8/usr.sbin/named/ (props changed) stable/8/usr.sbin/ndp/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) stable/8/usr.sbin/nfsdumpstate/ (props changed) stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) stable/8/usr.sbin/periodic/ (props changed) stable/8/usr.sbin/pmcannotate/ (props changed) stable/8/usr.sbin/pmccontrol/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) stable/8/usr.sbin/powerd/ (props changed) stable/8/usr.sbin/ppp/ (props changed) stable/8/usr.sbin/pppctl/ (props changed) stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/rpc.lockd/ (props changed) stable/8/usr.sbin/rpc.umntall/ (props changed) stable/8/usr.sbin/rtsold/ (props changed) stable/8/usr.sbin/sade/ (props changed) stable/8/usr.sbin/service/ (props changed) stable/8/usr.sbin/services_mkdb/ (props changed) stable/8/usr.sbin/setfmac/ (props changed) stable/8/usr.sbin/setpmac/ (props changed) stable/8/usr.sbin/smbmsg/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/syslogd/ (props changed) stable/8/usr.sbin/traceroute/ (props changed) stable/8/usr.sbin/traceroute6/ (props changed) stable/8/usr.sbin/uathload/ (props changed) stable/8/usr.sbin/ugidfw/ (props changed) stable/8/usr.sbin/uhsoctl/ (props changed) stable/8/usr.sbin/usbconfig/ (props changed) stable/8/usr.sbin/vidcontrol/ (props changed) stable/8/usr.sbin/wpa/ (props changed) stable/8/usr.sbin/ypserv/ (props changed) stable/8/usr.sbin/zic/ (props changed) Modified: stable/8/bin/sh/Makefile ============================================================================== --- stable/8/bin/sh/Makefile Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/bin/sh/Makefile Tue Oct 19 23:57:34 2010 (r214088) @@ -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/8/tools/regression/bin/sh/Makefile ============================================================================== --- stable/8/tools/regression/bin/sh/Makefile Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/Makefile Tue Oct 19 23:57:34 2010 (r214088) @@ -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/8/tools/regression/bin/sh/builtins/exec1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/builtins/exec1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/builtins/exec1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -12,7 +12,7 @@ failure() { ) [ $? = 0 ] || failure $LINENO ( - exec sh -c 'exit 42' + exec ${SH} -c 'exit 42' echo bad ) [ $? = 42 ] || failure $LINENO Modified: stable/8/tools/regression/bin/sh/builtins/trap1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/builtins/trap1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/builtins/trap1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -4,11 +4,11 @@ test "$(trap 'echo trapped' EXIT; :)" = test "$(trap 'echo trapped' EXIT; /usr/bin/true)" = trapped || exit 1 -result=$(sh -c 'trap "echo trapped" EXIT; /usr/bin/false') +result=$(${SH} -c 'trap "echo trapped" EXIT; /usr/bin/false') test $? -eq 1 || exit 1 test "$result" = trapped || exit 1 -result=$(sh -c 'trap "echo trapped" EXIT; exec /usr/bin/false') +result=$(${SH} -c 'trap "echo trapped" EXIT; exec /usr/bin/false') test $? -eq 1 || exit 1 test -z "$result" || exit 1 Modified: stable/8/tools/regression/bin/sh/builtins/var-assign.0 ============================================================================== --- stable/8/tools/regression/bin/sh/builtins/var-assign.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/builtins/var-assign.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -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/8/tools/regression/bin/sh/errors/backquote-error1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/errors/backquote-error1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/errors/backquote-error1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -1,4 +1,4 @@ # $FreeBSD$ -echo 'echo `for` echo ".BAD"CODE.' | sh +m -i 2>&1 | grep -q BADCODE && exit 1 +echo 'echo `for` echo ".BAD"CODE.' | ${SH} +m -i 2>&1 | grep -q BADCODE && exit 1 exit 0 Modified: stable/8/tools/regression/bin/sh/errors/option-error.0 ============================================================================== --- stable/8/tools/regression/bin/sh/errors/option-error.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/errors/option-error.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -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/8/tools/regression/bin/sh/errors/redirection-error.0 ============================================================================== --- stable/8/tools/regression/bin/sh/errors/redirection-error.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/errors/redirection-error.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -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/8/tools/regression/bin/sh/errors/redirection-error2.2 ============================================================================== --- stable/8/tools/regression/bin/sh/errors/redirection-error2.2 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/errors/redirection-error2.2 Tue Oct 19 23:57:34 2010 (r214088) @@ -1,4 +1,4 @@ # $FreeBSD$ # sh should fail gracefully on this bad redirect -sh -c 'echo 1 >&$a' 2>/dev/null +${SH} -c 'echo 1 >&$a' 2>/dev/null Modified: stable/8/tools/regression/bin/sh/execution/fork1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/execution/fork1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/execution/fork1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -1,7 +1,7 @@ # $FreeBSD$ -result=$(sh -c 'ps -p $$ -o comm=') +result=$(${SH} -c 'ps -p $$ -o comm=') test "$result" = "ps" || exit 1 -result=$(sh -c 'ps -p $$ -o comm=; :') +result=$(${SH} -c 'ps -p $$ -o comm=; :') test "$result" = "sh" || exit 1 Modified: stable/8/tools/regression/bin/sh/execution/fork2.0 ============================================================================== --- stable/8/tools/regression/bin/sh/execution/fork2.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/execution/fork2.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -1,9 +1,9 @@ # $FreeBSD$ -result=$(sh -c '(/bin/sleep 1)& sleep 0.1; ps -p $! -o comm=; kill $!') +result=$(${SH} -c '(/bin/sleep 1)& sleep 0.1; ps -p $! -o comm=; kill $!') test "$result" = sleep || exit 1 -result=$(sh -c '{ trap "echo trapped" EXIT; (/usr/bin/true); } & wait') +result=$(${SH} -c '{ trap "echo trapped" EXIT; (/usr/bin/true); } & wait') test "$result" = trapped || exit 1 exit 0 Modified: stable/8/tools/regression/bin/sh/execution/func1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/execution/func1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/execution/func1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -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/8/tools/regression/bin/sh/expansion/question1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/expansion/question1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/expansion/question1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -6,17 +6,17 @@ set -- ${x?} { [ "$#" = 2 ] && [ "$1" = a ] && [ "$2" = b ]; } || exit 1 unset x (echo ${x?abcdefg}) 2>&1 | grep -q abcdefg || exit 1 -sh -c 'unset foo; echo ${foo?}' 2>/dev/null && exit 1 -sh -c 'foo=; echo ${foo:?}' 2>/dev/null && exit 1 -sh -c 'foo=; echo ${foo?}' >/dev/null || exit 1 -sh -c 'foo=1; echo ${foo:?}' >/dev/null || exit 1 -sh -c 'echo ${!?}' 2>/dev/null && exit 1 -sh -c ':& echo ${!?}' >/dev/null || exit 1 -sh -c 'echo ${#?}' >/dev/null || exit 1 -sh -c 'echo ${*?}' 2>/dev/null && exit 1 -sh -c 'echo ${*?}' sh x >/dev/null || exit 1 -sh -c 'echo ${1?}' 2>/dev/null && exit 1 -sh -c 'echo ${1?}' sh x >/dev/null || exit 1 -sh -c 'echo ${2?}' sh x 2>/dev/null && exit 1 -sh -c 'echo ${2?}' sh x y >/dev/null || exit 1 +${SH} -c 'unset foo; echo ${foo?}' 2>/dev/null && exit 1 +${SH} -c 'foo=; echo ${foo:?}' 2>/dev/null && exit 1 +${SH} -c 'foo=; echo ${foo?}' >/dev/null || exit 1 +${SH} -c 'foo=1; echo ${foo:?}' >/dev/null || exit 1 +${SH} -c 'echo ${!?}' 2>/dev/null && exit 1 +${SH} -c ':& echo ${!?}' >/dev/null || exit 1 +${SH} -c 'echo ${#?}' >/dev/null || exit 1 +${SH} -c 'echo ${*?}' 2>/dev/null && exit 1 +${SH} -c 'echo ${*?}' ${SH} x >/dev/null || exit 1 +${SH} -c 'echo ${1?}' 2>/dev/null && exit 1 +${SH} -c 'echo ${1?}' ${SH} x >/dev/null || exit 1 +${SH} -c 'echo ${2?}' ${SH} x 2>/dev/null && exit 1 +${SH} -c 'echo ${2?}' ${SH} x y >/dev/null || exit 1 exit 0 Modified: stable/8/tools/regression/bin/sh/expansion/set-u1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/expansion/set-u1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/expansion/set-u1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -1,29 +1,29 @@ # $FreeBSD$ -sh -uc 'unset foo; echo $foo' 2>/dev/null && exit 1 -sh -uc 'foo=; echo $foo' >/dev/null || exit 1 -sh -uc 'foo=1; echo $foo' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo $foo' 2>/dev/null && exit 1 +${SH} -uc 'foo=; echo $foo' >/dev/null || exit 1 +${SH} -uc 'foo=1; echo $foo' >/dev/null || exit 1 # -/+/= are unaffected by set -u -sh -uc 'unset foo; echo ${foo-}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo+}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo=}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo-}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo+}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo=}' >/dev/null || exit 1 # length/trimming are affected -sh -uc 'unset foo; echo ${#foo}' 2>/dev/null && exit 1 -sh -uc 'foo=; echo ${#foo}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo#?}' 2>/dev/null && exit 1 -sh -uc 'foo=1; echo ${foo#?}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo##?}' 2>/dev/null && exit 1 -sh -uc 'foo=1; echo ${foo##?}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo%?}' 2>/dev/null && exit 1 -sh -uc 'foo=1; echo ${foo%?}' >/dev/null || exit 1 -sh -uc 'unset foo; echo ${foo%%?}' 2>/dev/null && exit 1 -sh -uc 'foo=1; echo ${foo%%?}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${#foo}' 2>/dev/null && exit 1 +${SH} -uc 'foo=; echo ${#foo}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo#?}' 2>/dev/null && exit 1 +${SH} -uc 'foo=1; echo ${foo#?}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo##?}' 2>/dev/null && exit 1 +${SH} -uc 'foo=1; echo ${foo##?}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo%?}' 2>/dev/null && exit 1 +${SH} -uc 'foo=1; echo ${foo%?}' >/dev/null || exit 1 +${SH} -uc 'unset foo; echo ${foo%%?}' 2>/dev/null && exit 1 +${SH} -uc 'foo=1; echo ${foo%%?}' >/dev/null || exit 1 -sh -uc 'echo $!' 2>/dev/null && exit 1 -sh -uc ':& echo $!' >/dev/null || exit 1 -sh -uc 'echo $#' >/dev/null || exit 1 -sh -uc 'echo $1' 2>/dev/null && exit 1 -sh -uc 'echo $1' sh x >/dev/null || exit 1 -sh -uc 'echo $2' sh x 2>/dev/null && exit 1 -sh -uc 'echo $2' sh x y >/dev/null || exit 1 +${SH} -uc 'echo $!' 2>/dev/null && exit 1 +${SH} -uc ':& echo $!' >/dev/null || exit 1 +${SH} -uc 'echo $#' >/dev/null || exit 1 +${SH} -uc 'echo $1' 2>/dev/null && exit 1 +${SH} -uc 'echo $1' ${SH} x >/dev/null || exit 1 +${SH} -uc 'echo $2' ${SH} x 2>/dev/null && exit 1 +${SH} -uc 'echo $2' ${SH} x y >/dev/null || exit 1 exit 0 Modified: stable/8/tools/regression/bin/sh/parameters/mail1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/parameters/mail1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/parameters/mail1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -4,7 +4,7 @@ goodfile=/var/empty/sh-test-goodfile mailfile=/var/empty/sh-test-mailfile T=$(mktemp sh-test.XXXXXX) || exit -MAIL=$mailfile ktrace -i -f "$T" sh -c "[ -s $goodfile ]" 2>/dev/null +MAIL=$mailfile ktrace -i -f "$T" ${SH} -c "[ -s $goodfile ]" 2>/dev/null if ! grep -q $goodfile "$T"; then # ktrace problem rc=0 Modified: stable/8/tools/regression/bin/sh/parameters/mail2.0 ============================================================================== --- stable/8/tools/regression/bin/sh/parameters/mail2.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/parameters/mail2.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -4,7 +4,7 @@ goodfile=/var/empty/sh-test-goodfile mailfile=/var/empty/sh-test-mailfile T=$(mktemp sh-test.XXXXXX) || exit -ENV=$goodfile MAIL=$mailfile ktrace -i -f "$T" sh +m -i /dev/null 2>&1 +ENV=$goodfile MAIL=$mailfile ktrace -i -f "$T" ${SH} +m -i /dev/null 2>&1 if ! grep -q $goodfile "$T"; then # ktrace problem rc=0 Modified: stable/8/tools/regression/bin/sh/parameters/pwd1.0 ============================================================================== --- stable/8/tools/regression/bin/sh/parameters/pwd1.0 Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/parameters/pwd1.0 Tue Oct 19 23:57:34 2010 (r214088) @@ -3,9 +3,9 @@ cd / || exit 3 failures=0 -[ "$(PWD=foo sh -c 'pwd')" = / ] || : $((failures += 1)) -[ "$(PWD=/var/empty sh -c 'pwd')" = / ] || : $((failures += 1)) -[ "$(PWD=/var/empty/foo sh -c 'pwd')" = / ] || : $((failures += 1)) -[ "$(PWD=/bin/ls sh -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=foo ${SH} -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/var/empty ${SH} -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/var/empty/foo ${SH} -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/bin/ls ${SH} -c 'pwd')" = / ] || : $((failures += 1)) exit $((failures != 0)) Modified: stable/8/tools/regression/bin/sh/regress.sh ============================================================================== --- stable/8/tools/regression/bin/sh/regress.sh Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/regress.sh Tue Oct 19 23:57:34 2010 (r214088) @@ -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/8/tools/regression/bin/sh/regress.t ============================================================================== --- stable/8/tools/regression/bin/sh/regress.t Tue Oct 19 23:04:23 2010 (r214087) +++ stable/8/tools/regression/bin/sh/regress.t Tue Oct 19 23:57:34 2010 (r214088) @@ -1,6 +1,12 @@ #!/bin/sh # $FreeBSD$ +if [ -z "${SH}" ]; then + echo '${SH} is not set, please correct and re-run.' + exit 1 +fi +export SH=${SH} + cd `dirname $0` -sh regress.sh +${SH} regress.sh From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 00:24:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B8DD1065670; Wed, 20 Oct 2010 00:24:30 +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 88F988FC14; Wed, 20 Oct 2010 00:24: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 o9K0OU7l031872; Wed, 20 Oct 2010 00:24:30 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9K0OUp5031870; Wed, 20 Oct 2010 00:24:30 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010200024.o9K0OUp5031870@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 20 Oct 2010 00:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214090 - stable/8/tools/regression/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 00:24:30 -0000 Author: obrien Date: Wed Oct 20 00:24:30 2010 New Revision: 214090 URL: http://svn.freebsd.org/changeset/base/214090 Log: MFC: r213903: default to 'sh' from PATH if 'SH' env is not set. Modified: stable/8/tools/regression/bin/sh/regress.t Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Modified: stable/8/tools/regression/bin/sh/regress.t ============================================================================== --- stable/8/tools/regression/bin/sh/regress.t Wed Oct 20 00:19:25 2010 (r214089) +++ stable/8/tools/regression/bin/sh/regress.t Wed Oct 20 00:24:30 2010 (r214090) @@ -1,11 +1,7 @@ #!/bin/sh # $FreeBSD$ -if [ -z "${SH}" ]; then - echo '${SH} is not set, please correct and re-run.' - exit 1 -fi -export SH=${SH} +export SH="${SH:-sh}" cd `dirname $0` From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 01:22:05 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 307321065670; Wed, 20 Oct 2010 01:22:05 +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 03E378FC08; Wed, 20 Oct 2010 01:22:05 +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 o9K1M4Qp033096; Wed, 20 Oct 2010 01:22:04 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9K1M4jj033093; Wed, 20 Oct 2010 01:22:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201010200122.o9K1M4jj033093@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 20 Oct 2010 01:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214092 - stable/8/sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 01:22:05 -0000 Author: bz Date: Wed Oct 20 01:22:04 2010 New Revision: 214092 URL: http://svn.freebsd.org/changeset/base/214092 Log: MFC r213929: lltable_drain() has never been used so far, thus #if 0 it for now. While touching it add the missing locking to the now disabled code for the time when we'll resurrect it. Modified: stable/8/sys/net/if_llatbl.c stable/8/sys/net/if_llatbl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if_llatbl.c ============================================================================== --- stable/8/sys/net/if_llatbl.c Wed Oct 20 00:41:38 2010 (r214091) +++ stable/8/sys/net/if_llatbl.c Wed Oct 20 01:22:04 2010 (r214092) @@ -183,6 +183,7 @@ lltable_free(struct lltable *llt) free(llt, M_LLTABLE); } +#if 0 void lltable_drain(int af) { @@ -197,15 +198,18 @@ lltable_drain(int af) for (i=0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH(lle, &llt->lle_head[i], lle_next) { + LLE_WLOCK(lle); if (lle->la_hold) { m_freem(lle->la_hold); lle->la_hold = NULL; } + LLE_WUNLOCK(lle); } } } LLTABLE_RUNLOCK(); } +#endif void lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask) Modified: stable/8/sys/net/if_llatbl.h ============================================================================== --- stable/8/sys/net/if_llatbl.h Wed Oct 20 00:41:38 2010 (r214091) +++ stable/8/sys/net/if_llatbl.h Wed Oct 20 01:22:04 2010 (r214092) @@ -186,7 +186,9 @@ struct lltable *lltable_init(struct ifne void lltable_free(struct lltable *); void lltable_prefix_free(int, struct sockaddr *, struct sockaddr *); +#if 0 void lltable_drain(int); +#endif int lltable_sysctl_dumparp(int, struct sysctl_req *); void llentry_free(struct llentry *); From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 07:32:25 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D4AB106566C; Wed, 20 Oct 2010 07:32:25 +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 6B0D98FC12; Wed, 20 Oct 2010 07:32:25 +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 o9K7WPkr041304; Wed, 20 Oct 2010 07:32:25 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9K7WPBi041302; Wed, 20 Oct 2010 07:32:25 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010200732.o9K7WPBi041302@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 20 Oct 2010 07:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214100 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 07:32:25 -0000 Author: obrien Date: Wed Oct 20 07:32:25 2010 New Revision: 214100 URL: http://svn.freebsd.org/changeset/base/214100 Log: MFC r213815: only need to look as far as '..' to find 'test/' Modified: stable/8/bin/sh/Makefile Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/Makefile ============================================================================== --- stable/8/bin/sh/Makefile Wed Oct 20 07:22:34 2010 (r214099) +++ stable/8/bin/sh/Makefile Wed Oct 20 07:32:25 2010 (r214100) @@ -26,7 +26,7 @@ WARNS?= 2 WFORMAT=0 .PATH: ${.CURDIR}/bltin \ - ${.CURDIR}/../../bin/test + ${.CURDIR}/../test CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ mksyntax mksyntax.o From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 07:40:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83BC0106566C; Wed, 20 Oct 2010 07:40:23 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71B408FC1B; Wed, 20 Oct 2010 07:40: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 o9K7eNl3041518; Wed, 20 Oct 2010 07:40:23 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9K7eNSt041516; Wed, 20 Oct 2010 07:40:23 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201010200740.o9K7eNSt041516@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 20 Oct 2010 07:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214101 - stable/8/share/man/man7 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 07:40:23 -0000 Author: maxim Date: Wed Oct 20 07:40:23 2010 New Revision: 214101 URL: http://svn.freebsd.org/changeset/base/214101 Log: MFC r212094: sync the man page with the reality: nfs/ includes are under include/ and include/fs/. Modified: stable/8/share/man/man7/hier.7 Directory Properties: stable/8/share/man/man7/ (props changed) Modified: stable/8/share/man/man7/hier.7 ============================================================================== --- stable/8/share/man/man7/hier.7 Wed Oct 20 07:32:25 2010 (r214100) +++ stable/8/share/man/man7/hier.7 Wed Oct 20 07:40:23 2010 (r214101) @@ -250,6 +250,8 @@ per-process file descriptors file system FIFOs file system .It Pa msdosfs/ MS-DOS file system +.It Pa nfs/ +C include files for NFS (Network File System) version 2, 3 and 4 .It Pa ntfs/ NTFS file system .It Pa nullfs/ @@ -334,7 +336,7 @@ include files for the UNI signalling pro .It Pa netsmb/ SMB/CIFS requester .It Pa nfs/ -C include files for NFS (Network File System) +C include files for NFS (Network File System) version 2 and 3 (legacy) .It Pa objc/ Objective C include files .It Pa openssl/ From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 07:54:27 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5EB1106564A; Wed, 20 Oct 2010 07:54:27 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3DB68FC08; Wed, 20 Oct 2010 07:54:27 +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 o9K7sRlc042036; Wed, 20 Oct 2010 07:54:27 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9K7sRTk042034; Wed, 20 Oct 2010 07:54:27 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201010200754.o9K7sRTk042034@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 20 Oct 2010 07:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214103 - stable/8/share/examples/etc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 07:54:27 -0000 Author: maxim Date: Wed Oct 20 07:54:27 2010 New Revision: 214103 URL: http://svn.freebsd.org/changeset/base/214103 Log: MFC r212138: csup(1) does not have -g flag. Modified: stable/8/share/examples/etc/make.conf Directory Properties: stable/8/share/examples/etc/ (props changed) Modified: stable/8/share/examples/etc/make.conf ============================================================================== --- stable/8/share/examples/etc/make.conf Wed Oct 20 07:47:31 2010 (r214102) +++ stable/8/share/examples/etc/make.conf Wed Oct 20 07:54:27 2010 (r214103) @@ -181,7 +181,7 @@ #SUP_UPDATE= # #SUP= /usr/bin/csup -#SUPFLAGS= -g -L 2 +#SUPFLAGS= -L 2 #SUPHOST= cvsup.uk.FreeBSD.org #SUPFILE= /usr/share/examples/cvsup/standard-supfile #PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 07:54:44 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41D11106564A; Wed, 20 Oct 2010 07:54:44 +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 2FBC28FC1F; Wed, 20 Oct 2010 07:54: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 o9K7siVP042076; Wed, 20 Oct 2010 07:54:44 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9K7si1j042074; Wed, 20 Oct 2010 07:54:44 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010200754.o9K7si1j042074@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 20 Oct 2010 07:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214104 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 07:54:44 -0000 Author: obrien Date: Wed Oct 20 07:54:43 2010 New Revision: 214104 URL: http://svn.freebsd.org/changeset/base/214104 Log: MFC: 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/8/bin/sh/Makefile Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/Makefile ============================================================================== --- stable/8/bin/sh/Makefile Wed Oct 20 07:54:27 2010 (r214103) +++ stable/8/bin/sh/Makefile Wed Oct 20 07:54:43 2010 (r214104) @@ -21,7 +21,7 @@ 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 From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 12:38:05 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F12D106566B; Wed, 20 Oct 2010 12:38:05 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 521208FC18; Wed, 20 Oct 2010 12:38:05 +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 o9KCc5WO057582; Wed, 20 Oct 2010 12:38:05 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9KCc56Y057580; Wed, 20 Oct 2010 12:38:05 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201010201238.o9KCc56Y057580@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 20 Oct 2010 12:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214108 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 12:38:05 -0000 Author: maxim Date: Wed Oct 20 12:38:05 2010 New Revision: 214108 URL: http://svn.freebsd.org/changeset/base/214108 Log: MFC r211992: some programs could send broadcast/multicast traffic to ipfw pseudo-interface. This leads to a panic due to uninitialized if_broadcastaddr address. Initialize it and implement ip_output() method to prevent mbuf leak later. Modified: stable/8/sys/netinet/ipfw/ip_fw_log.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_log.c Wed Oct 20 09:50:11 2010 (r214107) +++ stable/8/sys/netinet/ipfw/ip_fw_log.c Wed Oct 20 12:38:05 2010 (r214108) @@ -103,6 +103,24 @@ log_dummy(struct ifnet *ifp, u_long cmd, return EINVAL; } +static int +ipfw_log_output(struct ifnet *ifp, struct mbuf *m, + struct sockaddr *dst, struct route *ro) +{ + if (m != NULL) + m_freem(m); + return EINVAL; +} + +static void +ipfw_log_start(struct ifnet* ifp) +{ + panic("ipfw_log_start() must not be called"); +} + +static const u_char ipfwbroadcastaddr[6] = + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + void ipfw_log_bpf(int onoff) { @@ -119,11 +137,12 @@ ipfw_log_bpf(int onoff) ifp->if_flags = IFF_UP | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = (void *)log_dummy; ifp->if_ioctl = log_dummy; - ifp->if_start = (void *)log_dummy; - ifp->if_output = (void *)log_dummy; + ifp->if_start = ipfw_log_start; + ifp->if_output = ipfw_log_output; ifp->if_addrlen = 6; ifp->if_hdrlen = 14; if_attach(ifp); + ifp->if_broadcastaddr = ipfwbroadcastaddr; ifp->if_baudrate = IF_Mbps(10); bpfattach(ifp, DLT_EN10MB, 14); log_if = ifp; From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 17:42:11 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F6E31065697; Wed, 20 Oct 2010 17:42:11 +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 2267E8FC1B; Wed, 20 Oct 2010 17:42: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 o9KHgBjU064308; Wed, 20 Oct 2010 17:42:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9KHgBDs064304; Wed, 20 Oct 2010 17:42:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201010201742.o9KHgBDs064304@svn.freebsd.org> From: Xin LI Date: Wed, 20 Oct 2010 17:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214111 - in stable/8: share/man/man4 sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 17:42:11 -0000 Author: delphij Date: Wed Oct 20 17:42:10 2010 New Revision: 214111 URL: http://svn.freebsd.org/changeset/base/214111 Log: 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/8/share/man/man4/lagg.4 stable/8/sys/net/if_lagg.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/lagg.4 ============================================================================== --- stable/8/share/man/man4/lagg.4 Wed Oct 20 16:47:09 2010 (r214110) +++ stable/8/share/man/man4/lagg.4 Wed Oct 20 17:42:10 2010 (r214111) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2009 +.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 @@ -153,6 +161,7 @@ device as a workaround.) .Sh SEE ALSO .Xr ng_fec 4 , .Xr ng_one2many 4 , +.Xr sysctl 8 , .Xr ifconfig 8 .Sh HISTORY The Modified: stable/8/sys/net/if_lagg.c ============================================================================== --- stable/8/sys/net/if_lagg.c Wed Oct 20 16:47:09 2010 (r214110) +++ stable/8/sys/net/if_lagg.c Wed Oct 20 17:42:10 2010 (r214111) @@ -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) { @@ -1498,7 +1506,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@FreeBSD.ORG Wed Oct 20 17:58:12 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Wed Oct 20 18:25:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2C50106566B; Wed, 20 Oct 2010 18:25:00 +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 AE4938FC13; Wed, 20 Oct 2010 18:25:00 +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 o9KIP0r9065265; Wed, 20 Oct 2010 18:25:00 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9KIP0dW065248; Wed, 20 Oct 2010 18:25:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010201825.o9KIP0dW065248@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 20 Oct 2010 18:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214113 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 18:25:00 -0000 Author: obrien Date: Wed Oct 20 18:25:00 2010 New Revision: 214113 URL: http://svn.freebsd.org/changeset/base/214113 Log: MFC r213811: c89 linkage and storage class (also covers r213744, r213760) Modified: stable/8/bin/sh/alias.c stable/8/bin/sh/cd.c stable/8/bin/sh/eval.c stable/8/bin/sh/exec.c stable/8/bin/sh/expand.c stable/8/bin/sh/histedit.c stable/8/bin/sh/input.c stable/8/bin/sh/jobs.c stable/8/bin/sh/mail.c stable/8/bin/sh/main.c stable/8/bin/sh/memalloc.c stable/8/bin/sh/nodes.c.pat stable/8/bin/sh/options.c stable/8/bin/sh/output.c stable/8/bin/sh/parser.c stable/8/bin/sh/redir.c stable/8/bin/sh/shell.h stable/8/bin/sh/show.c stable/8/bin/sh/var.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/alias.c ============================================================================== --- stable/8/bin/sh/alias.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/alias.c Wed Oct 20 18:25:00 2010 (r214113) @@ -49,14 +49,14 @@ __FBSDID("$FreeBSD$"); #define ATABSIZE 39 -STATIC struct alias *atab[ATABSIZE]; -STATIC int aliases; +static struct alias *atab[ATABSIZE]; +static int aliases; -STATIC void setalias(const char *, const char *); -STATIC int unalias(const char *); -STATIC struct alias **hashalias(const char *); +static void setalias(const char *, const char *); +static int unalias(const char *); +static struct alias **hashalias(const char *); -STATIC +static void setalias(const char *name, const char *val) { @@ -111,7 +111,7 @@ setalias(const char *name, const char *v INTON; } -STATIC int +static int unalias(const char *name) { struct alias *ap, **app; @@ -276,7 +276,7 @@ unaliascmd(int argc __unused, char **arg return (i); } -STATIC struct alias ** +static struct alias ** hashalias(const char *p) { unsigned int hashval; Modified: stable/8/bin/sh/cd.c ============================================================================== --- stable/8/bin/sh/cd.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/cd.c Wed Oct 20 18:25:00 2010 (r214113) @@ -64,17 +64,17 @@ __FBSDID("$FreeBSD$"); #include "show.h" #include "cd.h" -STATIC int cdlogical(char *); -STATIC int cdphysical(char *); -STATIC int docd(char *, int, int); -STATIC char *getcomponent(void); -STATIC char *findcwd(char *); -STATIC void updatepwd(char *); -STATIC char *getpwd2(void); - -STATIC char *curdir = NULL; /* current working directory */ -STATIC char *prevdir; /* previous working directory */ -STATIC char *cdcomppath; +static int cdlogical(char *); +static int cdphysical(char *); +static int docd(char *, int, int); +static char *getcomponent(void); +static char *findcwd(char *); +static void updatepwd(char *); +static char *getpwd2(void); + +static char *curdir = NULL; /* current working directory */ +static char *prevdir; /* previous working directory */ +static char *cdcomppath; int cdcmd(int argc, char **argv) @@ -144,7 +144,7 @@ cdcmd(int argc, char **argv) * Actually change the directory. In an interactive shell, print the * directory name if "print" is nonzero. */ -STATIC int +static int docd(char *dest, int print, int phys) { @@ -160,7 +160,7 @@ docd(char *dest, int print, int phys) return 0; } -STATIC int +static int cdlogical(char *dest) { char *p; @@ -212,7 +212,7 @@ cdlogical(char *dest) return (0); } -STATIC int +static int cdphysical(char *dest) { char *p; @@ -231,7 +231,7 @@ cdphysical(char *dest) * Get the next component of the path name pointed to by cdcomppath. * This routine overwrites the string pointed to by cdcomppath. */ -STATIC char * +static char * getcomponent(void) { char *p; @@ -252,7 +252,7 @@ getcomponent(void) } -STATIC char * +static char * findcwd(char *dir) { char *new; @@ -295,7 +295,7 @@ findcwd(char *dir) * cd command. We also call hashcd to let the routines in exec.c know * that the current directory has changed. */ -STATIC void +static void updatepwd(char *dir) { hashcd(); /* update command hash table */ @@ -371,7 +371,7 @@ getpwd(void) /* * Return the current directory. */ -STATIC char * +static char * getpwd2(void) { struct stat stdot, stpwd; Modified: stable/8/bin/sh/eval.c ============================================================================== --- stable/8/bin/sh/eval.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/eval.c Wed Oct 20 18:25:00 2010 (r214113) @@ -75,10 +75,10 @@ __FBSDID("$FreeBSD$"); int evalskip; /* set if we are skipping commands */ -STATIC int skipcount; /* number of levels to skip */ +static int skipcount; /* number of levels to skip */ MKINIT int loopnest; /* current loop nesting level */ int funcnest; /* depth of function calls */ -STATIC int builtin_flags; /* evalcommand flags for builtins */ +static int builtin_flags; /* evalcommand flags for builtins */ char *commandname; @@ -87,14 +87,14 @@ int exitstatus; /* exit status of last int oexitstatus; /* saved exit status */ -STATIC void evalloop(union node *, int); -STATIC void evalfor(union node *, int); -STATIC void evalcase(union node *, int); -STATIC void evalsubshell(union node *, int); -STATIC void expredir(union node *); -STATIC void evalpipe(union node *); -STATIC void evalcommand(union node *, int, struct backcmd *); -STATIC void prehash(union node *); +static void evalloop(union node *, int); +static void evalfor(union node *, int); +static void evalcase(union node *, int); +static void evalsubshell(union node *, int); +static void expredir(union node *); +static void evalpipe(union node *); +static void evalcommand(union node *, int, struct backcmd *); +static void prehash(union node *); /* @@ -285,7 +285,7 @@ out: } -STATIC void +static void evalloop(union node *n, int flags) { int status; @@ -321,7 +321,7 @@ skipping: if (evalskip == SKIPCONT && -STATIC void +static void evalfor(union node *n, int flags) { struct arglist arglist; @@ -361,7 +361,7 @@ out: -STATIC void +static void evalcase(union node *n, int flags) { union node *cp; @@ -394,7 +394,7 @@ out: * Kick off a subshell to evaluate a tree. */ -STATIC void +static void evalsubshell(union node *n, int flags) { struct job *jp; @@ -420,7 +420,7 @@ evalsubshell(union node *n, int flags) * Compute the names of the files in a redirection list. */ -STATIC void +static void expredir(union node *n) { union node *redir; @@ -458,7 +458,7 @@ expredir(union node *n) * of all the rest.) */ -STATIC void +static void evalpipe(union node *n) { struct job *jp; @@ -571,7 +571,7 @@ out: * Execute a simple command. */ -STATIC void +static void evalcommand(union node *cmd, int flags, struct backcmd *backcmd) { struct stackmark smark; @@ -926,7 +926,7 @@ out: * check that the name will not be subject to expansion. */ -STATIC void +static void prehash(union node *n) { struct cmdentry entry; Modified: stable/8/bin/sh/exec.c ============================================================================== --- stable/8/bin/sh/exec.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/exec.c Wed Oct 20 18:25:00 2010 (r214113) @@ -91,15 +91,15 @@ struct tblentry { }; -STATIC struct tblentry *cmdtable[CMDTABLESIZE]; -STATIC int builtinloc = -1; /* index in path of %builtin, or -1 */ +static struct tblentry *cmdtable[CMDTABLESIZE]; +static int builtinloc = -1; /* index in path of %builtin, or -1 */ int exerrno = 0; /* Last exec error */ -STATIC void tryexec(char *, char **, char **); -STATIC void printentry(struct tblentry *, int); -STATIC struct tblentry *cmdlookup(const char *, int); -STATIC void delete_cmd_entry(void); +static void tryexec(char *, char **, char **); +static void printentry(struct tblentry *, int); +static struct tblentry *cmdlookup(const char *, int); +static void delete_cmd_entry(void); @@ -147,7 +147,7 @@ shellexec(char **argv, char **envp, cons } -STATIC void +static void tryexec(char *cmd, char **argv, char **envp) { int e; @@ -265,7 +265,7 @@ hashcmd(int argc __unused, char **argv _ } -STATIC void +static void printentry(struct tblentry *cmdp, int verbose) { int idx; @@ -604,10 +604,10 @@ deletefuncs(void) * entry. */ -STATIC struct tblentry **lastcmdentry; +static struct tblentry **lastcmdentry; -STATIC struct tblentry * +static struct tblentry * cmdlookup(const char *name, int add) { int hashval; @@ -644,7 +644,7 @@ cmdlookup(const char *name, int add) * Delete the command entry returned on the last lookup. */ -STATIC void +static void delete_cmd_entry(void) { struct tblentry *cmdp; Modified: stable/8/bin/sh/expand.c ============================================================================== --- stable/8/bin/sh/expand.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/expand.c Wed Oct 20 18:25:00 2010 (r214113) @@ -88,32 +88,32 @@ struct ifsregion { }; -STATIC char *expdest; /* output of current string */ -STATIC struct nodelist *argbackq; /* list of back quote expressions */ -STATIC struct ifsregion ifsfirst; /* first struct in list of ifs regions */ -STATIC struct ifsregion *ifslastp; /* last struct in list */ -STATIC struct arglist exparg; /* holds expanded arg list */ - -STATIC void argstr(char *, int); -STATIC char *exptilde(char *, int); -STATIC void expbackq(union node *, int, int); -STATIC int subevalvar(char *, char *, int, int, int, int); -STATIC char *evalvar(char *, int); -STATIC int varisset(char *, int); -STATIC void varvalue(char *, int, int, int); -STATIC void recordregion(int, int, int); -STATIC void removerecordregions(int); -STATIC void ifsbreakup(char *, struct arglist *); -STATIC void expandmeta(struct strlist *, int); -STATIC void expmeta(char *, char *); -STATIC void addfname(char *); -STATIC struct strlist *expsort(struct strlist *); -STATIC struct strlist *msort(struct strlist *, int); -STATIC int pmatch(const char *, const char *, int); -STATIC char *cvtnum(int, char *); -STATIC int collate_range_cmp(int, int); +static char *expdest; /* output of current string */ +static struct nodelist *argbackq; /* list of back quote expressions */ +static struct ifsregion ifsfirst; /* first struct in list of ifs regions */ +static struct ifsregion *ifslastp; /* last struct in list */ +static struct arglist exparg; /* holds expanded arg list */ + +static void argstr(char *, int); +static char *exptilde(char *, int); +static void expbackq(union node *, int, int); +static int subevalvar(char *, char *, int, int, int, int); +static char *evalvar(char *, int); +static int varisset(char *, int); +static void varvalue(char *, int, int, int); +static void recordregion(int, int, int); +static void removerecordregions(int); +static void ifsbreakup(char *, struct arglist *); +static void expandmeta(struct strlist *, int); +static void expmeta(char *, char *); +static void addfname(char *); +static struct strlist *expsort(struct strlist *); +static struct strlist *msort(struct strlist *, int); +static int pmatch(const char *, const char *, int); +static char *cvtnum(int, char *); +static int collate_range_cmp(int, int); -STATIC int +static int collate_range_cmp(int c1, int c2) { static char s1[2], s2[2]; @@ -201,7 +201,7 @@ expandarg(union node *arg, struct arglis * $@ like $* since no splitting will be performed. */ -STATIC void +static void argstr(char *p, int flag) { char c; @@ -263,7 +263,7 @@ argstr(char *p, int flag) breakloop:; } -STATIC char * +static char * exptilde(char *p, int flag) { char c, *startp = p; @@ -311,7 +311,7 @@ lose: } -STATIC void +static void removerecordregions(int endoff) { if (ifslastp == NULL) @@ -410,7 +410,7 @@ expari(int flag) * Expand stuff in backwards quotes. */ -STATIC void +static void expbackq(union node *cmd, int quoted, int flag) { struct backcmd in; @@ -490,7 +490,7 @@ expbackq(union node *cmd, int quoted, in -STATIC int +static int subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varflags) { @@ -616,7 +616,7 @@ recordleft: * input string. */ -STATIC char * +static char * evalvar(char *p, int flag) { int subtype; @@ -804,7 +804,7 @@ record: * Test whether a specialized variable is set. */ -STATIC int +static int varisset(char *name, int nulok) { @@ -846,7 +846,7 @@ varisset(char *name, int nulok) * Add the value of a specialized variable to the stack string. */ -STATIC void +static void varvalue(char *name, int quoted, int subtype, int flag) { int num; @@ -936,7 +936,7 @@ numvar: * string for IFS characters. */ -STATIC void +static void recordregion(int start, int end, int inquotes) { struct ifsregion *ifsp; @@ -967,7 +967,7 @@ recordregion(int start, int end, int inq * strings to the argument list. The regions of the string to be * searched for IFS characters have been stored by recordregion. */ -STATIC void +static void ifsbreakup(char *string, struct arglist *arglist) { struct ifsregion *ifsp; @@ -1073,10 +1073,10 @@ ifsbreakup(char *string, struct arglist * should be escapes. The results are stored in the list exparg. */ -STATIC char expdir[PATH_MAX]; +static char expdir[PATH_MAX]; #define expdir_end (expdir + sizeof(expdir)) -STATIC void +static void expandmeta(struct strlist *str, int flag __unused) { char *p; @@ -1123,7 +1123,7 @@ nometa: * Do metacharacter (i.e. *, ?, [...]) expansion. */ -STATIC void +static void expmeta(char *enddir, char *name) { char *p; @@ -1261,7 +1261,7 @@ expmeta(char *enddir, char *name) * Add a file name to the list. */ -STATIC void +static void addfname(char *name) { char *p; @@ -1282,7 +1282,7 @@ addfname(char *name) * work. */ -STATIC struct strlist * +static struct strlist * expsort(struct strlist *str) { int len; @@ -1295,7 +1295,7 @@ expsort(struct strlist *str) } -STATIC struct strlist * +static struct strlist * msort(struct strlist *list, int len) { struct strlist *p, *q = NULL; @@ -1353,7 +1353,7 @@ patmatch(const char *pattern, const char } -STATIC int +static int pmatch(const char *pattern, const char *string, int squoted) { const char *p, *q; @@ -1530,7 +1530,7 @@ casematch(union node *pattern, const cha * Our own itoa(). */ -STATIC char * +static char * cvtnum(int num, char *buf) { char temp[32]; Modified: stable/8/bin/sh/histedit.c ============================================================================== --- stable/8/bin/sh/histedit.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/histedit.c Wed Oct 20 18:25:00 2010 (r214113) @@ -68,7 +68,7 @@ EditLine *el; /* editline cookie */ int displayhist; static FILE *el_in, *el_out, *el_err; -STATIC char *fc_replace(const char *, char *, char *); +static char *fc_replace(const char *, char *, char *); /* * Set history and editing status. Called whenever the status may @@ -383,7 +383,7 @@ histcmd(int argc, char **argv) return 0; } -STATIC char * +static char * fc_replace(const char *s, char *p, char *r) { char *dest; Modified: stable/8/bin/sh/input.c ============================================================================== --- stable/8/bin/sh/input.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/input.c Wed Oct 20 18:25:00 2010 (r214113) @@ -98,13 +98,13 @@ MKINIT int parselleft; /* copy of parse char *parsenextc; /* copy of parsefile->nextc */ MKINIT struct parsefile basepf; /* top level input file */ char basebuf[BUFSIZ]; /* buffer for top level input file */ -STATIC struct parsefile *parsefile = &basepf; /* current input file */ +static struct parsefile *parsefile = &basepf; /* current input file */ int init_editline = 0; /* editline library initialized? */ int whichprompt; /* 1 == PS1, 2 == PS2 */ EditLine *el; /* cookie for editline package */ -STATIC void pushfile(void); +static void pushfile(void); static int preadfd(void); #ifdef mkinit @@ -468,7 +468,7 @@ setinputstring(char *string, int push) * adds a new entry to the stack and popfile restores the previous level. */ -STATIC void +static void pushfile(void) { struct parsefile *pf; Modified: stable/8/bin/sh/jobs.c ============================================================================== --- stable/8/bin/sh/jobs.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/jobs.c Wed Oct 20 18:25:00 2010 (r214113) @@ -72,12 +72,12 @@ __FBSDID("$FreeBSD$"); #include "mystring.h" -STATIC struct job *jobtab; /* array of jobs */ -STATIC int njobs; /* size of array */ +static struct job *jobtab; /* array of jobs */ +static int njobs; /* size of array */ MKINIT pid_t backgndpid = -1; /* pid of last background process */ #if JOBS -STATIC struct job *jobmru; /* most recently used job list */ -STATIC pid_t initialpgrp; /* pgrp of shell on invocation */ +static struct job *jobmru; /* most recently used job list */ +static pid_t initialpgrp; /* pgrp of shell on invocation */ #endif int in_waitcmd = 0; /* are we in waitcmd()? */ int in_dowait = 0; /* are we in dowait()? */ @@ -85,20 +85,20 @@ volatile sig_atomic_t breakwaitcmd = 0; static int ttyfd = -1; #if JOBS -STATIC void restartjob(struct job *); +static void restartjob(struct job *); #endif -STATIC void freejob(struct job *); -STATIC struct job *getjob(char *); -STATIC pid_t dowait(int, struct job *); -STATIC pid_t waitproc(int, int *); -STATIC void cmdtxt(union node *); -STATIC void cmdputs(const char *); -#if JOBS -STATIC void setcurjob(struct job *); -STATIC void deljob(struct job *); -STATIC struct job *getcurjob(struct job *); +static void freejob(struct job *); +static struct job *getjob(char *); +static pid_t dowait(int, struct job *); +static pid_t waitproc(int, int *); +static void cmdtxt(union node *); +static void cmdputs(const char *); +#if JOBS +static void setcurjob(struct job *); +static void deljob(struct job *); +static struct job *getcurjob(struct job *); #endif -STATIC void showjob(struct job *, pid_t, int); +static void showjob(struct job *, pid_t, int); /* @@ -239,7 +239,7 @@ bgcmd(int argc, char **argv) } -STATIC void +static void restartjob(struct job *jp) { struct procstat *ps; @@ -298,7 +298,7 @@ jobscmd(int argc, char *argv[]) return (0); } -STATIC void +static void showjob(struct job *jp, pid_t pid, int mode) { char s[64]; @@ -423,7 +423,7 @@ showjobs(int change, int mode) * Mark a job structure as unused. */ -STATIC void +static void freejob(struct job *jp) { struct procstat *ps; @@ -519,7 +519,7 @@ jobidcmd(int argc __unused, char **argv) * Convert a job name to a job structure. */ -STATIC struct job * +static struct job * getjob(char *name) { int jobno; @@ -659,7 +659,7 @@ makejob(union node *node __unused, int n } #if JOBS -STATIC void +static void setcurjob(struct job *cj) { struct job *jp, *prev; @@ -679,7 +679,7 @@ setcurjob(struct job *cj) jobmru = cj; } -STATIC void +static void deljob(struct job *j) { struct job *jp, *prev; @@ -699,7 +699,7 @@ deljob(struct job *j) * Return the most recently used job that isn't `nj', and preferably one * that is stopped. */ -STATIC struct job * +static struct job * getcurjob(struct job *nj) { struct job *jp; @@ -915,7 +915,7 @@ waitforjob(struct job *jp, int *origstat * Wait for a process to terminate. */ -STATIC pid_t +static pid_t dowait(int block, struct job *job) { pid_t pid; @@ -1021,7 +1021,7 @@ dowait(int block, struct job *job) * stopped processes. If block is zero, we return a value of zero * rather than blocking. */ -STATIC pid_t +static pid_t waitproc(int block, int *status) { int flags; @@ -1066,8 +1066,8 @@ stoppedjobs(void) * jobs command. */ -STATIC char *cmdnextc; -STATIC int cmdnleft; +static char *cmdnextc; +static int cmdnleft; #define MAXCMDTEXT 200 char * @@ -1083,7 +1083,7 @@ commandtext(union node *n) } -STATIC void +static void cmdtxt(union node *n) { union node *np; @@ -1216,7 +1216,7 @@ redir: -STATIC void +static void cmdputs(const char *s) { const char *p; Modified: stable/8/bin/sh/mail.c ============================================================================== --- stable/8/bin/sh/mail.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/mail.c Wed Oct 20 18:25:00 2010 (r214113) @@ -57,8 +57,8 @@ __FBSDID("$FreeBSD$"); #define MAXMBOXES 10 -STATIC int nmboxes; /* number of mailboxes */ -STATIC time_t mailtime[MAXMBOXES]; /* times of mailboxes */ +static int nmboxes; /* number of mailboxes */ +static time_t mailtime[MAXMBOXES]; /* times of mailboxes */ Modified: stable/8/bin/sh/main.c ============================================================================== --- stable/8/bin/sh/main.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/main.c Wed Oct 20 18:25:00 2010 (r214113) @@ -76,8 +76,8 @@ __FBSDID("$FreeBSD$"); int rootpid; int rootshell; -STATIC void read_profile(const char *); -STATIC char *find_dot_file(char *); +static void read_profile(const char *); +static char *find_dot_file(char *); /* * Main routine. We initialize things, parse the arguments, execute @@ -249,7 +249,7 @@ cmdloop(int top) * Read /etc/profile or .profile. Return on error. */ -STATIC void +static void read_profile(const char *name) { int fd; @@ -293,7 +293,7 @@ readcmdfile(const char *name) */ -STATIC char * +static char * find_dot_file(char *basename) { static char localname[FILENAME_MAX+1]; Modified: stable/8/bin/sh/memalloc.c ============================================================================== --- stable/8/bin/sh/memalloc.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/memalloc.c Wed Oct 20 18:25:00 2010 (r214113) @@ -123,8 +123,8 @@ struct stack_block { }; #define SPACE(sp) ((char*)(sp) + ALIGN(sizeof(struct stack_block))) -STATIC struct stack_block *stackp; -STATIC struct stackmark *markp; +static struct stack_block *stackp; +static struct stackmark *markp; char *stacknxt; int stacknleft; int sstrnleft; Modified: stable/8/bin/sh/nodes.c.pat ============================================================================== --- stable/8/bin/sh/nodes.c.pat Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/nodes.c.pat Wed Oct 20 18:25:00 2010 (r214113) @@ -46,19 +46,19 @@ #include "mystring.h" -STATIC int funcblocksize; /* size of structures in function */ -STATIC int funcstringsize; /* size of strings in node */ -STATIC pointer funcblock; /* block to allocate function from */ -STATIC char *funcstring; /* block to allocate strings from */ +static int funcblocksize; /* size of structures in function */ +static int funcstringsize; /* size of strings in node */ +static pointer funcblock; /* block to allocate function from */ +static char *funcstring; /* block to allocate strings from */ %SIZES -STATIC void calcsize(union node *); -STATIC void sizenodelist(struct nodelist *); -STATIC union node *copynode(union node *); -STATIC struct nodelist *copynodelist(struct nodelist *); -STATIC char *nodesavestr(char *); +static void calcsize(union node *); +static void sizenodelist(struct nodelist *); +static union node *copynode(union node *); +static struct nodelist *copynodelist(struct nodelist *); +static char *nodesavestr(char *); struct funcdef { @@ -96,7 +96,7 @@ getfuncnode(struct funcdef *fn) } -STATIC void +static void calcsize(union node *n) { %CALCSIZE @@ -104,7 +104,7 @@ calcsize(union node *n) -STATIC void +static void sizenodelist(struct nodelist *lp) { while (lp) { @@ -116,7 +116,7 @@ sizenodelist(struct nodelist *lp) -STATIC union node * +static union node * copynode(union node *n) { union node *new; @@ -126,7 +126,7 @@ copynode(union node *n) } -STATIC struct nodelist * +static struct nodelist * copynodelist(struct nodelist *lp) { struct nodelist *start; @@ -146,7 +146,7 @@ copynodelist(struct nodelist *lp) -STATIC char * +static char * nodesavestr(char *s) { char *p = s; Modified: stable/8/bin/sh/options.c ============================================================================== --- stable/8/bin/sh/options.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/options.c Wed Oct 20 18:25:00 2010 (r214113) @@ -69,10 +69,10 @@ char *nextopt_optptr; /* used by nextop char *minusc; /* argument to -c option */ -STATIC void options(int); -STATIC void minus_o(char *, int); -STATIC void setoption(int, int); -STATIC int getopts(char *, char *, char **, char ***, char **); +static void options(int); +static void minus_o(char *, int); +static void setoption(int, int); +static int getopts(char *, char *, char **, char ***, char **); /* @@ -135,7 +135,7 @@ optschanged(void) * to the argument list; we advance it past the options. */ -STATIC void +static void options(int cmdline) { char *kp, *p; @@ -244,7 +244,7 @@ end_options2: } } -STATIC void +static void minus_o(char *name, int val) { int i; @@ -281,7 +281,7 @@ minus_o(char *name, int val) } -STATIC void +static void setoption(int flag, int val) { int i; @@ -448,7 +448,7 @@ getoptscmd(int argc, char **argv) &shellparam.optptr); } -STATIC int +static int getopts(char *optstr, char *optvar, char **optfirst, char ***optnext, char **optptr) { Modified: stable/8/bin/sh/output.c ============================================================================== --- stable/8/bin/sh/output.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/output.c Wed Oct 20 18:25:00 2010 (r214113) @@ -167,7 +167,7 @@ outqstr(const char *p, struct output *fi outc('\'', file); } -STATIC char out_junk[16]; +static char out_junk[16]; void emptyoutbuf(struct output *dest) Modified: stable/8/bin/sh/parser.c ============================================================================== --- stable/8/bin/sh/parser.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/parser.c Wed Oct 20 18:25:00 2010 (r214113) @@ -82,41 +82,41 @@ struct heredoc { -STATIC struct heredoc *heredoclist; /* list of here documents to read */ -STATIC int parsebackquote; /* nonzero if we are inside backquotes */ -STATIC int doprompt; /* if set, prompt the user */ -STATIC int needprompt; /* true if interactive and at start of line */ -STATIC int lasttoken; /* last token read */ +static struct heredoc *heredoclist; /* list of here documents to read */ +static int parsebackquote; /* nonzero if we are inside backquotes */ +static int doprompt; /* if set, prompt the user */ +static int needprompt; /* true if interactive and at start of line */ +static int lasttoken; /* last token read */ MKINIT int tokpushback; /* last token pushed back */ -STATIC char *wordtext; /* text of last word returned by readtoken */ +static char *wordtext; /* text of last word returned by readtoken */ MKINIT int checkkwd; /* 1 == check for kwds, 2 == also eat newlines */ -STATIC struct nodelist *backquotelist; -STATIC union node *redirnode; -STATIC struct heredoc *heredoc; -STATIC int quoteflag; /* set if (part of) last token was quoted */ -STATIC int startlinno; /* line # where last token started */ -STATIC int funclinno; /* line # where the current function started */ +static struct nodelist *backquotelist; +static union node *redirnode; +static struct heredoc *heredoc; +static int quoteflag; /* set if (part of) last token was quoted */ +static int startlinno; /* line # where last token started */ +static int funclinno; /* line # where the current function started */ /* XXX When 'noaliases' is set to one, no alias expansion takes place. */ static int noaliases = 0; -STATIC union node *list(int); -STATIC union node *andor(void); -STATIC union node *pipeline(void); -STATIC union node *command(void); -STATIC union node *simplecmd(union node **, union node *); -STATIC union node *makename(void); -STATIC void parsefname(void); -STATIC void parseheredoc(void); -STATIC int peektoken(void); -STATIC int readtoken(void); -STATIC int xxreadtoken(void); -STATIC int readtoken1(int, char const *, char *, int); -STATIC int noexpand(char *); -STATIC void synexpect(int); -STATIC void synerror(const char *); -STATIC void setprompt(int); +static union node *list(int); +static union node *andor(void); +static union node *pipeline(void); +static union node *command(void); +static union node *simplecmd(union node **, union node *); +static union node *makename(void); +static void parsefname(void); +static void parseheredoc(void); +static int peektoken(void); +static int readtoken(void); +static int xxreadtoken(void); +static int readtoken1(int, char const *, char *, int); +static int noexpand(char *); +static void synexpect(int); +static void synerror(const char *); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Oct 21 01:13:41 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FDCB106566B; Thu, 21 Oct 2010 01:13:41 +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 6BE828FC12; Thu, 21 Oct 2010 01:13:41 +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 o9L1DfDh074266; Thu, 21 Oct 2010 01:13:41 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9L1Df79074263; Thu, 21 Oct 2010 01:13:41 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010210113.o9L1Df79074263@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 21 Oct 2010 01:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214123 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2010 01:13:41 -0000 Author: obrien Date: Thu Oct 21 01:13:41 2010 New Revision: 214123 URL: http://svn.freebsd.org/changeset/base/214123 Log: MFC r211281: don't shadow sigset r212243: improve comments in expand.c r213925: use rather than Modified: stable/8/bin/sh/error.c stable/8/bin/sh/expand.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/error.c ============================================================================== --- stable/8/bin/sh/error.c Wed Oct 20 23:41:16 2010 (r214122) +++ stable/8/bin/sh/error.c Thu Oct 21 01:13:41 2010 (r214123) @@ -98,7 +98,7 @@ exraise(int e) void onint(void) { - sigset_t sigset; + sigset_t sigs; /* * The !in_dotrap here is safe. The only way we can arrive here @@ -111,8 +111,8 @@ onint(void) return; } intpending = 0; - sigemptyset(&sigset); - sigprocmask(SIG_SETMASK, &sigset, NULL); + sigemptyset(&sigs); + sigprocmask(SIG_SETMASK, &sigs, NULL); /* * This doesn't seem to be needed, since main() emits a newline. Modified: stable/8/bin/sh/expand.c ============================================================================== --- stable/8/bin/sh/expand.c Wed Oct 20 23:41:16 2010 (r214122) +++ stable/8/bin/sh/expand.c Thu Oct 21 01:13:41 2010 (r214123) @@ -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) { @@ -966,6 +977,12 @@ recordregion(int start, int end, int inq * 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) @@ -1067,10 +1084,10 @@ 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. + * 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 char expdir[PATH_MAX]; @@ -1475,7 +1492,7 @@ breakloop: /* - * Remove any CTLESC characters from a string. + * Remove any CTLESC and CTLQUOTEMARK characters from a string. */ void From owner-svn-src-stable@FreeBSD.ORG Thu Oct 21 10:11:40 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1552F106566C; Thu, 21 Oct 2010 10:11:40 +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 02B5F8FC18; Thu, 21 Oct 2010 10: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 o9LABdBh085914; Thu, 21 Oct 2010 10:11:39 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9LABdR2085912; Thu, 21 Oct 2010 10:11:39 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201010211011.o9LABdR2085912@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 21 Oct 2010 10:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214126 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2010 10:11:40 -0000 Author: pluknet Date: Thu Oct 21 10:11:39 2010 New Revision: 214126 URL: http://svn.freebsd.org/changeset/base/214126 Log: Fix typo: Offlaod -> Offload. PR: docs/150756 Approved by: avg (mentor) Modified: stable/8/share/man/man4/nxge.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/nxge.4 ============================================================================== --- stable/8/share/man/man4/nxge.4 Thu Oct 21 08:57:25 2010 (r214125) +++ stable/8/share/man/man4/nxge.4 Thu Oct 21 10:11:39 2010 (r214126) @@ -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@FreeBSD.ORG Thu Oct 21 10:13:52 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Thu Oct 21 20:51:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFE5B106564A; Thu, 21 Oct 2010 20:51:17 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 92F228FC08; Thu, 21 Oct 2010 20:51:17 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id A124235992C; Thu, 21 Oct 2010 22:51:16 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 95C431729C; Thu, 21 Oct 2010 22:51:16 +0200 (CEST) Date: Thu, 21 Oct 2010 22:51:16 +0200 From: Jilles Tjoelker To: "David E. O'Brien" Message-ID: <20101021205116.GA58084@stack.nl> References: <201010210113.o9L1Df79074263@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010210113.o9L1Df79074263@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r214123 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2010 20:51:17 -0000 On Thu, Oct 21, 2010 at 01:13:41AM +0000, David E. O'Brien wrote: > Author: obrien > Date: Thu Oct 21 01:13:41 2010 > New Revision: 214123 > URL: http://svn.freebsd.org/changeset/base/214123 > Log: > MFC > r213925: use rather than Hmm, it looks like this was not merged except for adding the mergeinfo. r213925 was a fix for a problem introduced in r213775 which became visible because a local patch of mine added #include in another header file. However, r213775 was not MFCed to stable/8. -- Jilles Tjoelker From owner-svn-src-stable@FreeBSD.ORG Thu Oct 21 23:45:58 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53D8A106566C; Thu, 21 Oct 2010 23:45:58 +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 3ED4D8FC15; Thu, 21 Oct 2010 23:45:58 +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 o9LNjwSc007521; Thu, 21 Oct 2010 23:45:58 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9LNjw6W007514; Thu, 21 Oct 2010 23:45:58 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010212345.o9LNjw6W007514@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 21 Oct 2010 23:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214190 - in stable/8: . bin/sh contrib/top etc/periodic/daily gnu/usr.bin lib/libusb release/picobsd/floppy.tree/sbin sbin/geom/class/sched tools/regression/bin/sh/expansion tools/regr... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2010 23:45:58 -0000 Author: obrien Date: Thu Oct 21 23:45:57 2010 New Revision: 214190 URL: http://svn.freebsd.org/changeset/base/214190 Log: MFC r213814: Do not assume in growstackstr() that a "precious" character will be immediately written into the stack after the call. Instead let the caller manage the "space left". Added: stable/8/tools/regression/bin/sh/expansion/trim4.0 - copied unchanged from r213814, head/tools/regression/bin/sh/expansion/trim4.0 Modified: stable/8/bin/sh/histedit.c stable/8/bin/sh/memalloc.c stable/8/bin/sh/memalloc.h Directory Properties: stable/8/ (props changed) stable/8/Makefile (props changed) stable/8/Makefile.inc1 (props changed) stable/8/ObsoleteFiles.inc (props changed) stable/8/UPDATING (props changed) stable/8/bin/ (props changed) stable/8/bin/chio/ (props changed) stable/8/bin/chmod/ (props changed) stable/8/bin/cp/ (props changed) stable/8/bin/csh/ (props changed) stable/8/bin/date/ (props changed) stable/8/bin/expr/ (props changed) stable/8/bin/getfacl/ (props changed) stable/8/bin/kill/ (props changed) stable/8/bin/ln/ (props changed) stable/8/bin/ls/ (props changed) stable/8/bin/mv/ (props changed) stable/8/bin/pax/ (props changed) stable/8/bin/pkill/ (props changed) stable/8/bin/ps/ (props changed) stable/8/bin/pwait/ (props changed) stable/8/bin/setfacl/ (props changed) stable/8/bin/sh/ (props changed) stable/8/bin/sleep/ (props changed) stable/8/bin/test/ (props changed) stable/8/cddl/compat/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/lib/libnvpair/ (props changed) stable/8/cddl/lib/libzpool/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/bind9/ (props changed) stable/8/contrib/binutils/ (props changed) stable/8/contrib/bsnmp/ (props changed) stable/8/contrib/bzip2/ (props changed) stable/8/contrib/com_err/ (props changed) stable/8/contrib/csup/ (props changed) stable/8/contrib/ee/ (props changed) stable/8/contrib/expat/ (props changed) stable/8/contrib/file/ (props changed) stable/8/contrib/gcc/ (props changed) stable/8/contrib/gdb/ (props changed) stable/8/contrib/gdtoa/ (props changed) stable/8/contrib/groff/ (props changed) stable/8/contrib/ipfilter/ (props changed) stable/8/contrib/less/ (props changed) stable/8/contrib/libpcap/ (props changed) stable/8/contrib/ncurses/ (props changed) stable/8/contrib/netcat/ (props changed) stable/8/contrib/ntp/ (props changed) stable/8/contrib/nvi/ (props changed) stable/8/contrib/one-true-awk/ (props changed) stable/8/contrib/openbsm/ (props changed) stable/8/contrib/openpam/ (props changed) stable/8/contrib/pf/ (props changed) stable/8/contrib/sendmail/ (props changed) stable/8/contrib/tcp_wrappers/ (props changed) stable/8/contrib/tcpdump/ (props changed) stable/8/contrib/tcsh/ (props changed) stable/8/contrib/telnet/ (props changed) stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) stable/8/contrib/traceroute/ (props changed) stable/8/contrib/wpa/ (props changed) stable/8/contrib/xz/ (props changed) stable/8/crypto/heimdal/ (props changed) stable/8/crypto/openssh/ (props changed) stable/8/crypto/openssl/ (props changed) stable/8/etc/ (props changed) stable/8/etc/periodic/daily/ (props changed) stable/8/etc/periodic/daily/800.scrub-zfs (props changed) stable/8/games/factor/ (props changed) stable/8/games/fortune/ (props changed) stable/8/games/grdc/ (props changed) stable/8/games/pom/ (props changed) stable/8/gnu/lib/csu/ (props changed) stable/8/gnu/lib/libstdc++/ (props changed) stable/8/gnu/usr.bin/ (props changed) stable/8/gnu/usr.bin/Makefile (props changed) stable/8/gnu/usr.bin/dialog/ (props changed) stable/8/gnu/usr.bin/gdb/ (props changed) stable/8/gnu/usr.bin/gdb/kgdb/ (props changed) stable/8/gnu/usr.bin/groff/ (props changed) stable/8/gnu/usr.bin/patch/ (props changed) stable/8/include/ (props changed) stable/8/kerberos5/lib/libgssapi_krb5/ (props changed) stable/8/kerberos5/lib/libgssapi_spnego/ (props changed) stable/8/kerberos5/usr.bin/kdestroy/ (props changed) stable/8/kerberos5/usr.bin/kpasswd/ (props changed) stable/8/lib/ (props changed) stable/8/lib/bind/ (props changed) stable/8/lib/csu/ (props changed) stable/8/lib/libarchive/ (props changed) stable/8/lib/libbluetooth/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/lib/libc_r/ (props changed) stable/8/lib/libcam/ (props changed) stable/8/lib/libcompat/ (props changed) stable/8/lib/libdevinfo/ (props changed) stable/8/lib/libdisk/ (props changed) stable/8/lib/libedit/ (props changed) stable/8/lib/libelf/ (props changed) stable/8/lib/libexpat/ (props changed) stable/8/lib/libfetch/ (props changed) stable/8/lib/libgeom/ (props changed) stable/8/lib/libgpib/ (props changed) stable/8/lib/libgssapi/ (props changed) stable/8/lib/libjail/ (props changed) stable/8/lib/libkse/ (props changed) stable/8/lib/libkvm/ (props changed) stable/8/lib/liblzma/ (props changed) stable/8/lib/libmagic/ (props changed) stable/8/lib/libmemstat/ (props changed) stable/8/lib/libpam/ (props changed) stable/8/lib/libpmc/ (props changed) stable/8/lib/libradius/ (props changed) stable/8/lib/librpcsec_gss/ (props changed) stable/8/lib/libsm/ (props changed) stable/8/lib/libstand/ (props changed) stable/8/lib/libtacplus/ (props changed) stable/8/lib/libthr/ (props changed) stable/8/lib/libufs/ (props changed) stable/8/lib/libugidfw/ (props changed) stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) stable/8/lib/libusbhid/ (props changed) stable/8/lib/libutil/ (props changed) stable/8/lib/libz/ (props changed) stable/8/lib/libz/contrib/ (props changed) stable/8/lib/msun/ (props changed) stable/8/libexec/ (props changed) stable/8/libexec/ftpd/ (props changed) stable/8/libexec/rtld-elf/ (props changed) stable/8/libexec/tftpd/ (props changed) stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) stable/8/release/picobsd/tinyware/login/ (props changed) stable/8/sbin/ (props changed) stable/8/sbin/atacontrol/ (props changed) stable/8/sbin/bsdlabel/ (props changed) stable/8/sbin/camcontrol/ (props changed) stable/8/sbin/ddb/ (props changed) stable/8/sbin/devd/ (props changed) stable/8/sbin/devfs/ (props changed) stable/8/sbin/dhclient/ (props changed) stable/8/sbin/dump/ (props changed) stable/8/sbin/dumpfs/ (props changed) stable/8/sbin/fsck/ (props changed) stable/8/sbin/fsck_ffs/ (props changed) stable/8/sbin/fsck_msdosfs/ (props changed) stable/8/sbin/fsirand/ (props changed) stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/sched/gsched.8 (props changed) stable/8/sbin/geom/class/stripe/ (props changed) stable/8/sbin/ggate/ (props changed) stable/8/sbin/growfs/ (props changed) stable/8/sbin/hastctl/ (props changed) stable/8/sbin/hastd/ (props changed) stable/8/sbin/ifconfig/ (props changed) stable/8/sbin/ipfw/ (props changed) stable/8/sbin/iscontrol/ (props changed) stable/8/sbin/kldload/ (props changed) stable/8/sbin/kldstat/ (props changed) stable/8/sbin/mdconfig/ (props changed) stable/8/sbin/mksnap_ffs/ (props changed) stable/8/sbin/mount/ (props changed) stable/8/sbin/mount_cd9660/ (props changed) stable/8/sbin/mount_msdosfs/ (props changed) stable/8/sbin/mount_nfs/ (props changed) stable/8/sbin/natd/ (props changed) stable/8/sbin/newfs/ (props changed) stable/8/sbin/newfs_msdos/ (props changed) stable/8/sbin/ping6/ (props changed) stable/8/sbin/reboot/ (props changed) stable/8/sbin/restore/ (props changed) stable/8/sbin/routed/ (props changed) stable/8/sbin/setkey/ (props changed) stable/8/sbin/spppcontrol/ (props changed) stable/8/sbin/sysctl/ (props changed) stable/8/sbin/tunefs/ (props changed) stable/8/sbin/umount/ (props changed) stable/8/secure/ (props changed) stable/8/secure/lib/libcrypto/ (props changed) stable/8/secure/lib/libssl/ (props changed) stable/8/secure/usr.bin/bdes/ (props changed) stable/8/secure/usr.bin/openssl/ (props changed) stable/8/share/dict/ (props changed) stable/8/share/examples/ (props changed) stable/8/share/examples/etc/ (props changed) stable/8/share/examples/kld/syscall/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/share/misc/ (props changed) stable/8/share/mk/ (props changed) stable/8/share/termcap/ (props changed) stable/8/share/timedef/ (props changed) stable/8/share/zoneinfo/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/tools/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/tools/debugscripts/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/aio/aiotest/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/tools/regression/geom/ (props changed) stable/8/tools/regression/lib/libc/ (props changed) stable/8/tools/regression/lib/msun/test-conj.t (props changed) stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/posixsem/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/regression/usr.bin/tr/ (props changed) stable/8/tools/test/ (props changed) stable/8/tools/tools/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/nanobsd/ (props changed) stable/8/tools/tools/netrate/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/umastat/ (props changed) stable/8/tools/tools/vimage/ (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.bin/apply/ (props changed) stable/8/usr.bin/ar/ (props changed) stable/8/usr.bin/awk/ (props changed) stable/8/usr.bin/biff/ (props changed) stable/8/usr.bin/c89/ (props changed) stable/8/usr.bin/c99/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/column/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/du/ (props changed) stable/8/usr.bin/ee/ (props changed) stable/8/usr.bin/enigma/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/find/ (props changed) stable/8/usr.bin/finger/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/gcore/ (props changed) stable/8/usr.bin/getopt/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/hexdump/ (props changed) stable/8/usr.bin/indent/ (props changed) stable/8/usr.bin/jot/ (props changed) stable/8/usr.bin/kdump/ (props changed) stable/8/usr.bin/killall/ (props changed) stable/8/usr.bin/ktrace/ (props changed) stable/8/usr.bin/locale/ (props changed) stable/8/usr.bin/lockf/ (props changed) stable/8/usr.bin/look/ (props changed) stable/8/usr.bin/mail/ (props changed) stable/8/usr.bin/make/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.bin/minigzip/ (props changed) stable/8/usr.bin/ncal/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/pathchk/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/rpcgen/ (props changed) stable/8/usr.bin/ruptime/ (props changed) stable/8/usr.bin/script/ (props changed) stable/8/usr.bin/sed/ (props changed) stable/8/usr.bin/sockstat/ (props changed) stable/8/usr.bin/split/ (props changed) stable/8/usr.bin/stat/ (props changed) stable/8/usr.bin/systat/ (props changed) stable/8/usr.bin/tar/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/touch/ (props changed) stable/8/usr.bin/tr/ (props changed) stable/8/usr.bin/truss/ (props changed) stable/8/usr.bin/uname/ (props changed) stable/8/usr.bin/unifdef/ (props changed) stable/8/usr.bin/uniq/ (props changed) stable/8/usr.bin/unzip/ (props changed) stable/8/usr.bin/vmstat/ (props changed) stable/8/usr.bin/w/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.bin/xinstall/ (props changed) stable/8/usr.bin/xlint/ (props changed) stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/Makefile (props changed) stable/8/usr.sbin/acpi/ (props changed) stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/asf/ (props changed) stable/8/usr.sbin/bluetooth/ (props changed) stable/8/usr.sbin/bluetooth/bthidcontrol/ (props changed) stable/8/usr.sbin/bluetooth/bthidd/ (props changed) stable/8/usr.sbin/boot0cfg/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) stable/8/usr.sbin/burncd/ (props changed) stable/8/usr.sbin/cdcontrol/ (props changed) stable/8/usr.sbin/chown/ (props changed) stable/8/usr.sbin/config/ (props changed) stable/8/usr.sbin/cpucontrol/ (props changed) stable/8/usr.sbin/crashinfo/ (props changed) stable/8/usr.sbin/cron/ (props changed) stable/8/usr.sbin/crunch/examples/ (props changed) stable/8/usr.sbin/ctm/ (props changed) stable/8/usr.sbin/cxgbtool/ (props changed) stable/8/usr.sbin/devinfo/ (props changed) stable/8/usr.sbin/diskinfo/ (props changed) stable/8/usr.sbin/dumpcis/cardinfo.h (props changed) stable/8/usr.sbin/dumpcis/cis.h (props changed) stable/8/usr.sbin/faithd/ (props changed) stable/8/usr.sbin/fdcontrol/ (props changed) stable/8/usr.sbin/fdformat/ (props changed) stable/8/usr.sbin/fdread/ (props changed) stable/8/usr.sbin/fdwrite/ (props changed) stable/8/usr.sbin/fifolog/ (props changed) stable/8/usr.sbin/flowctl/ (props changed) stable/8/usr.sbin/freebsd-update/ (props changed) stable/8/usr.sbin/i2c/ (props changed) stable/8/usr.sbin/inetd/ (props changed) stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/mailwrapper/ (props changed) stable/8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) stable/8/usr.sbin/makefs/ffs/ffs_subr.c (props changed) stable/8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) stable/8/usr.sbin/makefs/getid.c (props changed) stable/8/usr.sbin/mergemaster/ (props changed) stable/8/usr.sbin/mfiutil/mfiutil.8 (props changed) stable/8/usr.sbin/mountd/ (props changed) stable/8/usr.sbin/moused/ (props changed) stable/8/usr.sbin/mptutil/ (props changed) stable/8/usr.sbin/mtest/ (props changed) stable/8/usr.sbin/mtree/ (props changed) stable/8/usr.sbin/named/ (props changed) stable/8/usr.sbin/ndp/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) stable/8/usr.sbin/nfsdumpstate/ (props changed) stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) stable/8/usr.sbin/periodic/ (props changed) stable/8/usr.sbin/pmcannotate/ (props changed) stable/8/usr.sbin/pmccontrol/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) stable/8/usr.sbin/powerd/ (props changed) stable/8/usr.sbin/ppp/ (props changed) stable/8/usr.sbin/pppctl/ (props changed) stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/rpc.lockd/ (props changed) stable/8/usr.sbin/rpc.umntall/ (props changed) stable/8/usr.sbin/rtsold/ (props changed) stable/8/usr.sbin/sade/ (props changed) stable/8/usr.sbin/service/ (props changed) stable/8/usr.sbin/services_mkdb/ (props changed) stable/8/usr.sbin/setfmac/ (props changed) stable/8/usr.sbin/setpmac/ (props changed) stable/8/usr.sbin/smbmsg/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/syslogd/ (props changed) stable/8/usr.sbin/traceroute/ (props changed) stable/8/usr.sbin/traceroute6/ (props changed) stable/8/usr.sbin/uathload/ (props changed) stable/8/usr.sbin/ugidfw/ (props changed) stable/8/usr.sbin/uhsoctl/ (props changed) stable/8/usr.sbin/usbconfig/ (props changed) stable/8/usr.sbin/vidcontrol/ (props changed) stable/8/usr.sbin/wpa/ (props changed) stable/8/usr.sbin/ypserv/ (props changed) stable/8/usr.sbin/zic/ (props changed) Modified: stable/8/bin/sh/histedit.c ============================================================================== --- stable/8/bin/sh/histedit.c Thu Oct 21 23:08:42 2010 (r214189) +++ stable/8/bin/sh/histedit.c Thu Oct 21 23:45:57 2010 (r214190) @@ -399,7 +399,7 @@ fc_replace(const char *s, char *p, char } else STPUTC(*s++, dest); } - STACKSTRNUL(dest); + STPUTC('\0', dest); dest = grabstackstr(dest); return (dest); Modified: stable/8/bin/sh/memalloc.c ============================================================================== --- stable/8/bin/sh/memalloc.c Thu Oct 21 23:08:42 2010 (r214189) +++ stable/8/bin/sh/memalloc.c Thu Oct 21 23:45:57 2010 (r214190) @@ -295,6 +295,13 @@ grabstackblock(int len) * is space for at least one character. */ +static char * +growstrstackblock(int n) +{ + growstackblock(); + sstrnleft = stackblocksize() - n; + return stackblock() + n; +} char * growstackstr(void) @@ -304,12 +311,10 @@ growstackstr(void) len = stackblocksize(); if (herefd >= 0 && len >= 1024) { xwrite(herefd, stackblock(), len); - sstrnleft = len - 1; + sstrnleft = len; return stackblock(); } - growstackblock(); - sstrnleft = stackblocksize() - len - 1; - return stackblock() + len; + return growstrstackblock(len); } @@ -323,9 +328,7 @@ makestrspace(void) int len; len = stackblocksize() - sstrnleft; - growstackblock(); - sstrnleft = stackblocksize() - len; - return stackblock() + len; + return growstrstackblock(len); } Modified: stable/8/bin/sh/memalloc.h ============================================================================== --- stable/8/bin/sh/memalloc.h Thu Oct 21 23:08:42 2010 (r214189) +++ stable/8/bin/sh/memalloc.h Thu Oct 21 23:45:57 2010 (r214190) @@ -67,9 +67,16 @@ void ungrabstackstr(char *, char *); #define stackblock() stacknxt #define stackblocksize() stacknleft #define STARTSTACKSTR(p) p = stackblock(), sstrnleft = stackblocksize() -#define STPUTC(c, p) (--sstrnleft >= 0? (*p++ = (c)) : (p = growstackstr(), *p++ = (c))) +#define STPUTC(c, p) (--sstrnleft >= 0? (*p++ = (c)) : (p = growstackstr(), --sstrnleft, *p++ = (c))) #define CHECKSTRSPACE(n, p) { if (sstrnleft < n) p = makestrspace(); } #define USTPUTC(c, p) (--sstrnleft, *p++ = (c)) +/* + * STACKSTRNUL's use is where we want to be able to turn a stack + * (non-sentinel, character counting string) into a C string, + * and later pretend the NUL is not there. + * Note: Because of STACKSTRNUL's semantics, STACKSTRNUL cannot be used + * on a stack that will grabstackstr()ed. + */ #define STACKSTRNUL(p) (sstrnleft == 0? (p = growstackstr(), *p = '\0') : (*p = '\0')) #define STUNPUTC(p) (++sstrnleft, --p) #define STTOPC(p) p[-1] Copied: stable/8/tools/regression/bin/sh/expansion/trim4.0 (from r213814, head/tools/regression/bin/sh/expansion/trim4.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/trim4.0 Thu Oct 21 23:45:57 2010 (r214190, copy of r213814, head/tools/regression/bin/sh/expansion/trim4.0) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +v1=/homes/SOME_USER +v2= +v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 + +# Trigger bug in VSTRIMRIGHT processing STADJUST() call in expand.c:subevalvar() +while [ ${#v2} -lt 2000 ]; do + v4="${v2} ${v1%/*} $v3" + if [ ${#v4} -ne $((${#v2} + ${#v3} + 8)) ]; then + echo bad: ${#v4} -ne $((${#v2} + ${#v3} + 8)) + fi + v2=x$v2 + v3=y$v3 +done From owner-svn-src-stable@FreeBSD.ORG Fri Oct 22 00:12:41 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EF36106564A; Fri, 22 Oct 2010 00:12:41 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id F3AA78FC19; Fri, 22 Oct 2010 00:12:40 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o9LNVmxv089945; Thu, 21 Oct 2010 16:31:48 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o9LNVm2N089944; Thu, 21 Oct 2010 16:31:48 -0700 (PDT) (envelope-from obrien) Date: Thu, 21 Oct 2010 16:31:48 -0700 From: "David O'Brien" To: Jilles Tjoelker Message-ID: <20101021233148.GA89895@dragon.NUXI.org> References: <201010210113.o9L1Df79074263@svn.freebsd.org> <20101021205116.GA58084@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101021205116.GA58084@stack.nl> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r214123 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2010 00:12:41 -0000 On Thu, Oct 21, 2010 at 10:51:16PM +0200, Jilles Tjoelker wrote: > On Thu, Oct 21, 2010 at 01:13:41AM +0000, David E. O'Brien wrote: > > MFC > > r213925: use rather than > > Hmm, it looks like this was not merged except for adding the mergeinfo. Hi Jilles, You are correct. Doing a merge of that results in a meaningless situation as the base isn't there.conflict. So I am blocking that particular revision from being a merge candidate and that could be merged in the future. http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.branchmerge.advanced.blockchanges -- -- David (obrien@FreeBSD.org) From owner-svn-src-stable@FreeBSD.ORG Fri Oct 22 06:56:11 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA5F6106566C; Fri, 22 Oct 2010 06:56: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 C8B1B8FC16; Fri, 22 Oct 2010 06:56: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 o9M6uBZF016340; Fri, 22 Oct 2010 06:56:11 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9M6uBLF016338; Fri, 22 Oct 2010 06:56:11 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010220656.o9M6uBLF016338@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 22 Oct 2010 06:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214196 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2010 06:56:12 -0000 Author: obrien Date: Fri Oct 22 06:56:11 2010 New Revision: 214196 URL: http://svn.freebsd.org/changeset/base/214196 Log: Reduce diff to 9-CURRENT. Modified: stable/8/bin/sh/expand.c Modified: stable/8/bin/sh/expand.c ============================================================================== --- stable/8/bin/sh/expand.c Fri Oct 22 06:39:14 2010 (r214195) +++ stable/8/bin/sh/expand.c Fri Oct 22 06:56:11 2010 (r214196) @@ -1084,15 +1084,14 @@ ifsbreakup(char *string, struct arglist } +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 char expdir[PATH_MAX]; -#define expdir_end (expdir + sizeof(expdir)) - static void expandmeta(struct strlist *str, int flag __unused) { From owner-svn-src-stable@FreeBSD.ORG Fri Oct 22 08:36:26 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90CB9106566B; Fri, 22 Oct 2010 08:36:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EFB28FC1A; Fri, 22 Oct 2010 08:36: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 o9M8aQFS019257; Fri, 22 Oct 2010 08:36:26 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9M8aQ6a019255; Fri, 22 Oct 2010 08:36:26 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010220836.o9M8aQ6a019255@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Oct 2010 08:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214197 - stable/8/sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2010 08:36:26 -0000 Author: avg Date: Fri Oct 22 08:36:26 2010 New Revision: 214197 URL: http://svn.freebsd.org/changeset/base/214197 Log: MFC r204955,205885: Various and sundry style, whitespace, and comment fixes. On behalf of: jhb Modified: stable/8/sys/sys/pcpu.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/pcpu.h ============================================================================== --- stable/8/sys/sys/pcpu.h Fri Oct 22 06:56:11 2010 (r214196) +++ stable/8/sys/sys/pcpu.h Fri Oct 22 08:36:26 2010 (r214197) @@ -42,22 +42,19 @@ #include #include -struct pcb; -struct thread; - /* * Define a set for pcpu data. * * We don't use SET_DECLARE because it defines the set as 'a' when we - * want 'aw'. GCC considers uninitialized data in a seperate section - * writable and there is no generic zero initializer that works for + * want 'aw'. gcc considers uninitialized data in a separate section + * writable, and there is no generic zero initializer that works for * structs and scalars. */ extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; __asm__( -#if defined(__arm__) +#ifdef __arm__ ".section set_pcpu, \"aw\", %progbits\n" #else ".section set_pcpu, \"aw\", @progbits\n" @@ -73,8 +70,8 @@ extern uintptr_t dpcpu_off[]; /* * Convenience defines. */ -#define DPCPU_START (uintptr_t)&__start_set_pcpu -#define DPCPU_STOP (uintptr_t)&__stop_set_pcpu +#define DPCPU_START ((uintptr_t)&__start_set_pcpu) +#define DPCPU_STOP ((uintptr_t)&__stop_set_pcpu) #define DPCPU_BYTES (DPCPU_STOP - DPCPU_START) #define DPCPU_MODMIN 2048 #define DPCPU_SIZE roundup2(DPCPU_BYTES, PAGE_SIZE) @@ -146,8 +143,8 @@ extern uintptr_t dpcpu_off[]; /* * XXXUPS remove as soon as we have per cpu variable - * linker sets and can define rm_queue in _rm_lock.h -*/ + * linker sets and can define rm_queue in _rm_lock.h + */ struct rm_queue { struct rm_queue* volatile rmq_next; struct rm_queue* volatile rmq_prev; @@ -155,7 +152,6 @@ struct rm_queue { #define PCPU_NAME_LEN (sizeof("CPU ") + sizeof(__XSTRING(MAXCPU) + 1)) - /* * This structure maps out the global data that needs to be kept on a * per-cpu basis. The members are accessed via the PCPU_GET/SET/PTR @@ -168,43 +164,40 @@ struct pcpu { struct thread *pc_fpcurthread; /* Fp state owner */ struct thread *pc_deadthread; /* Zombie thread or NULL */ struct pcb *pc_curpcb; /* Current pcb */ - uint64_t pc_switchtime; - int pc_switchticks; + uint64_t pc_switchtime; /* cpu_ticks() at last csw */ + int pc_switchticks; /* `ticks' at last csw */ u_int pc_cpuid; /* This cpu number */ cpumask_t pc_cpumask; /* This cpu mask */ cpumask_t pc_other_cpus; /* Mask of all other cpus */ SLIST_ENTRY(pcpu) pc_allcpu; struct lock_list_entry *pc_spinlocks; #ifdef KTR - char pc_name[PCPU_NAME_LEN]; /* String name for KTR. */ + char pc_name[PCPU_NAME_LEN]; /* String name for KTR */ #endif struct vmmeter pc_cnt; /* VM stats counters */ long pc_cp_time[CPUSTATES]; /* statclock ticks */ struct device *pc_device; - void *pc_netisr; /* netisr SWI cookie. */ + void *pc_netisr; /* netisr SWI cookie */ - /* + /* * Stuff for read mostly lock - * + * * XXXUPS remove as soon as we have per cpu variable * linker sets. */ - struct rm_queue pc_rm_queue; + struct rm_queue pc_rm_queue; - /* - * Dynamic per-cpu data area. - */ - uintptr_t pc_dynamic; + uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ /* * Keep MD fields last, so that CPU-specific variations on a * single architecture don't result in offset variations of - * the machine-independent fields of the pcpu. Even though + * the machine-independent fields of the pcpu. Even though * the pcpu structure is private to the kernel, some ports - * (e.g. lsof, part of gtop) define _KERNEL and include this - * header. While strictly speaking this is wrong, there's no - * reason not to keep the offsets of the MI fields contants. - * If only to make kernel debugging easier... + * (e.g., lsof, part of gtop) define _KERNEL and include this + * header. While strictly speaking this is wrong, there's no + * reason not to keep the offsets of the MI fields constant + * if only to make kernel debugging easier. */ PCPU_MD_FIELDS; } __aligned(128); @@ -214,6 +207,7 @@ struct pcpu { SLIST_HEAD(cpuhead, pcpu); extern struct cpuhead cpuhead; +extern struct pcpu *cpuid_to_pcpu[MAXCPU]; #define curcpu PCPU_GET(cpuid) #define curproc (curthread->td_proc) @@ -228,21 +222,17 @@ extern struct cpuhead cpuhead; * db_show_mdpcpu() is responsible for handling machine dependent * fields for the DDB 'show pcpu' command. */ - -extern struct pcpu *cpuid_to_pcpu[MAXCPU]; - - void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); void db_show_mdpcpu(struct pcpu *pcpu); -void pcpu_destroy(struct pcpu *pcpu); -struct pcpu *pcpu_find(u_int cpuid); -void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); void *dpcpu_alloc(int size); void dpcpu_copy(void *s, int size); void dpcpu_free(void *s, int size); void dpcpu_init(void *dpcpu, int cpuid); +void pcpu_destroy(struct pcpu *pcpu); +struct pcpu *pcpu_find(u_int cpuid); +void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); -#endif /* _KERNEL */ +#endif /* _KERNEL */ #endif /* !_SYS_PCPU_H_ */ From owner-svn-src-stable@FreeBSD.ORG Fri Oct 22 08:42:44 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2C531065675; Fri, 22 Oct 2010 08:42:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1B2A8FC16; Fri, 22 Oct 2010 08:42: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 o9M8giCf019693; Fri, 22 Oct 2010 08:42:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9M8gicQ019691; Fri, 22 Oct 2010 08:42:44 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010220842.o9M8gicQ019691@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Oct 2010 08:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214198 - stable/8/sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2010 08:42:44 -0000 Author: avg Date: Fri Oct 22 08:42:44 2010 New Revision: 214198 URL: http://svn.freebsd.org/changeset/base/214198 Log: MFC r212647: sys/pcpu.h: remove a workaround for a fixed ld bug Modified: stable/8/sys/sys/pcpu.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/pcpu.h ============================================================================== --- stable/8/sys/sys/pcpu.h Fri Oct 22 08:36:26 2010 (r214197) +++ stable/8/sys/sys/pcpu.h Fri Oct 22 08:42:44 2010 (r214198) @@ -44,24 +44,10 @@ /* * Define a set for pcpu data. - * - * We don't use SET_DECLARE because it defines the set as 'a' when we - * want 'aw'. gcc considers uninitialized data in a separate section - * writable, and there is no generic zero initializer that works for - * structs and scalars. */ extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; -__asm__( -#ifdef __arm__ - ".section set_pcpu, \"aw\", %progbits\n" -#else - ".section set_pcpu, \"aw\", @progbits\n" -#endif - "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" - "\t.previous"); - /* * Array of dynamic pcpu base offsets. Indexed by id. */ From owner-svn-src-stable@FreeBSD.ORG Fri Oct 22 08:46:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B021106564A; Fri, 22 Oct 2010 08:46:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0728FC13; Fri, 22 Oct 2010 08:46: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 o9M8kMpR020058; Fri, 22 Oct 2010 08:46:22 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9M8kMEo020056; Fri, 22 Oct 2010 08:46:22 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010220846.o9M8kMEo020056@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Oct 2010 08:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214199 - stable/8 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2010 08:46:23 -0000 Author: avg Date: Fri Oct 22 08:46:22 2010 New Revision: 214199 URL: http://svn.freebsd.org/changeset/base/214199 Log: add UPDATING entry for r214198: removed ld bug workaround This is a direct commit to the branch. Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Fri Oct 22 08:42:44 2010 (r214198) +++ stable/8/UPDATING Fri Oct 22 08:46:22 2010 (r214199) @@ -15,6 +15,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20101022: + A workaround for a fixed ld bug has been removed in kernel code, + so make sure that your system ld is built from sources after + revision 211583 (r210245 if building stable/8 kernel on head, + r211584 for stable/7). A symptom of incorrect ld version is + different addresses for set_pcpu section and __start_set_pcpu + symbol in kernel and/or modules. + 20100915: A new version of ZFS (version 15) has been merged. This version uses a python library for the following subcommands: From owner-svn-src-stable@FreeBSD.ORG Fri Oct 22 08:57:26 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46335106564A; Fri, 22 Oct 2010 08:57:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34AD08FC21; Fri, 22 Oct 2010 08: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 o9M8vQHq020927; Fri, 22 Oct 2010 08:57:26 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9M8vQv4020925; Fri, 22 Oct 2010 08:57:26 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010220857.o9M8vQv4020925@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Oct 2010 08:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214201 - stable/8/sys/cddl/compat/opensolaris/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2010 08:57:26 -0000 Author: avg Date: Fri Oct 22 08:57:25 2010 New Revision: 214201 URL: http://svn.freebsd.org/changeset/base/214201 Log: MFC r213528: opensolaris_kmem kmem_size(): report lesser of vm_kmem_size and available physical memory Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Fri Oct 22 08:51:49 2010 (r214200) +++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Fri Oct 22 08:57:25 2010 (r214201) @@ -112,18 +112,30 @@ zfs_kmem_free(void *buf, size_t size __u free(buf, M_SOLARIS); } +static uint64_t kmem_size_val; + +static void +kmem_size_init(void *unused __unused) +{ + + kmem_size_val = (uint64_t)cnt.v_page_count * PAGE_SIZE; + if (kmem_size_val > vm_kmem_size) + kmem_size_val = vm_kmem_size; +} +SYSINIT(kmem_size_init, SI_SUB_KMEM, SI_ORDER_ANY, kmem_size_init, NULL); + uint64_t kmem_size(void) { - return ((uint64_t)vm_kmem_size); + return (kmem_size_val); } uint64_t kmem_used(void) { - return ((uint64_t)kmem_map->size); + return (kmem_map->size); } static int From owner-svn-src-stable@FreeBSD.ORG Fri Oct 22 16:00:04 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 385FE10656E6; Fri, 22 Oct 2010 16:00:01 +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 177188FC15; Fri, 22 Oct 2010 16:00: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 o9MG003I059123; Fri, 22 Oct 2010 16:00:00 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9MG00a7059121; Fri, 22 Oct 2010 16:00:00 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201010221600.o9MG00a7059121@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 22 Oct 2010 16:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214206 - in stable/8: share/man/man9 sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2010 16:00:04 -0000 Author: mdf Date: Fri Oct 22 16:00:00 2010 New Revision: 214206 URL: http://svn.freebsd.org/changeset/base/214206 Log: MFC r214062: uma_zfree(zone, NULL) should do nothing, to match free(9). Noticed by: Ron Steinke Modified: stable/8/share/man/man9/zone.9 stable/8/sys/vm/uma_core.c Directory Properties: stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man9/zone.9 ============================================================================== --- stable/8/share/man/man9/zone.9 Fri Oct 22 14:07:12 2010 (r214205) +++ stable/8/share/man/man9/zone.9 Fri Oct 22 16:00:00 2010 (r214206) @@ -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/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Fri Oct 22 14:07:12 2010 (r214205) +++ stable/8/sys/vm/uma_core.c Fri Oct 22 16:00:00 2010 (r214206) @@ -2519,6 +2519,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, zone->uz_size, udata); From owner-svn-src-stable@FreeBSD.ORG Fri Oct 22 16:00:46 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Fri Oct 22 17:49:11 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Fri Oct 22 23:12:46 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sat Oct 23 00:41:26 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3AED106564A; Sat, 23 Oct 2010 00:41:26 +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 91E158FC0A; Sat, 23 Oct 2010 00:41: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 o9N0fQDX070951; Sat, 23 Oct 2010 00:41:26 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9N0fQrR070949; Sat, 23 Oct 2010 00:41:26 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201010230041.o9N0fQrR070949@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 23 Oct 2010 00:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214231 - stable/8/sys/dev/sis X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 00:41:27 -0000 Author: yongari Date: Sat Oct 23 00:41:26 2010 New Revision: 214231 URL: http://svn.freebsd.org/changeset/base/214231 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/8/sys/dev/sis/if_sis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sis/if_sis.c ============================================================================== --- stable/8/sys/dev/sis/if_sis.c Fri Oct 22 23:12:45 2010 (r214230) +++ stable/8/sys/dev/sis/if_sis.c Sat Oct 23 00:41:26 2010 (r214231) @@ -1795,12 +1795,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) ) @@ -1825,11 +1828,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@FreeBSD.ORG Sat Oct 23 00:44:17 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sat Oct 23 10:05:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8FBB1065670; Sat, 23 Oct 2010 10:05:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AC92F8FC15; Sat, 23 Oct 2010 10:05:00 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 35C4246BA7; Sat, 23 Oct 2010 06:05:00 -0400 (EDT) Date: Sat, 23 Oct 2010 11:05:00 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Andriy Gapon In-Reply-To: <201010220846.o9M8kMEo020056@svn.freebsd.org> Message-ID: References: <201010220846.o9M8kMEo020056@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r214199 - stable/8 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 10:05:01 -0000 On Fri, 22 Oct 2010, Andriy Gapon wrote: > +20101022: > + A workaround for a fixed ld bug has been removed in kernel code, > + so make sure that your system ld is built from sources after > + revision 211583 (r210245 if building stable/8 kernel on head, > + r211584 for stable/7). A symptom of incorrect ld version is > + different addresses for set_pcpu section and __start_set_pcpu > + symbol in kernel and/or modules. Since many of our users still rely on cvsup to update FreeBSD source, it might be useful to provide rough date thresholds for the branches in addition to the Subversion changeset numbers (which are less easy to deal with when checking out with cvsup/cvs). Thanks! Robert From owner-svn-src-stable@FreeBSD.ORG Sat Oct 23 13:36:09 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFE8510656AB; Sat, 23 Oct 2010 13:36:09 +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 BE54E8FC2B; Sat, 23 Oct 2010 13:36:09 +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 o9NDa99K088296; Sat, 23 Oct 2010 13:36:09 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NDa9Mp088294; Sat, 23 Oct 2010 13:36:09 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010231336.o9NDa9Mp088294@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 23 Oct 2010 13:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214239 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 13:36:09 -0000 Author: jilles Date: Sat Oct 23 13:36:09 2010 New Revision: 214239 URL: http://svn.freebsd.org/changeset/base/214239 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/8/bin/sh/sh.1 Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/sh.1 ============================================================================== --- stable/8/bin/sh/sh.1 Sat Oct 23 13:16:39 2010 (r214238) +++ stable/8/bin/sh/sh.1 Sat Oct 23 13:36:09 2010 (r214239) @@ -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 @@ -732,6 +732,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 @@ -769,15 +776,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 & , From owner-svn-src-stable@FreeBSD.ORG Sat Oct 23 13:57:26 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sat Oct 23 14:00:31 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sat Oct 23 14:04:04 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sat Oct 23 14:15:11 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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@FreeBSD.ORG Sat Oct 23 14:16:33 2010 Return-Path: Delivered-To: svn-src-stable@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@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the 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 & , From owner-svn-src-stable@FreeBSD.ORG Sat Oct 23 21:20:26 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8DE81065673; Sat, 23 Oct 2010 21:20:26 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 7BBB78FC15; Sat, 23 Oct 2010 21:20:26 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 38C011DD732; Sat, 23 Oct 2010 23:20:24 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 2CA1317280; Sat, 23 Oct 2010 23:20:24 +0200 (CEST) Date: Sat, 23 Oct 2010 23:20:24 +0200 From: Jilles Tjoelker To: "David E. O'Brien" Message-ID: <20101023212023.GA10891@stack.nl> References: <201010182310.o9INAWPU089616@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010182310.o9INAWPU089616@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r214045 - in stable/8/tools/regression/bin/sh: builtins errors execution expansion set-e X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 21:20:26 -0000 On Mon, Oct 18, 2010 at 11:10:32PM +0000, David E. O'Brien wrote: > Author: obrien > Date: Mon Oct 18 23:10:32 2010 > New Revision: 214045 > URL: http://svn.freebsd.org/changeset/base/214045 > > Log: > MFC: > r204801: make sure to popredir() even if a special builtin caused an error > r204802: make sure to popredir() even if a function caused an error > Copied: stable/8/tools/regression/bin/sh/builtins/command10.0 (from r204802, head/tools/regression/bin/sh/builtins/command10.0) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/8/tools/regression/bin/sh/builtins/command10.0 Mon Oct 18 23:10:32 2010 (r214045, copy of r204802, head/tools/regression/bin/sh/builtins/command10.0) > @@ -0,0 +1,14 @@ > +# $FreeBSD$ > + > +failures=0 > + > +check() { > + if ! eval "[ $* ]"; then > + echo "Failed: $*" > + : $((failures += 1)) > + fi > +} > + > +check '"$(f() { shift x; }; { command eval f 2>/dev/null; } >/dev/null; echo hi)" = hi' > + > +exit $((failures > 0)) > Copied: stable/8/tools/regression/bin/sh/builtins/command9.0 (from r204801, head/tools/regression/bin/sh/builtins/command9.0) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/8/tools/regression/bin/sh/builtins/command9.0 Mon Oct 18 23:10:32 2010 (r214045, copy of r204801, head/tools/regression/bin/sh/builtins/command9.0) > @@ -0,0 +1,14 @@ > +# $FreeBSD$ > + > +failures=0 > + > +check() { > + if ! eval "[ $* ]"; then > + echo "Failed: $*" > + : $((failures += 1)) > + fi > +} > + > +check '"$({ command eval shift x 2>/dev/null; } >/dev/null; echo hi)" = hi' > + > +exit $((failures > 0)) These work on stable/8, but for the wrong reason. In stable/8, 'command' does not allow executing builtin utilities, and therefore 'eval' cannot be found. This is a different error than the expected passing of a non-number to 'shift', and does not allow testing for the bug this is supposed to check for. Some of the other tests for these kinds of bugs use fifos and 'fc', which also work in older sh (from the point when POSIX-style special builtins were implemented; before that, 'fc' errors were fatal, probably for this reason). However, when I allowed 'command' to execute builtin utilities, I started to use 'command eval' because it makes the tests more readable and easier to write. Demonstration of the bug in stable/8: $ sh $ shift x shift: Illegal number: x $ echo $( { fc -e :; } >/dev/null; echo hi) shift: Illegal number: x $ "hi" should be printed, and is printed correctly if the procedure is repeated without the >/dev/null redirection. Because this does not cause any extra failures, I don't think it is necessary to revert it. However, it seems unusual to MFC a test for a bugfix without also MFCing the bugfix. -- Jilles Tjoelker From owner-svn-src-stable@FreeBSD.ORG Sat Oct 23 21:56:51 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 029B7106566C; Sat, 23 Oct 2010 21:56:50 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACA2F8FC08; Sat, 23 Oct 2010 21:56: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 o9NLuojA003143; Sat, 23 Oct 2010 21:56:50 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NLuoFh003140; Sat, 23 Oct 2010 21:56:50 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201010232156.o9NLuoFh003140@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 23 Oct 2010 21:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214252 - stable/8/sbin/geom/core X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 21:56:51 -0000 Author: pjd Date: Sat Oct 23 21:56:50 2010 New Revision: 214252 URL: http://svn.freebsd.org/changeset/base/214252 Log: Implement G_TYPE_MULTI and G_VAL_OPTIONAL for stable/8. This should have been MFC, but I've no green light from marcel to remove G_TYPE_ASCNUM and gc_argname and to modify geom_part in stable/8, so this is reimplementation that doesn't touch gpart and hopefully doesn't break anything. Modified: stable/8/sbin/geom/core/geom.c stable/8/sbin/geom/core/geom.h Modified: stable/8/sbin/geom/core/geom.c ============================================================================== --- stable/8/sbin/geom/core/geom.c Sat Oct 23 21:25:50 2010 (r214251) +++ stable/8/sbin/geom/core/geom.c Sat Oct 23 21:56:50 2010 (r214252) @@ -224,33 +224,61 @@ find_option(struct g_command *cmd, char * Add given option to gctl_req. */ static void -set_option(struct gctl_req *req, struct g_option *opt, const char *val) +set_option(struct g_command *cmd, struct gctl_req *req, struct g_option *opt, + const char *val) { - char *s; - intmax_t number; + const char *optname; + uint64_t number; + void *ptr; - if (G_OPT_TYPE(opt) == G_TYPE_NUMBER || - G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { + if (G_OPT_ISMULTI(opt)) { + size_t optnamesize; + + if (G_OPT_NUM(opt) == UCHAR_MAX) + errx(EXIT_FAILURE, "Too many -%c options.", opt->go_char); + + /* + * Base option name length plus 3 bytes for option number + * (max. 255 options) plus 1 byte for terminating '\0'. + */ + optnamesize = strlen(opt->go_name) + 3 + 1; + ptr = malloc(optnamesize); + if (ptr == NULL) + errx(EXIT_FAILURE, "No memory."); + snprintf(ptr, optnamesize, "%s%u", opt->go_name, G_OPT_NUM(opt)); + G_OPT_NUMINC(opt); + optname = ptr; + } else { + optname = opt->go_name; + } + + if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { if (expand_number(val, &number) == -1) { - err(EXIT_FAILURE, "Invalid value for '%c' argument.", + err(EXIT_FAILURE, "Invalid value for '%c' argument", opt->go_char); } - if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) - opt->go_val = malloc(sizeof(intmax_t)); - else { - asprintf(&s, "%jd", number); - opt->go_val = s; - } + opt->go_val = malloc(sizeof(intmax_t)); if (opt->go_val == NULL) errx(EXIT_FAILURE, "No memory."); - if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { - *(intmax_t *)opt->go_val = number; - gctl_ro_param(req, opt->go_name, sizeof(intmax_t), - opt->go_val); - } else + *(intmax_t *)opt->go_val = number; + gctl_ro_param(req, opt->go_name, sizeof(intmax_t), opt->go_val); + } else if (G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { + if (cmd->gc_argname == NULL || *val != '\0') { + char *s; + + if (expand_number(val, &number) == -1) { + err(EXIT_FAILURE, "Invalid value for '%c' argument", + opt->go_char); + } + asprintf(&s, "%jd", number); + if (s == NULL) + errx(EXIT_FAILURE, "No memory."); + opt->go_val = s; gctl_ro_param(req, opt->go_name, -1, opt->go_val); + } } else if (G_OPT_TYPE(opt) == G_TYPE_STRING) { - gctl_ro_param(req, opt->go_name, -1, val); + if (cmd->gc_argname == NULL || *val != '\0') + gctl_ro_param(req, opt->go_name, -1, val); } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { opt->go_val = malloc(sizeof(int)); if (opt->go_val == NULL) @@ -260,6 +288,9 @@ set_option(struct gctl_req *req, struct } else { assert(!"Invalid type"); } + + if (G_OPT_ISMULTI(opt)) + free(__DECONST(char *, optname)); } /* @@ -284,7 +315,10 @@ parse_arguments(struct g_command *cmd, s if (opt->go_name == NULL) break; assert(G_OPT_TYPE(opt) != 0); - assert((opt->go_type & ~G_TYPE_MASK) == 0); + assert((opt->go_type & ~(G_TYPE_MASK | G_TYPE_MULTI)) == 0); + /* Multiple bool arguments makes no sense. */ + assert(G_OPT_TYPE(opt) != G_TYPE_BOOL || + (opt->go_type & G_TYPE_MULTI) == 0); strlcatf(opts, sizeof(opts), "%c", opt->go_char); if (G_OPT_TYPE(opt) != G_TYPE_BOOL) strlcat(opts, ":", sizeof(opts)); @@ -304,16 +338,16 @@ parse_arguments(struct g_command *cmd, s opt = find_option(cmd, ch); if (opt == NULL) usage(); - if (G_OPT_ISDONE(opt)) { + if (!G_OPT_ISMULTI(opt) && G_OPT_ISDONE(opt)) { warnx("Option '%c' specified twice.", opt->go_char); usage(); } G_OPT_DONE(opt); if (G_OPT_TYPE(opt) == G_TYPE_BOOL) - set_option(req, opt, "1"); + set_option(cmd, req, opt, "1"); else - set_option(req, opt, optarg); + set_option(cmd, req, opt, optarg); } *argc -= optind; *argv += optind; @@ -330,26 +364,22 @@ parse_arguments(struct g_command *cmd, s if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { assert(opt->go_val == NULL); - set_option(req, opt, "0"); + set_option(cmd, req, opt, "0"); } else { if (opt->go_val == NULL) { warnx("Option '%c' not specified.", opt->go_char); usage(); - } else { - if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { - gctl_ro_param(req, opt->go_name, - sizeof(intmax_t), opt->go_val); - } else if (G_OPT_TYPE(opt) == G_TYPE_STRING || - G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { - if (cmd->gc_argname == NULL || - opt->go_val == NULL || - *(char *)opt->go_val != '\0') - gctl_ro_param(req, opt->go_name, - -1, opt->go_val); - } else { - assert(!"Invalid type"); - } + } else if (opt->go_val == G_VAL_OPTIONAL) { + /* add nothing. */ + } else if (G_OPT_TYPE(opt) == G_TYPE_STRING) { + set_option(cmd, req, opt, opt->go_val); + } else if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { + char val[64]; + + snprintf(val, sizeof(val), "%jd", + *(intmax_t *)opt->go_val); + set_option(cmd, req, opt, val); } } } Modified: stable/8/sbin/geom/core/geom.h ============================================================================== --- stable/8/sbin/geom/core/geom.h Sat Oct 23 21:25:50 2010 (r214251) +++ stable/8/sbin/geom/core/geom.h Sat Oct 23 21:56:50 2010 (r214252) @@ -41,11 +41,19 @@ #define G_TYPE_ASCNUM 0x04 #define G_TYPE_MASK 0x0f #define G_TYPE_DONE 0x10 +#define G_TYPE_MULTI 0x20 +#define G_TYPE_NUMMASK 0xff00 +#define G_TYPE_NUMSHIFT 8 #define G_OPT_MAX 16 #define G_OPT_DONE(opt) do { (opt)->go_type |= G_TYPE_DONE; } while (0) #define G_OPT_ISDONE(opt) ((opt)->go_type & G_TYPE_DONE) +#define G_OPT_ISMULTI(opt) ((opt)->go_type & G_TYPE_MULTI) #define G_OPT_TYPE(opt) ((opt)->go_type & G_TYPE_MASK) +#define G_OPT_NUM(opt) (((opt)->go_type & G_TYPE_NUMMASK) >> G_TYPE_NUMSHIFT) +#define G_OPT_NUMINC(opt) ((opt)->go_type += (1 << G_TYPE_NUMSHIFT)) + +#define G_VAL_OPTIONAL ((void *)-1) #define G_OPT_SENTINEL { '\0', NULL, NULL, G_TYPE_NONE } #define G_NULL_OPTS { G_OPT_SENTINEL } From owner-svn-src-stable@FreeBSD.ORG Sat Oct 23 22:04:38 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1665C106564A; Sat, 23 Oct 2010 22:04:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 045D18FC1A; Sat, 23 Oct 2010 22:04:38 +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 o9NM4bgM003382; Sat, 23 Oct 2010 22:04:37 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NM4bPW003379; Sat, 23 Oct 2010 22:04:37 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201010232204.o9NM4bPW003379@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 23 Oct 2010 22:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214253 - stable/8/sbin/geom/core X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 22:04:38 -0000 Author: pjd Date: Sat Oct 23 22:04:37 2010 New Revision: 214253 URL: http://svn.freebsd.org/changeset/base/214253 Log: Constify go_val field. (Should've been MFC of r212547.) Modified: stable/8/sbin/geom/core/geom.c stable/8/sbin/geom/core/geom.h Modified: stable/8/sbin/geom/core/geom.c ============================================================================== --- stable/8/sbin/geom/core/geom.c Sat Oct 23 21:56:50 2010 (r214252) +++ stable/8/sbin/geom/core/geom.c Sat Oct 23 22:04:37 2010 (r214253) @@ -257,10 +257,11 @@ set_option(struct g_command *cmd, struct err(EXIT_FAILURE, "Invalid value for '%c' argument", opt->go_char); } - opt->go_val = malloc(sizeof(intmax_t)); - if (opt->go_val == NULL) + ptr = malloc(sizeof(intmax_t)); + if (ptr == NULL) errx(EXIT_FAILURE, "No memory."); - *(intmax_t *)opt->go_val = number; + *(intmax_t *)ptr = number; + opt->go_val = ptr; gctl_ro_param(req, opt->go_name, sizeof(intmax_t), opt->go_val); } else if (G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { if (cmd->gc_argname == NULL || *val != '\0') { @@ -280,10 +281,11 @@ set_option(struct g_command *cmd, struct if (cmd->gc_argname == NULL || *val != '\0') gctl_ro_param(req, opt->go_name, -1, val); } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { - opt->go_val = malloc(sizeof(int)); - if (opt->go_val == NULL) + ptr = malloc(sizeof(int)); + if (ptr == NULL) errx(EXIT_FAILURE, "No memory."); - *(int *)opt->go_val = *val - '0'; + *(int *)ptr = *val - '0'; + opt->go_val = ptr; gctl_ro_param(req, opt->go_name, sizeof(int), opt->go_val); } else { assert(!"Invalid type"); @@ -378,7 +380,7 @@ parse_arguments(struct g_command *cmd, s char val[64]; snprintf(val, sizeof(val), "%jd", - *(intmax_t *)opt->go_val); + *(const intmax_t *)opt->go_val); set_option(cmd, req, opt, val); } } Modified: stable/8/sbin/geom/core/geom.h ============================================================================== --- stable/8/sbin/geom/core/geom.h Sat Oct 23 21:56:50 2010 (r214252) +++ stable/8/sbin/geom/core/geom.h Sat Oct 23 22:04:37 2010 (r214253) @@ -62,7 +62,7 @@ struct g_option { char go_char; const char *go_name; - void *go_val; + const void *go_val; unsigned go_type; }; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 23 22:11:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A68D0106564A; Sat, 23 Oct 2010 22:11:30 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93AF58FC15; Sat, 23 Oct 2010 22:11: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 o9NMBUUT003601; Sat, 23 Oct 2010 22:11:30 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NMBUee003595; Sat, 23 Oct 2010 22:11:30 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201010232211.o9NMBUee003595@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 23 Oct 2010 22:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214254 - stable/8/sys/opencrypto X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 22:11:30 -0000 Author: pjd Date: Sat Oct 23 22:11:30 2010 New Revision: 214254 URL: http://svn.freebsd.org/changeset/base/214254 Log: MFC r213065,r213068: r213065: Remove redundant space. r213068: Add support for AES-XTS. Obtained from: OpenBSD Modified: stable/8/sys/opencrypto/cryptodev.c stable/8/sys/opencrypto/cryptodev.h stable/8/sys/opencrypto/cryptosoft.c stable/8/sys/opencrypto/xform.c stable/8/sys/opencrypto/xform.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/opencrypto/cryptodev.c ============================================================================== --- stable/8/sys/opencrypto/cryptodev.c Sat Oct 23 22:04:37 2010 (r214253) +++ stable/8/sys/opencrypto/cryptodev.c Sat Oct 23 22:11:30 2010 (r214254) @@ -419,6 +419,9 @@ cryptof_ioctl( case CRYPTO_AES_CBC: txform = &enc_xform_rijndael128; break; + case CRYPTO_AES_XTS: + txform = &enc_xform_aes_xts; + break; case CRYPTO_NULL_CBC: txform = &enc_xform_null; break; Modified: stable/8/sys/opencrypto/cryptodev.h ============================================================================== --- stable/8/sys/opencrypto/cryptodev.h Sat Oct 23 22:04:37 2010 (r214253) +++ stable/8/sys/opencrypto/cryptodev.h Sat Oct 23 22:11:30 2010 (r214254) @@ -123,7 +123,8 @@ #define CRYPTO_SHA2_384_HMAC 19 #define CRYPTO_SHA2_512_HMAC 20 #define CRYPTO_CAMELLIA_CBC 21 -#define CRYPTO_ALGORITHM_MAX 21 /* Keep updated - see below */ +#define CRYPTO_AES_XTS 22 +#define CRYPTO_ALGORITHM_MAX 22 /* Keep updated - see below */ /* Algorithm flags */ #define CRYPTO_ALG_FLAG_SUPPORTED 0x01 /* Algorithm is supported */ Modified: stable/8/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/8/sys/opencrypto/cryptosoft.c Sat Oct 23 22:04:37 2010 (r214253) +++ stable/8/sys/opencrypto/cryptosoft.c Sat Oct 23 22:11:30 2010 (r214254) @@ -114,8 +114,16 @@ swcr_encdec(struct cryptodesc *crd, stru if (error) return (error); } + ivp = iv; + /* + * xforms that provide a reinit method perform all IV + * handling themselves. + */ + if (exf->reinit) + exf->reinit(sw->sw_kschedule, iv); + if (flags & CRYPTO_F_IMBUF) { struct mbuf *m = (struct mbuf *) buf; @@ -135,7 +143,15 @@ swcr_encdec(struct cryptodesc *crd, stru m_copydata(m, k, blks, blk); /* Actual encryption/decryption */ - if (crd->crd_flags & CRD_F_ENCRYPT) { + if (exf->reinit) { + if (crd->crd_flags & CRD_F_ENCRYPT) { + exf->encrypt(sw->sw_kschedule, + blk); + } else { + exf->decrypt(sw->sw_kschedule, + blk); + } + } else if (crd->crd_flags & CRD_F_ENCRYPT) { /* XOR with previous block */ for (j = 0; j < blks; j++) blk[j] ^= ivp[j]; @@ -205,7 +221,15 @@ swcr_encdec(struct cryptodesc *crd, stru idat = mtod(m, unsigned char *) + k; while (m->m_len >= k + blks && i > 0) { - if (crd->crd_flags & CRD_F_ENCRYPT) { + if (exf->reinit) { + if (crd->crd_flags & CRD_F_ENCRYPT) { + exf->encrypt(sw->sw_kschedule, + idat); + } else { + exf->decrypt(sw->sw_kschedule, + idat); + } + } else if (crd->crd_flags & CRD_F_ENCRYPT) { /* XOR with previous block/IV */ for (j = 0; j < blks; j++) idat[j] ^= ivp[j]; @@ -261,7 +285,15 @@ swcr_encdec(struct cryptodesc *crd, stru cuio_copydata(uio, k, blks, blk); /* Actual encryption/decryption */ - if (crd->crd_flags & CRD_F_ENCRYPT) { + if (exf->reinit) { + if (crd->crd_flags & CRD_F_ENCRYPT) { + exf->encrypt(sw->sw_kschedule, + blk); + } else { + exf->decrypt(sw->sw_kschedule, + blk); + } + } else if (crd->crd_flags & CRD_F_ENCRYPT) { /* XOR with previous block */ for (j = 0; j < blks; j++) blk[j] ^= ivp[j]; @@ -319,7 +351,15 @@ swcr_encdec(struct cryptodesc *crd, stru idat = (char *)iov->iov_base + k; while (iov->iov_len >= k + blks && i > 0) { - if (crd->crd_flags & CRD_F_ENCRYPT) { + if (exf->reinit) { + if (crd->crd_flags & CRD_F_ENCRYPT) { + exf->encrypt(sw->sw_kschedule, + idat); + } else { + exf->decrypt(sw->sw_kschedule, + idat); + } + } else if (crd->crd_flags & CRD_F_ENCRYPT) { /* XOR with previous block/IV */ for (j = 0; j < blks; j++) idat[j] ^= ivp[j]; @@ -360,7 +400,15 @@ swcr_encdec(struct cryptodesc *crd, stru return 0; /* Done with iovec encryption/decryption */ } else { /* contiguous buffer */ - if (crd->crd_flags & CRD_F_ENCRYPT) { + if (exf->reinit) { + for (i = crd->crd_skip; + i < crd->crd_skip + crd->crd_len; i += blks) { + if (crd->crd_flags & CRD_F_ENCRYPT) + exf->encrypt(sw->sw_kschedule, buf + i); + else + exf->decrypt(sw->sw_kschedule, buf + i); + } + } else if (crd->crd_flags & CRD_F_ENCRYPT) { for (i = crd->crd_skip; i < crd->crd_skip + crd->crd_len; i += blks) { /* XOR with the IV/previous block, as appropriate. */ @@ -687,6 +735,9 @@ swcr_newsession(device_t dev, u_int32_t case CRYPTO_RIJNDAEL128_CBC: txf = &enc_xform_rijndael128; goto enccommon; + case CRYPTO_AES_XTS: + txf = &enc_xform_aes_xts; + goto enccommon; case CRYPTO_CAMELLIA_CBC: txf = &enc_xform_camellia; goto enccommon; @@ -845,6 +896,7 @@ swcr_freesession(device_t dev, u_int64_t case CRYPTO_CAST_CBC: case CRYPTO_SKIPJACK_CBC: case CRYPTO_RIJNDAEL128_CBC: + case CRYPTO_AES_XTS: case CRYPTO_CAMELLIA_CBC: case CRYPTO_NULL_CBC: txf = swd->sw_exf; @@ -958,6 +1010,7 @@ swcr_process(device_t dev, struct crypto case CRYPTO_CAST_CBC: case CRYPTO_SKIPJACK_CBC: case CRYPTO_RIJNDAEL128_CBC: + case CRYPTO_AES_XTS: case CRYPTO_CAMELLIA_CBC: if ((crp->crp_etype = swcr_encdec(crd, sw, crp->crp_buf, crp->crp_flags)) != 0) @@ -1050,6 +1103,7 @@ swcr_attach(device_t dev) REGISTER(CRYPTO_MD5); REGISTER(CRYPTO_SHA1); REGISTER(CRYPTO_RIJNDAEL128_CBC); + REGISTER(CRYPTO_AES_XTS); REGISTER(CRYPTO_CAMELLIA_CBC); REGISTER(CRYPTO_DEFLATE_COMP); #undef REGISTER Modified: stable/8/sys/opencrypto/xform.c ============================================================================== --- stable/8/sys/opencrypto/xform.c Sat Oct 23 22:04:37 2010 (r214253) +++ stable/8/sys/opencrypto/xform.c Sat Oct 23 22:11:30 2010 (r214254) @@ -64,40 +64,48 @@ __FBSDID("$FreeBSD$"); #include #include -static void null_encrypt(caddr_t, u_int8_t *); -static void null_decrypt(caddr_t, u_int8_t *); -static int null_setkey(u_int8_t **, u_int8_t *, int); -static void null_zerokey(u_int8_t **); - +static int null_setkey(u_int8_t **, u_int8_t *, int); static int des1_setkey(u_int8_t **, u_int8_t *, int); static int des3_setkey(u_int8_t **, u_int8_t *, int); static int blf_setkey(u_int8_t **, u_int8_t *, int); static int cast5_setkey(u_int8_t **, u_int8_t *, int); static int skipjack_setkey(u_int8_t **, u_int8_t *, int); static int rijndael128_setkey(u_int8_t **, u_int8_t *, int); +static int aes_xts_setkey(u_int8_t **, u_int8_t *, int); static int cml_setkey(u_int8_t **, u_int8_t *, int); + +static void null_encrypt(caddr_t, u_int8_t *); static void des1_encrypt(caddr_t, u_int8_t *); static void des3_encrypt(caddr_t, u_int8_t *); static void blf_encrypt(caddr_t, u_int8_t *); static void cast5_encrypt(caddr_t, u_int8_t *); static void skipjack_encrypt(caddr_t, u_int8_t *); static void rijndael128_encrypt(caddr_t, u_int8_t *); +static void aes_xts_encrypt(caddr_t, u_int8_t *); static void cml_encrypt(caddr_t, u_int8_t *); + +static void null_decrypt(caddr_t, u_int8_t *); static void des1_decrypt(caddr_t, u_int8_t *); static void des3_decrypt(caddr_t, u_int8_t *); static void blf_decrypt(caddr_t, u_int8_t *); static void cast5_decrypt(caddr_t, u_int8_t *); static void skipjack_decrypt(caddr_t, u_int8_t *); static void rijndael128_decrypt(caddr_t, u_int8_t *); +static void aes_xts_decrypt(caddr_t, u_int8_t *); static void cml_decrypt(caddr_t, u_int8_t *); + +static void null_zerokey(u_int8_t **); static void des1_zerokey(u_int8_t **); static void des3_zerokey(u_int8_t **); static void blf_zerokey(u_int8_t **); static void cast5_zerokey(u_int8_t **); static void skipjack_zerokey(u_int8_t **); static void rijndael128_zerokey(u_int8_t **); +static void aes_xts_zerokey(u_int8_t **); static void cml_zerokey(u_int8_t **); +static void aes_xts_reinit(caddr_t, u_int8_t *); + static void null_init(void *); static int null_update(void *, u_int8_t *, u_int16_t); static void null_final(u_int8_t *, void *); @@ -124,6 +132,7 @@ struct enc_xform enc_xform_null = { null_decrypt, null_setkey, null_zerokey, + NULL }; struct enc_xform enc_xform_des = { @@ -133,6 +142,7 @@ struct enc_xform enc_xform_des = { des1_decrypt, des1_setkey, des1_zerokey, + NULL }; struct enc_xform enc_xform_3des = { @@ -141,7 +151,8 @@ struct enc_xform enc_xform_3des = { des3_encrypt, des3_decrypt, des3_setkey, - des3_zerokey + des3_zerokey, + NULL }; struct enc_xform enc_xform_blf = { @@ -150,7 +161,8 @@ struct enc_xform enc_xform_blf = { blf_encrypt, blf_decrypt, blf_setkey, - blf_zerokey + blf_zerokey, + NULL }; struct enc_xform enc_xform_cast5 = { @@ -159,7 +171,8 @@ struct enc_xform enc_xform_cast5 = { cast5_encrypt, cast5_decrypt, cast5_setkey, - cast5_zerokey + cast5_zerokey, + NULL }; struct enc_xform enc_xform_skipjack = { @@ -168,7 +181,8 @@ struct enc_xform enc_xform_skipjack = { skipjack_encrypt, skipjack_decrypt, skipjack_setkey, - skipjack_zerokey + skipjack_zerokey, + NULL }; struct enc_xform enc_xform_rijndael128 = { @@ -178,6 +192,17 @@ struct enc_xform enc_xform_rijndael128 = rijndael128_decrypt, rijndael128_setkey, rijndael128_zerokey, + NULL +}; + +struct enc_xform enc_xform_aes_xts = { + CRYPTO_AES_XTS, "AES-XTS", + RIJNDAEL128_BLOCK_LEN, 32, 64, + aes_xts_encrypt, + aes_xts_decrypt, + aes_xts_setkey, + aes_xts_zerokey, + aes_xts_reinit }; struct enc_xform enc_xform_arc4 = { @@ -187,6 +212,7 @@ struct enc_xform enc_xform_arc4 = { NULL, NULL, NULL, + NULL }; struct enc_xform enc_xform_camellia = { @@ -196,6 +222,7 @@ struct enc_xform enc_xform_camellia = { cml_decrypt, cml_setkey, cml_zerokey, + NULL }; /* Authentication instances */ @@ -226,7 +253,7 @@ struct auth_hash auth_hash_hmac_ripemd_1 }; struct auth_hash auth_hash_key_md5 = { - CRYPTO_MD5_KPDK, "Keyed MD5", + CRYPTO_MD5_KPDK, "Keyed MD5", 0, MD5_KPDK_HASH_LEN, 0, sizeof(MD5_CTX), (void (*)(void *)) MD5Init, MD5Update_int, (void (*)(u_int8_t *, void *)) MD5Final @@ -547,6 +574,107 @@ rijndael128_zerokey(u_int8_t **sched) *sched = NULL; } +#define AES_XTS_BLOCKSIZE 16 +#define AES_XTS_IVSIZE 8 +#define AES_XTS_ALPHA 0x87 /* GF(2^128) generator polynomial */ + +struct aes_xts_ctx { + rijndael_ctx key1; + rijndael_ctx key2; + u_int8_t tweak[AES_XTS_BLOCKSIZE]; +}; + +void +aes_xts_reinit(caddr_t key, u_int8_t *iv) +{ + struct aes_xts_ctx *ctx = (struct aes_xts_ctx *)key; + u_int64_t blocknum; + u_int i; + + /* + * Prepare tweak as E_k2(IV). IV is specified as LE representation + * of a 64-bit block number which we allow to be passed in directly. + */ + bcopy(iv, &blocknum, AES_XTS_IVSIZE); + for (i = 0; i < AES_XTS_IVSIZE; i++) { + ctx->tweak[i] = blocknum & 0xff; + blocknum >>= 8; + } + /* Last 64 bits of IV are always zero */ + bzero(ctx->tweak + AES_XTS_IVSIZE, AES_XTS_IVSIZE); + + rijndael_encrypt(&ctx->key2, ctx->tweak, ctx->tweak); +} + +static void +aes_xts_crypt(struct aes_xts_ctx *ctx, u_int8_t *data, u_int do_encrypt) +{ + u_int8_t block[AES_XTS_BLOCKSIZE]; + u_int i, carry_in, carry_out; + + for (i = 0; i < AES_XTS_BLOCKSIZE; i++) + block[i] = data[i] ^ ctx->tweak[i]; + + if (do_encrypt) + rijndael_encrypt(&ctx->key1, block, data); + else + rijndael_decrypt(&ctx->key1, block, data); + + for (i = 0; i < AES_XTS_BLOCKSIZE; i++) + data[i] ^= ctx->tweak[i]; + + /* Exponentiate tweak */ + carry_in = 0; + for (i = 0; i < AES_XTS_BLOCKSIZE; i++) { + carry_out = ctx->tweak[i] & 0x80; + ctx->tweak[i] = (ctx->tweak[i] << 1) | (carry_in ? 1 : 0); + carry_in = carry_out; + } + if (carry_in) + ctx->tweak[0] ^= AES_XTS_ALPHA; + bzero(block, sizeof(block)); +} + +void +aes_xts_encrypt(caddr_t key, u_int8_t *data) +{ + aes_xts_crypt((struct aes_xts_ctx *)key, data, 1); +} + +void +aes_xts_decrypt(caddr_t key, u_int8_t *data) +{ + aes_xts_crypt((struct aes_xts_ctx *)key, data, 0); +} + +int +aes_xts_setkey(u_int8_t **sched, u_int8_t *key, int len) +{ + struct aes_xts_ctx *ctx; + + if (len != 32 && len != 64) + return EINVAL; + + *sched = malloc(sizeof(struct aes_xts_ctx), M_CRYPTO_DATA, + M_NOWAIT | M_ZERO); + if (*sched == NULL) + return ENOMEM; + ctx = (struct aes_xts_ctx *)*sched; + + rijndael_set_key(&ctx->key1, key, len * 4); + rijndael_set_key(&ctx->key2, key + (len / 2), len * 4); + + return 0; +} + +void +aes_xts_zerokey(u_int8_t **sched) +{ + bzero(*sched, sizeof(struct aes_xts_ctx)); + free(*sched, M_CRYPTO_DATA); + *sched = NULL; +} + static void cml_encrypt(caddr_t key, u_int8_t *blk) { Modified: stable/8/sys/opencrypto/xform.h ============================================================================== --- stable/8/sys/opencrypto/xform.h Sat Oct 23 22:04:37 2010 (r214253) +++ stable/8/sys/opencrypto/xform.h Sat Oct 23 22:11:30 2010 (r214254) @@ -54,6 +54,7 @@ struct enc_xform { void (*decrypt) (caddr_t, u_int8_t *); int (*setkey) (u_int8_t **, u_int8_t *, int len); void (*zerokey) (u_int8_t **); + void (*reinit) (caddr_t, u_int8_t *); }; struct comp_algo { @@ -80,6 +81,7 @@ extern struct enc_xform enc_xform_blf; extern struct enc_xform enc_xform_cast5; extern struct enc_xform enc_xform_skipjack; extern struct enc_xform enc_xform_rijndael128; +extern struct enc_xform enc_xform_aes_xts; extern struct enc_xform enc_xform_arc4; extern struct enc_xform enc_xform_camellia;