From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 09:18:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBB59DD9; Sun, 28 Oct 2012 09:18:13 +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 B1D0D8FC0A; Sun, 28 Oct 2012 09:18:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9S9ID1I072243; Sun, 28 Oct 2012 09:18:13 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9S9IDjk072240; Sun, 28 Oct 2012 09:18:13 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210280918.q9S9IDjk072240@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 28 Oct 2012 09:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242212 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 09:18:13 -0000 Author: edwin Date: Sun Oct 28 09:18:13 2012 New Revision: 242212 URL: http://svn.freebsd.org/changeset/base/242212 Log: Merge of current of tzdata2012h, r242208 - Bahia no longer has DST. - Tocantins has DST. - Israel has new DST rules next year. - Jordan stays on DST this winter. Modified: stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/southamerica Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/asia ============================================================================== --- stable/9/contrib/tzdata/asia Sun Oct 28 09:17:33 2012 (r242211) +++ stable/9/contrib/tzdata/asia Sun Oct 28 09:18:13 2012 (r242212) @@ -1170,15 +1170,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S # # ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps -# From Paul Eggert (2005-02-22): +# From Paul Eggert (2012-10-26): # I used Ephraim Silverberg's dst-israel.el program # (2005-02-20) # along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, -# to generate the transitions in this list. +# to generate the transitions from 2005 through 2012. # (I replaced "lastFri" with "Fri>=26" by hand.) -# The spring transitions below all correspond to the following Rule: +# The spring transitions all correspond to the following Rule: # -# Rule Zion 2005 max - Mar Fri>=26 2:00 1:00 D +# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D # # but older zic implementations (e.g., Solaris 8) do not support # "Fri>=26" to mean April 1 in years like 2005, so for now we list the @@ -1195,39 +1195,36 @@ Rule Zion 2009 only - Sep 27 2:00 0 S Rule Zion 2010 only - Sep 12 2:00 0 S Rule Zion 2011 only - Apr 1 2:00 1:00 D Rule Zion 2011 only - Oct 2 2:00 0 S -Rule Zion 2012 2015 - Mar Fri>=26 2:00 1:00 D +Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D Rule Zion 2012 only - Sep 23 2:00 0 S -Rule Zion 2013 only - Sep 8 2:00 0 S -Rule Zion 2014 only - Sep 28 2:00 0 S -Rule Zion 2015 only - Sep 20 2:00 0 S -Rule Zion 2016 only - Apr 1 2:00 1:00 D -Rule Zion 2016 only - Oct 9 2:00 0 S -Rule Zion 2017 2021 - Mar Fri>=26 2:00 1:00 D -Rule Zion 2017 only - Sep 24 2:00 0 S -Rule Zion 2018 only - Sep 16 2:00 0 S -Rule Zion 2019 only - Oct 6 2:00 0 S -Rule Zion 2020 only - Sep 27 2:00 0 S -Rule Zion 2021 only - Sep 12 2:00 0 S -Rule Zion 2022 only - Apr 1 2:00 1:00 D -Rule Zion 2022 only - Oct 2 2:00 0 S -Rule Zion 2023 2032 - Mar Fri>=26 2:00 1:00 D -Rule Zion 2023 only - Sep 24 2:00 0 S -Rule Zion 2024 only - Oct 6 2:00 0 S -Rule Zion 2025 only - Sep 28 2:00 0 S -Rule Zion 2026 only - Sep 20 2:00 0 S -Rule Zion 2027 only - Oct 10 2:00 0 S -Rule Zion 2028 only - Sep 24 2:00 0 S -Rule Zion 2029 only - Sep 16 2:00 0 S -Rule Zion 2030 only - Oct 6 2:00 0 S -Rule Zion 2031 only - Sep 21 2:00 0 S -Rule Zion 2032 only - Sep 12 2:00 0 S -Rule Zion 2033 only - Apr 1 2:00 1:00 D -Rule Zion 2033 only - Oct 2 2:00 0 S -Rule Zion 2034 2037 - Mar Fri>=26 2:00 1:00 D -Rule Zion 2034 only - Sep 17 2:00 0 S -Rule Zion 2035 only - Oct 7 2:00 0 S -Rule Zion 2036 only - Sep 28 2:00 0 S -Rule Zion 2037 only - Sep 13 2:00 0 S + +# From Ephraim Silverberg (2012-10-18): + +# Yesterday, the Interior Ministry Committee, after more than a year +# past, approved sending the proposed June 2011 changes to the Time +# Decree Law back to the Knesset for second and third (final) votes +# before the upcoming elections on Jan. 22, 2013. Hence, although the +# changes are not yet law, they are expected to be so before Februray 2013. +# +# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March. +# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the +# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day +# later (i.e. at 02:00 the first Monday after October 2). +# [Rosh Hashana holidays are factored in until 2100.] + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D +Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S +Rule Zion 2027 only - Oct Mon>=3 2:00 0 S +Rule Zion 2028 max - Oct Sun>=2 2:00 0 S +# The following rules are commented out for now, as they break older +# versions of zic that support only signed 32-bit timestamps, i.e., +# through 2038-01-19 03:14:07 UTC. +#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S +#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S +#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S +#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S +#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Jerusalem 2:20:56 - LMT 1880 @@ -1362,6 +1359,16 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 3 # From Arthur David Olson (2009-04-06): # We still have Jordan switching to DST on Thursdays in 2000 and 2001. +# From Steffen Thorsen (2012-10-25): +# Yesterday the government in Jordan announced that they will not +# switch back to standard time this winter, so the will stay on DST +# until about the same time next year (at least). +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 +# +# From Paul Eggert (2012-10-25): +# For now, assume this is just a one-year measure. If it becomes +# permanent, we should move Jordan from EET to AST effective tomorrow. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Jordan 1973 only - Jun 6 0:00 1:00 S Rule Jordan 1973 1975 - Oct 1 0:00 0 - @@ -1390,7 +1397,8 @@ Rule Jordan 2002 max - Mar lastThu 24:00 Rule Jordan 2003 only - Oct 24 0:00s 0 - Rule Jordan 2004 only - Oct 15 0:00s 0 - Rule Jordan 2005 only - Sep lastFri 0:00s 0 - -Rule Jordan 2006 max - Oct lastFri 0:00s 0 - +Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - +Rule Jordan 2013 max - Oct lastFri 0:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 2:00 Jordan EE%sT Modified: stable/9/contrib/tzdata/southamerica ============================================================================== --- stable/9/contrib/tzdata/southamerica Sun Oct 28 09:17:33 2012 (r242211) +++ stable/9/contrib/tzdata/southamerica Sun Oct 28 09:18:13 2012 (r242212) @@ -829,6 +829,15 @@ Zone America/La_Paz -4:32:36 - LMT 1890 # http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6 # +# From Kelley Cook (2012-10-16): +# The governor of state of Bahia in Brazil announced on Thursday that +# due to public pressure, he is reversing the DST policy they implemented +# last year and will not be going to Summer Time on October 21st.... +# http://www.correio24horas.com.br/r/artigo/apos-pressoes-wagner-suspende-horario-de-verao-na-bahia + +# From Rodrigo Severo (2012-10-16): +# Tocantins state will have DST. +# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Decree 20,466 (1931-10-01) @@ -1048,7 +1057,8 @@ Zone America/Araguaina -3:12:48 - LMT 19 -3:00 Brazil BR%sT 1990 Sep 17 -3:00 - BRT 1995 Sep 14 -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT + -3:00 - BRT 2012 Oct 21 + -3:00 Brazil BR%sT # # Alagoas (AL), Sergipe (SE) Zone America/Maceio -2:22:52 - LMT 1914 @@ -1067,7 +1077,8 @@ Zone America/Maceio -2:22:52 - LMT 1914 Zone America/Bahia -2:34:04 - LMT 1914 -3:00 Brazil BR%sT 2003 Sep 24 -3:00 - BRT 2011 Oct 16 - -3:00 Brazil BR%sT + -3:00 Brazil BR%sT 2012 Oct 21 + -3:00 - BRT # # Goias (GO), Distrito Federal (DF), Minas Gerais (MG), # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR), From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 10:18:47 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C1B7743; Sun, 28 Oct 2012 10:18:47 +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 5CB5F8FC08; Sun, 28 Oct 2012 10:18:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SAIl2Z083099; Sun, 28 Oct 2012 10:18:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SAIlRZ083093; Sun, 28 Oct 2012 10:18:47 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210281018.q9SAIlRZ083093@svn.freebsd.org> From: Xin LI Date: Sun, 28 Oct 2012 10:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242214 - in stable/9: share/man/man4 sys/dev/hptiop X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 10:18:47 -0000 Author: delphij Date: Sun Oct 28 10:18:46 2012 New Revision: 242214 URL: http://svn.freebsd.org/changeset/base/242214 Log: MFC r242086: Update hptiop(4) to version 1.8, which added support for HighPoint RocketRAID 4500 series. Many thanks to HighPoint Technologies for their continued support of FreeBSD! Submitted by: HighPoint Technologies Modified: stable/9/share/man/man4/hptiop.4 stable/9/sys/dev/hptiop/hptiop.c stable/9/sys/dev/hptiop/hptiop.h Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/hptiop.4 ============================================================================== --- stable/9/share/man/man4/hptiop.4 Sun Oct 28 10:11:47 2012 (r242213) +++ stable/9/share/man/man4/hptiop.4 Sun Oct 28 10:18:46 2012 (r242214) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 5, 2012 +.Dd October 25, 2012 .Dt HPTIOP 4 .Os .Sh NAME @@ -58,6 +58,10 @@ driver supports the following SAS and SA .Pp .Bl -bullet -compact .It +HighPoint RocketRAID 4522 +.It +HighPoint RocketRAID 4520 +.It HighPoint RocketRAID 4322 .It HighPoint RocketRAID 4321 Modified: stable/9/sys/dev/hptiop/hptiop.c ============================================================================== --- stable/9/sys/dev/hptiop/hptiop.c Sun Oct 28 10:11:47 2012 (r242213) +++ stable/9/sys/dev/hptiop/hptiop.c Sun Oct 28 10:18:46 2012 (r242214) @@ -1,6 +1,6 @@ /* * HighPoint RR3xxx/4xxx RAID Driver for FreeBSD - * Copyright (C) 2007-2008 HighPoint Technologies, Inc. All Rights Reserved. + * Copyright (C) 2007-2012 HighPoint Technologies, Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -89,8 +89,8 @@ __FBSDID("$FreeBSD$"); #include -static char driver_name[] = "hptiop"; -static char driver_version[] = "v1.3 (010208)"; +static const char driver_name[] = "hptiop"; +static const char driver_version[] = "v1.8"; static devclass_t hptiop_devclass; @@ -99,41 +99,62 @@ static int hptiop_send_sync_msg(struct h static void hptiop_request_callback_itl(struct hpt_iop_hba *hba, u_int32_t req); static void hptiop_request_callback_mv(struct hpt_iop_hba *hba, u_int64_t req); +static void hptiop_request_callback_mvfrey(struct hpt_iop_hba *hba, + u_int32_t req); static void hptiop_os_message_callback(struct hpt_iop_hba *hba, u_int32_t msg); static int hptiop_do_ioctl_itl(struct hpt_iop_hba *hba, struct hpt_iop_ioctl_param *pParams); static int hptiop_do_ioctl_mv(struct hpt_iop_hba *hba, struct hpt_iop_ioctl_param *pParams); +static int hptiop_do_ioctl_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_ioctl_param *pParams); static int hptiop_rescan_bus(struct hpt_iop_hba *hba); static int hptiop_alloc_pci_res_itl(struct hpt_iop_hba *hba); static int hptiop_alloc_pci_res_mv(struct hpt_iop_hba *hba); +static int hptiop_alloc_pci_res_mvfrey(struct hpt_iop_hba *hba); static int hptiop_get_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_get_config *config); static int hptiop_get_config_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_get_config *config); +static int hptiop_get_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_get_config *config); static int hptiop_set_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config); static int hptiop_set_config_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config); +static int hptiop_set_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_set_config *config); static int hptiop_internal_memalloc_mv(struct hpt_iop_hba *hba); +static int hptiop_internal_memalloc_mvfrey(struct hpt_iop_hba *hba); +static int hptiop_internal_memfree_itl(struct hpt_iop_hba *hba); static int hptiop_internal_memfree_mv(struct hpt_iop_hba *hba); +static int hptiop_internal_memfree_mvfrey(struct hpt_iop_hba *hba); static int hptiop_post_ioctl_command_itl(struct hpt_iop_hba *hba, u_int32_t req32, struct hpt_iop_ioctl_param *pParams); static int hptiop_post_ioctl_command_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_ioctl_command *req, struct hpt_iop_ioctl_param *pParams); +static int hptiop_post_ioctl_command_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_ioctl_command *req, + struct hpt_iop_ioctl_param *pParams); static void hptiop_post_req_itl(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb, bus_dma_segment_t *segs, int nsegs); static void hptiop_post_req_mv(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb, bus_dma_segment_t *segs, int nsegs); +static void hptiop_post_req_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_srb *srb, + bus_dma_segment_t *segs, int nsegs); static void hptiop_post_msg_itl(struct hpt_iop_hba *hba, u_int32_t msg); static void hptiop_post_msg_mv(struct hpt_iop_hba *hba, u_int32_t msg); +static void hptiop_post_msg_mvfrey(struct hpt_iop_hba *hba, u_int32_t msg); static void hptiop_enable_intr_itl(struct hpt_iop_hba *hba); static void hptiop_enable_intr_mv(struct hpt_iop_hba *hba); +static void hptiop_enable_intr_mvfrey(struct hpt_iop_hba *hba); static void hptiop_disable_intr_itl(struct hpt_iop_hba *hba); static void hptiop_disable_intr_mv(struct hpt_iop_hba *hba); +static void hptiop_disable_intr_mvfrey(struct hpt_iop_hba *hba); static void hptiop_free_srb(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb); static int hptiop_os_query_remove_device(struct hpt_iop_hba *hba, int tid); static int hptiop_probe(device_t dev); @@ -146,8 +167,7 @@ static void hptiop_async(void *callback_ struct cam_path *path, void *arg); static void hptiop_pci_intr(void *arg); static void hptiop_release_resource(struct hpt_iop_hba *hba); -static int hptiop_reset_adapter(struct hpt_iop_hba *hba); - +static void hptiop_reset_adapter(void *argv); static d_open_t hptiop_open; static d_close_t hptiop_close; static d_ioctl_t hptiop_ioctl; @@ -193,6 +213,11 @@ static struct cdevsw hptiop_cdevsw = { #define BUS_SPACE_RD4_MV2(offset) bus_space_read_4(hba->bar2t,\ hba->bar2h, offsetof(struct hpt_iopmu_mv, offset)) +#define BUS_SPACE_WRT4_MVFREY2(offset, value) bus_space_write_4(hba->bar2t,\ + hba->bar2h, offsetof(struct hpt_iopmu_mvfrey, offset), value) +#define BUS_SPACE_RD4_MVFREY2(offset) bus_space_read_4(hba->bar2t,\ + hba->bar2h, offsetof(struct hpt_iopmu_mvfrey, offset)) + static int hptiop_open(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t proc) { @@ -294,6 +319,12 @@ static void hptiop_post_msg_mv(struct hp BUS_SPACE_RD4_MV0(outbound_intmask); } +static void hptiop_post_msg_mvfrey(struct hpt_iop_hba *hba, u_int32_t msg) +{ + BUS_SPACE_WRT4_MVFREY2(f0_to_cpu_msg_a, msg); + BUS_SPACE_RD4_MVFREY2(f0_to_cpu_msg_a); +} + static int hptiop_wait_ready_itl(struct hpt_iop_hba * hba, u_int32_t millisec) { u_int32_t req=0; @@ -323,6 +354,15 @@ static int hptiop_wait_ready_mv(struct h return 0; } +static int hptiop_wait_ready_mvfrey(struct hpt_iop_hba * hba, + u_int32_t millisec) +{ + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_NOP, millisec)) + return -1; + + return 0; +} + static void hptiop_request_callback_itl(struct hpt_iop_hba * hba, u_int32_t index) { @@ -618,6 +658,111 @@ scsi_done: } } +static void hptiop_request_callback_mvfrey(struct hpt_iop_hba * hba, + u_int32_t _tag) +{ + u_int32_t req_type = _tag & 0xf; + + struct hpt_iop_srb *srb; + struct hpt_iop_request_scsi_command *req; + union ccb *ccb; + u_int8_t *cdb; + + switch (req_type) { + case IOP_REQUEST_TYPE_GET_CONFIG: + case IOP_REQUEST_TYPE_SET_CONFIG: + hba->config_done = 1; + break; + + case IOP_REQUEST_TYPE_SCSI_COMMAND: + srb = hba->srb[(_tag >> 4) & 0xff]; + req = (struct hpt_iop_request_scsi_command *)srb; + + ccb = (union ccb *)srb->ccb; + + untimeout(hptiop_reset_adapter, hba, ccb->ccb_h.timeout_ch); + + if (ccb->ccb_h.flags & CAM_CDB_POINTER) + cdb = ccb->csio.cdb_io.cdb_ptr; + else + cdb = ccb->csio.cdb_io.cdb_bytes; + + if (cdb[0] == SYNCHRONIZE_CACHE) { /* ??? */ + ccb->ccb_h.status = CAM_REQ_CMP; + goto scsi_done; + } + + if (_tag & MVFREYIOPMU_QUEUE_REQUEST_RESULT_BIT) + req->header.result = IOP_RESULT_SUCCESS; + + switch (req->header.result) { + case IOP_RESULT_SUCCESS: + switch (ccb->ccb_h.flags & CAM_DIR_MASK) { + case CAM_DIR_IN: + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(hba->io_dmat, srb->dma_map); + break; + case CAM_DIR_OUT: + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(hba->io_dmat, srb->dma_map); + break; + } + ccb->ccb_h.status = CAM_REQ_CMP; + break; + case IOP_RESULT_BAD_TARGET: + ccb->ccb_h.status = CAM_DEV_NOT_THERE; + break; + case IOP_RESULT_BUSY: + ccb->ccb_h.status = CAM_BUSY; + break; + case IOP_RESULT_INVALID_REQUEST: + ccb->ccb_h.status = CAM_REQ_INVALID; + break; + case IOP_RESULT_FAIL: + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + break; + case IOP_RESULT_RESET: + ccb->ccb_h.status = CAM_BUSY; + break; + case IOP_RESULT_CHECK_CONDITION: + memset(&ccb->csio.sense_data, 0, + sizeof(ccb->csio.sense_data)); + if (req->dataxfer_length < ccb->csio.sense_len) + ccb->csio.sense_resid = ccb->csio.sense_len - + req->dataxfer_length; + else + ccb->csio.sense_resid = 0; + memcpy(&ccb->csio.sense_data, &req->sg_list, + MIN(req->dataxfer_length, sizeof(ccb->csio.sense_data))); + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + ccb->ccb_h.status |= CAM_AUTOSNS_VALID; + ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; + break; + default: + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + break; + } +scsi_done: + ccb->csio.resid = ccb->csio.dxfer_len - req->dataxfer_length; + + hptiop_free_srb(hba, srb); + xpt_done(ccb); + break; + case IOP_REQUEST_TYPE_IOCTL_COMMAND: + if (_tag & MVFREYIOPMU_QUEUE_REQUEST_RESULT_BIT) + hba->config_done = 1; + else + hba->config_done = -1; + wakeup((struct hpt_iop_request_ioctl_command *)hba->ctlcfg_ptr); + break; + default: + device_printf(hba->pcidev, "wrong callback type\n"); + break; + } +} + static void hptiop_drain_outbound_queue_mv(struct hpt_iop_hba * hba) { u_int64_t req; @@ -656,6 +801,50 @@ static int hptiop_intr_mv(struct hpt_iop return ret; } +static int hptiop_intr_mvfrey(struct hpt_iop_hba * hba) +{ + u_int32_t status, _tag, cptr; + int ret = 0; + + if (hba->initialized) { + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0); + } + + status = BUS_SPACE_RD4_MVFREY2(f0_doorbell); + if (status) { + BUS_SPACE_WRT4_MVFREY2(f0_doorbell, status); + if (status & CPU_TO_F0_DRBL_MSG_A_BIT) { + u_int32_t msg = BUS_SPACE_RD4_MVFREY2(cpu_to_f0_msg_a); + hptiop_os_message_callback(hba, msg); + } + ret = 1; + } + + status = BUS_SPACE_RD4_MVFREY2(isr_cause); + if (status) { + BUS_SPACE_WRT4_MVFREY2(isr_cause, status); + do { + cptr = *hba->u.mvfrey.outlist_cptr & 0xff; + while (hba->u.mvfrey.outlist_rptr != cptr) { + hba->u.mvfrey.outlist_rptr++; + if (hba->u.mvfrey.outlist_rptr == hba->u.mvfrey.list_count) { + hba->u.mvfrey.outlist_rptr = 0; + } + + _tag = hba->u.mvfrey.outlist[hba->u.mvfrey.outlist_rptr].val; + hptiop_request_callback_mvfrey(hba, _tag); + ret = 2; + } + } while (cptr != (*hba->u.mvfrey.outlist_cptr & 0xff)); + } + + if (hba->initialized) { + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0x1010); + } + + return ret; +} + static int hptiop_send_sync_request_itl(struct hpt_iop_hba * hba, u_int32_t req32, u_int32_t millisec) { @@ -702,6 +891,48 @@ static int hptiop_send_sync_request_mv(s return -1; } +static int hptiop_send_sync_request_mvfrey(struct hpt_iop_hba *hba, + void *req, u_int32_t millisec) +{ + u_int32_t i, index; + u_int64_t phy_addr; + struct hpt_iop_request_header *reqhdr = + (struct hpt_iop_request_header *)req; + + hba->config_done = 0; + + phy_addr = hba->ctlcfgcmd_phy; + reqhdr->flags = IOP_REQUEST_FLAG_SYNC_REQUEST + | IOP_REQUEST_FLAG_OUTPUT_CONTEXT + | IOP_REQUEST_FLAG_ADDR_BITS + | ((phy_addr >> 16) & 0xffff0000); + reqhdr->context = ((phy_addr & 0xffffffff) << 32 ) + | IOPMU_QUEUE_ADDR_HOST_BIT | reqhdr->type; + + hba->u.mvfrey.inlist_wptr++; + index = hba->u.mvfrey.inlist_wptr & 0x3fff; + + if (index == hba->u.mvfrey.list_count) { + index = 0; + hba->u.mvfrey.inlist_wptr &= ~0x3fff; + hba->u.mvfrey.inlist_wptr ^= CL_POINTER_TOGGLE; + } + + hba->u.mvfrey.inlist[index].addr = phy_addr; + hba->u.mvfrey.inlist[index].intrfc_len = (reqhdr->size + 3) / 4; + + BUS_SPACE_WRT4_MVFREY2(inbound_write_ptr, hba->u.mvfrey.inlist_wptr); + BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); + + for (i = 0; i < millisec; i++) { + hptiop_intr_mvfrey(hba); + if (hba->config_done) + return 0; + DELAY(1000); + } + return -1; +} + static int hptiop_send_sync_msg(struct hpt_iop_hba *hba, u_int32_t msg, u_int32_t millisec) { @@ -776,6 +1007,37 @@ static int hptiop_get_config_mv(struct h return 0; } +static int hptiop_get_config_mvfrey(struct hpt_iop_hba * hba, + struct hpt_iop_request_get_config * config) +{ + struct hpt_iop_request_get_config *info = hba->u.mvfrey.config; + + if (info->header.size != sizeof(struct hpt_iop_request_get_config) || + info->header.type != IOP_REQUEST_TYPE_GET_CONFIG) { + KdPrint(("hptiop: header size %x/%x type %x/%x", + info->header.size, (int)sizeof(struct hpt_iop_request_get_config), + info->header.type, IOP_REQUEST_TYPE_GET_CONFIG)); + return -1; + } + + config->interface_version = info->interface_version; + config->firmware_version = info->firmware_version; + config->max_requests = info->max_requests; + config->request_size = info->request_size; + config->max_sg_count = info->max_sg_count; + config->data_transfer_length = info->data_transfer_length; + config->alignment_mask = info->alignment_mask; + config->max_devices = info->max_devices; + config->sdram_size = info->sdram_size; + + KdPrint(("hptiop: maxreq %x reqsz %x datalen %x maxdev %x sdram %x", + config->max_requests, config->request_size, + config->data_transfer_length, config->max_devices, + config->sdram_size)); + + return 0; +} + static int hptiop_set_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config) { @@ -833,6 +1095,31 @@ static int hptiop_set_config_mv(struct h return 0; } +static int hptiop_set_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_set_config *config) +{ + struct hpt_iop_request_set_config *req; + + if (!(req = hba->ctlcfg_ptr)) + return -1; + + memcpy((u_int8_t *)req + sizeof(struct hpt_iop_request_header), + (u_int8_t *)config + sizeof(struct hpt_iop_request_header), + sizeof(struct hpt_iop_request_set_config) - + sizeof(struct hpt_iop_request_header)); + + req->header.type = IOP_REQUEST_TYPE_SET_CONFIG; + req->header.size = sizeof(struct hpt_iop_request_set_config); + req->header.result = IOP_RESULT_PENDING; + + if (hptiop_send_sync_request_mvfrey(hba, req, 20000)) { + KdPrint(("hptiop: set config send cmd failed")); + return -1; + } + + return 0; +} + static int hptiop_post_ioctl_command_itl(struct hpt_iop_hba *hba, u_int32_t req32, struct hpt_iop_ioctl_param *pParams) @@ -884,7 +1171,8 @@ static int hptiop_post_ioctl_command_itl return 0; } -static int hptiop_bus_space_copyin(struct hpt_iop_hba *hba, u_int32_t bus, void *user, int size) +static int hptiop_bus_space_copyin(struct hpt_iop_hba *hba, u_int32_t bus, + void *user, int size) { unsigned char byte; int i; @@ -898,7 +1186,8 @@ static int hptiop_bus_space_copyin(struc return 0; } -static int hptiop_bus_space_copyout(struct hpt_iop_hba *hba, u_int32_t bus, void *user, int size) +static int hptiop_bus_space_copyout(struct hpt_iop_hba *hba, u_int32_t bus, + void *user, int size) { unsigned char byte; int i; @@ -1045,6 +1334,103 @@ invalid: } } +static int hptiop_post_ioctl_command_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_ioctl_command *req, + struct hpt_iop_ioctl_param *pParams) +{ + u_int64_t phy_addr; + u_int32_t index; + + phy_addr = hba->ctlcfgcmd_phy; + + if ((((pParams->nInBufferSize + 3) & ~3) + pParams->nOutBufferSize) > + (hba->max_request_size - + offsetof(struct hpt_iop_request_ioctl_command, buf))) { + device_printf(hba->pcidev, "request size beyond max value"); + return -1; + } + + req->ioctl_code = HPT_CTL_CODE_BSD_TO_IOP(pParams->dwIoControlCode); + req->inbuf_size = pParams->nInBufferSize; + req->outbuf_size = pParams->nOutBufferSize; + req->header.size = offsetof(struct hpt_iop_request_ioctl_command, buf) + + pParams->nInBufferSize; + + req->header.type = IOP_REQUEST_TYPE_IOCTL_COMMAND; + req->header.result = IOP_RESULT_PENDING; + + req->header.flags = IOP_REQUEST_FLAG_SYNC_REQUEST + | IOP_REQUEST_FLAG_OUTPUT_CONTEXT + | IOP_REQUEST_FLAG_ADDR_BITS + | ((phy_addr >> 16) & 0xffff0000); + req->header.context = ((phy_addr & 0xffffffff) << 32 ) + | IOPMU_QUEUE_ADDR_HOST_BIT | req->header.type; + + hba->u.mvfrey.inlist_wptr++; + index = hba->u.mvfrey.inlist_wptr & 0x3fff; + + if (index == hba->u.mvfrey.list_count) { + index = 0; + hba->u.mvfrey.inlist_wptr &= ~0x3fff; + hba->u.mvfrey.inlist_wptr ^= CL_POINTER_TOGGLE; + } + + hba->u.mvfrey.inlist[index].addr = phy_addr; + hba->u.mvfrey.inlist[index].intrfc_len = (req->header.size + 3) / 4; + + BUS_SPACE_WRT4_MVFREY2(inbound_write_ptr, hba->u.mvfrey.inlist_wptr); + BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); + + while (hba->config_done == 0) { + if (hptiop_sleep(hba, req, PPAUSE, + "hptctl", HPT_OSM_TIMEOUT)==0) + continue; + hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000); + } + return 0; +} + +static int hptiop_do_ioctl_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_ioctl_param *pParams) +{ + struct hpt_iop_request_ioctl_command *req; + + if ((pParams->Magic != HPT_IOCTL_MAGIC) && + (pParams->Magic != HPT_IOCTL_MAGIC32)) + return EFAULT; + + req = (struct hpt_iop_request_ioctl_command *)(hba->ctlcfg_ptr); + hba->config_done = 0; + hptiop_lock_adapter(hba); + if (pParams->nInBufferSize) + if (copyin((void *)pParams->lpInBuffer, + req->buf, pParams->nInBufferSize)) + goto invalid; + if (hptiop_post_ioctl_command_mvfrey(hba, req, pParams)) + goto invalid; + + if (hba->config_done == 1) { + if (pParams->nOutBufferSize) + if (copyout(req->buf + + ((pParams->nInBufferSize + 3) & ~3), + (void *)pParams->lpOutBuffer, + pParams->nOutBufferSize)) + goto invalid; + + if (pParams->lpBytesReturned) + if (copyout(&req->bytes_returned, + (void*)pParams->lpBytesReturned, + sizeof(u_int32_t))) + goto invalid; + hptiop_unlock_adapter(hba); + return 0; + } else{ +invalid: + hptiop_unlock_adapter(hba); + return EFAULT; + } +} + static int hptiop_rescan_bus(struct hpt_iop_hba * hba) { union ccb *ccb; @@ -1063,6 +1449,7 @@ static int hptiop_rescan_bus(struct hpt static bus_dmamap_callback_t hptiop_map_srb; static bus_dmamap_callback_t hptiop_post_scsi_command; static bus_dmamap_callback_t hptiop_mv_map_ctlcfg; +static bus_dmamap_callback_t hptiop_mvfrey_map_ctlcfg; static int hptiop_alloc_pci_res_itl(struct hpt_iop_hba *hba) { @@ -1139,6 +1526,56 @@ static int hptiop_alloc_pci_res_mv(struc return 0; } +static int hptiop_alloc_pci_res_mvfrey(struct hpt_iop_hba *hba) +{ + hba->bar0_rid = 0x10; + hba->bar0_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_MEMORY, &hba->bar0_rid, RF_ACTIVE); + + if (hba->bar0_res == NULL) { + device_printf(hba->pcidev, "failed to get iop bar0.\n"); + return -1; + } + hba->bar0t = rman_get_bustag(hba->bar0_res); + hba->bar0h = rman_get_bushandle(hba->bar0_res); + hba->u.mvfrey.config = (struct hpt_iop_request_get_config *) + rman_get_virtual(hba->bar0_res); + + if (!hba->u.mvfrey.config) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + device_printf(hba->pcidev, "alloc bar0 mem res failed\n"); + return -1; + } + + hba->bar2_rid = 0x18; + hba->bar2_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_MEMORY, &hba->bar2_rid, RF_ACTIVE); + + if (hba->bar2_res == NULL) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + device_printf(hba->pcidev, "failed to get iop bar2.\n"); + return -1; + } + + hba->bar2t = rman_get_bustag(hba->bar2_res); + hba->bar2h = rman_get_bushandle(hba->bar2_res); + hba->u.mvfrey.mu = + (struct hpt_iopmu_mvfrey *)rman_get_virtual(hba->bar2_res); + + if (!hba->u.mvfrey.mu) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar2_rid, hba->bar2_res); + device_printf(hba->pcidev, "alloc mem bar2 res failed\n"); + return -1; + } + + return 0; +} + static void hptiop_release_pci_res_itl(struct hpt_iop_hba *hba) { if (hba->bar0_res) @@ -1156,6 +1593,16 @@ static void hptiop_release_pci_res_mv(st hba->bar2_rid, hba->bar2_res); } +static void hptiop_release_pci_res_mvfrey(struct hpt_iop_hba *hba) +{ + if (hba->bar0_res) + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + if (hba->bar2_res) + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar2_rid, hba->bar2_res); +} + static int hptiop_internal_memalloc_mv(struct hpt_iop_hba *hba) { if (bus_dma_tag_create(hba->parent_dmat, @@ -1172,7 +1619,7 @@ static int hptiop_internal_memalloc_mv(s NULL, NULL, #endif - &hba->ctlcfg_dmat)) { + &hba->ctlcfg_dmat)) { device_printf(hba->pcidev, "alloc ctlcfg_dmat failed\n"); return -1; } @@ -1205,6 +1652,72 @@ static int hptiop_internal_memalloc_mv(s return 0; } +static int hptiop_internal_memalloc_mvfrey(struct hpt_iop_hba *hba) +{ + u_int32_t list_count = BUS_SPACE_RD4_MVFREY2(inbound_conf_ctl); + + list_count >>= 16; + + if (list_count == 0) { + return -1; + } + + hba->u.mvfrey.list_count = list_count; + hba->u.mvfrey.internal_mem_size = 0x800 + + list_count * sizeof(struct mvfrey_inlist_entry) + + list_count * sizeof(struct mvfrey_outlist_entry) + + sizeof(int); + if (bus_dma_tag_create(hba->parent_dmat, + 1, + 0, + BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR, + NULL, NULL, + hba->u.mvfrey.internal_mem_size, + 1, + BUS_SPACE_MAXSIZE_32BIT, + BUS_DMA_ALLOCNOW, +#if __FreeBSD_version > 502000 + NULL, + NULL, +#endif + &hba->ctlcfg_dmat)) { + device_printf(hba->pcidev, "alloc ctlcfg_dmat failed\n"); + return -1; + } + + if (bus_dmamem_alloc(hba->ctlcfg_dmat, (void **)&hba->ctlcfg_ptr, +#if __FreeBSD_version>501000 + BUS_DMA_WAITOK | BUS_DMA_COHERENT, +#else + BUS_DMA_WAITOK, +#endif + &hba->ctlcfg_dmamap) != 0) { + device_printf(hba->pcidev, + "bus_dmamem_alloc failed!\n"); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + return -1; + } + + if (bus_dmamap_load(hba->ctlcfg_dmat, + hba->ctlcfg_dmamap, hba->ctlcfg_ptr, + hba->u.mvfrey.internal_mem_size, + hptiop_mvfrey_map_ctlcfg, hba, 0)) { + device_printf(hba->pcidev, "bus_dmamap_load failed!\n"); + if (hba->ctlcfg_dmat) + bus_dmamem_free(hba->ctlcfg_dmat, + hba->ctlcfg_ptr, hba->ctlcfg_dmamap); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + return -1; + } + + return 0; +} + +static int hptiop_internal_memfree_itl(struct hpt_iop_hba *hba) { + return 0; +} + static int hptiop_internal_memfree_mv(struct hpt_iop_hba *hba) { if (hba->ctlcfg_dmat) { @@ -1217,6 +1730,54 @@ static int hptiop_internal_memfree_mv(st return 0; } +static int hptiop_internal_memfree_mvfrey(struct hpt_iop_hba *hba) +{ + if (hba->ctlcfg_dmat) { + bus_dmamap_unload(hba->ctlcfg_dmat, hba->ctlcfg_dmamap); + bus_dmamem_free(hba->ctlcfg_dmat, + hba->ctlcfg_ptr, hba->ctlcfg_dmamap); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + } + + return 0; +} + +static int hptiop_reset_comm_mvfrey(struct hpt_iop_hba *hba) +{ + u_int32_t i = 100; + + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET_COMM, 3000)) + return -1; + + /* wait 100ms for MCU ready */ + while(i--) { + DELAY(1000); + } + + BUS_SPACE_WRT4_MVFREY2(inbound_base, + hba->u.mvfrey.inlist_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(inbound_base_high, + (hba->u.mvfrey.inlist_phy >> 16) >> 16); + + BUS_SPACE_WRT4_MVFREY2(outbound_base, + hba->u.mvfrey.outlist_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(outbound_base_high, + (hba->u.mvfrey.outlist_phy >> 16) >> 16); + + BUS_SPACE_WRT4_MVFREY2(outbound_shadow_base, + hba->u.mvfrey.outlist_cptr_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(outbound_shadow_base_high, + (hba->u.mvfrey.outlist_cptr_phy >> 16) >> 16); + + hba->u.mvfrey.inlist_wptr = (hba->u.mvfrey.list_count - 1) + | CL_POINTER_TOGGLE; + *hba->u.mvfrey.outlist_cptr = (hba->u.mvfrey.list_count - 1) + | CL_POINTER_TOGGLE; + hba->u.mvfrey.outlist_rptr = hba->u.mvfrey.list_count - 1; + + return 0; +} + /* * CAM driver interface */ @@ -1230,9 +1791,10 @@ static device_method_t driver_methods[] }; static struct hptiop_adapter_ops hptiop_itl_ops = { + .family = INTEL_BASED_IOP, .iop_wait_ready = hptiop_wait_ready_itl, .internal_memalloc = 0, - .internal_memfree = 0, + .internal_memfree = hptiop_internal_memfree_itl, .alloc_pci_res = hptiop_alloc_pci_res_itl, .release_pci_res = hptiop_release_pci_res_itl, .enable_intr = hptiop_enable_intr_itl, @@ -1243,9 +1805,11 @@ static struct hptiop_adapter_ops hptiop_ .post_msg = hptiop_post_msg_itl, .post_req = hptiop_post_req_itl, .do_ioctl = hptiop_do_ioctl_itl, + .reset_comm = 0, }; static struct hptiop_adapter_ops hptiop_mv_ops = { + .family = MV_BASED_IOP, .iop_wait_ready = hptiop_wait_ready_mv, .internal_memalloc = hptiop_internal_memalloc_mv, .internal_memfree = hptiop_internal_memfree_mv, @@ -1259,6 +1823,25 @@ static struct hptiop_adapter_ops hptiop_ .post_msg = hptiop_post_msg_mv, .post_req = hptiop_post_req_mv, .do_ioctl = hptiop_do_ioctl_mv, + .reset_comm = 0, +}; + +static struct hptiop_adapter_ops hptiop_mvfrey_ops = { + .family = MVFREY_BASED_IOP, + .iop_wait_ready = hptiop_wait_ready_mvfrey, + .internal_memalloc = hptiop_internal_memalloc_mvfrey, + .internal_memfree = hptiop_internal_memfree_mvfrey, + .alloc_pci_res = hptiop_alloc_pci_res_mvfrey, + .release_pci_res = hptiop_release_pci_res_mvfrey, + .enable_intr = hptiop_enable_intr_mvfrey, + .disable_intr = hptiop_disable_intr_mvfrey, + .get_config = hptiop_get_config_mvfrey, + .set_config = hptiop_set_config_mvfrey, + .iop_intr = hptiop_intr_mvfrey, + .post_msg = hptiop_post_msg_mvfrey, + .post_req = hptiop_post_req_mvfrey, + .do_ioctl = hptiop_do_ioctl_mvfrey, + .reset_comm = hptiop_reset_comm_mvfrey, }; static driver_t hptiop_pci_driver = { @@ -1284,6 +1867,11 @@ static int hptiop_probe(device_t dev) id = pci_get_device(dev); switch (id) { + case 0x4520: + case 0x4522: + sas = 1; + ops = &hptiop_mvfrey_ops; + break; case 0x4210: case 0x4211: case 0x4310: @@ -1385,7 +1973,7 @@ static int hptiop_attach(device_t dev) goto release_pci_res; } - if (hba->ops->internal_memalloc) { + if (hba->ops->family == MV_BASED_IOP) { if (hba->ops->internal_memalloc(hba)) { device_printf(dev, "alloc srb_dmat failed\n"); goto destroy_parent_tag; @@ -1404,6 +1992,17 @@ static int hptiop_attach(device_t dev) hba->max_request_size = iop_config.request_size; hba->max_sg_count = iop_config.max_sg_count; + if (hba->ops->family == MVFREY_BASED_IOP) { + if (hba->ops->internal_memalloc(hba)) { + device_printf(dev, "alloc srb_dmat failed\n"); + goto destroy_parent_tag; + } + if (hba->ops->reset_comm(hba)) { + device_printf(dev, "reset comm failed\n"); + goto get_config_failed; + } + } + if (bus_dma_tag_create(hba->parent_dmat,/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ @@ -1542,6 +2141,7 @@ static int hptiop_attach(device_t dev) } hba->ops->enable_intr(hba); + hba->initialized = 1; hba->ioctl_dev = make_dev(&hptiop_cdevsw, unit, UID_ROOT, GID_WHEEL /*GID_OPERATOR*/, @@ -1587,8 +2187,7 @@ destroy_io_dmat: bus_dma_tag_destroy(hba->io_dmat); get_config_failed: - if (hba->ops->internal_memfree) - hba->ops->internal_memfree(hba); + hba->ops->internal_memfree(hba); destroy_parent_tag: if (hba->parent_dmat) @@ -1682,6 +2281,18 @@ static void hptiop_enable_intr_mv(struct BUS_SPACE_WRT4_MV0(outbound_intmask,int_mask); } +static void hptiop_enable_intr_mvfrey(struct hpt_iop_hba *hba) +{ + BUS_SPACE_WRT4_MVFREY2(f0_doorbell_enable, CPU_TO_F0_DRBL_MSG_A_BIT); + BUS_SPACE_RD4_MVFREY2(f0_doorbell_enable); + + BUS_SPACE_WRT4_MVFREY2(isr_enable, 0x1); + BUS_SPACE_RD4_MVFREY2(isr_enable); + + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0x1010); + BUS_SPACE_RD4_MVFREY2(pcie_f0_int_enable); +} + static void hptiop_disable_intr_itl(struct hpt_iop_hba *hba) { u_int32_t int_mask; @@ -1704,9 +2315,24 @@ static void hptiop_disable_intr_mv(struc BUS_SPACE_RD4_MV0(outbound_intmask); } -static int hptiop_reset_adapter(struct hpt_iop_hba * hba) +static void hptiop_disable_intr_mvfrey(struct hpt_iop_hba *hba) +{ + BUS_SPACE_WRT4_MVFREY2(f0_doorbell_enable, 0); + BUS_SPACE_RD4_MVFREY2(f0_doorbell_enable); + + BUS_SPACE_WRT4_MVFREY2(isr_enable, 0); + BUS_SPACE_RD4_MVFREY2(isr_enable); + + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0); + BUS_SPACE_RD4_MVFREY2(pcie_f0_int_enable); +} + +static void hptiop_reset_adapter(void *argv) { - return hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000); + struct hpt_iop_hba * hba = (struct hpt_iop_hba *)argv; + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000)) + return; + hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_START_BACKGROUND_TASK, 5000); } static void *hptiop_get_srb(struct hpt_iop_hba * hba) @@ -1910,7 +2536,8 @@ static void hptiop_post_req_itl(struct h bcopy(cdb, req.cdb, ccb->csio.cdb_len); - req.header.size = offsetof(struct hpt_iop_request_scsi_command, sg_list) + req.header.size = + offsetof(struct hpt_iop_request_scsi_command, sg_list) + nsegs*sizeof(struct hpt_iopsg); req.header.type = IOP_REQUEST_TYPE_SCSI_COMMAND; req.header.flags = 0; @@ -1956,7 +2583,8 @@ static void hptiop_post_req_itl(struct h req->channel = 0; req->target = ccb->ccb_h.target_id; req->lun = ccb->ccb_h.target_lun; - req->header.size = offsetof(struct hpt_iop_request_scsi_command, sg_list) + req->header.size = + offsetof(struct hpt_iop_request_scsi_command, sg_list) + nsegs*sizeof(struct hpt_iopsg); req->header.context = (u_int64_t)srb->index | IOPMU_QUEUE_ADDR_HOST_BIT; @@ -2044,6 +2672,78 @@ static void hptiop_post_req_mv(struct hp | (size > 3 ? 3 : size), hba); } +static void hptiop_post_req_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_srb *srb, + bus_dma_segment_t *segs, int nsegs) +{ + int idx, index; + union ccb *ccb = srb->ccb; + u_int8_t *cdb; + struct hpt_iop_request_scsi_command *req; + u_int64_t req_phy; + + req = (struct hpt_iop_request_scsi_command *)srb; + req_phy = srb->phy_addr; + + if (ccb->csio.dxfer_len && nsegs > 0) { + struct hpt_iopsg *psg = req->sg_list; + for (idx = 0; idx < nsegs; idx++, psg++) { + psg->pci_address = (u_int64_t)segs[idx].ds_addr | 1; + psg->size = segs[idx].ds_len; + psg->eot = 0; + } + psg[-1].eot = 1; + } + if (ccb->ccb_h.flags & CAM_CDB_POINTER) + cdb = ccb->csio.cdb_io.cdb_ptr; + else + cdb = ccb->csio.cdb_io.cdb_bytes; + + bcopy(cdb, req->cdb, ccb->csio.cdb_len); + req->header.type = IOP_REQUEST_TYPE_SCSI_COMMAND; + req->header.result = IOP_RESULT_PENDING; + req->dataxfer_length = ccb->csio.dxfer_len; + req->channel = 0; + req->target = ccb->ccb_h.target_id; + req->lun = ccb->ccb_h.target_lun; + req->header.size = sizeof(struct hpt_iop_request_scsi_command) + - sizeof(struct hpt_iopsg) + + nsegs * sizeof(struct hpt_iopsg); + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_PREREAD); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 12:23:58 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A8FC25F; Sun, 28 Oct 2012 12:23:58 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 539A78FC16; Sun, 28 Oct 2012 12:23:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SCNwpJ005078; Sun, 28 Oct 2012 12:23:58 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SCNwIF005076; Sun, 28 Oct 2012 12:23:58 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210281223.q9SCNwIF005076@svn.freebsd.org> From: Rick Macklem Date: Sun, 28 Oct 2012 12:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242220 - stable/9/sys/rpc/rpcsec_gss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 12:23:58 -0000 Author: rmacklem Date: Sun Oct 28 12:23:57 2012 New Revision: 242220 URL: http://svn.freebsd.org/changeset/base/242220 Log: MFC: r242090 Modify the comment to take out the names and URL. Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Sun Oct 28 12:12:45 2012 (r242219) +++ stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Sun Oct 28 12:23:57 2012 (r242220) @@ -1025,12 +1025,9 @@ svc_rpc_gss_validate(struct svc_rpc_gss_ rpc_gss_log_status("gss_verify_mic", client->cl_mech, maj_stat, min_stat); /* - * Attila Bogar and Herbert Poeckl reported similar problems - * w.r.t. a Linux NFS client doing a krb5 NFS mount against the - * FreeBSD server. We determined this was a Linux bug: - * http://www.spinics.net/lists/linux-nfs/msg32466.html, where - * the mount failed to work because a Destroy operation with a - * bogus encrypted checksum destroyed the authenticator handle. + * A bug in some versions of the Linux client generates a + * Destroy operation with a bogus encrypted checksum. Deleting + * the credential handle for that case causes the mount to fail. * Since the checksum is bogus (gss_verify_mic() failed), it * doesn't make sense to destroy the handle and not doing so * fixes the Linux mount. From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 15:37:33 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D900E21; Sun, 28 Oct 2012 15:37:33 +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 E8F1B8FC08; Sun, 28 Oct 2012 15:37:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFbWdf039632; Sun, 28 Oct 2012 15:37:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFbWvQ039630; Sun, 28 Oct 2012 15:37:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281537.q9SFbWvQ039630@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242224 - stable/9/sys/boot/i386/zfsboot X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:37:33 -0000 Author: avg Date: Sun Oct 28 15:37:32 2012 New Revision: 242224 URL: http://svn.freebsd.org/changeset/base/242224 Log: MFC r241288: zfsboot: use the same zfs dataset naming format as loader Modified: stable/9/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/9/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 14:37:17 2012 (r242223) +++ stable/9/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 15:37:32 2012 (r242224) @@ -553,7 +553,7 @@ main(void) if (parse()) autoboot = 0; if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmddup); + printf("%s: %s\n", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; } @@ -577,13 +577,17 @@ main(void) if (!autoboot || !OPT_CHECK(RBX_QUIET)) { printf("\nFreeBSD/x86 boot\n"); if (zfs_rlookup(spa, zfsmount.rootobj, rootname) != 0) - printf("Default: %s:<0x%llx>:%s\n" + printf("Default: %s/<0x%llx>:%s\n" "boot: ", spa->spa_name, zfsmount.rootobj, kname); - else - printf("Default: %s:%s:%s\n" + else if (rootname[0] != '\0') + printf("Default: %s/%s:%s\n" "boot: ", spa->spa_name, rootname, kname); + else + printf("Default: %s:%s\n" + "boot: ", + spa->spa_name, kname); } if (ioctrl & IO_SERIAL) sio_flush(); @@ -708,12 +712,46 @@ load(void) } static int +zfs_mount_ds(char *dsname) +{ + uint64_t newroot; + spa_t *newspa; + char *q; + + q = strchr(dsname, '/'); + if (q) + *q++ = '\0'; + newspa = spa_find_by_name(dsname); + if (newspa == NULL) { + printf("\nCan't find ZFS pool %s\n", dsname); + return -1; + } + + if (zfs_spa_init(newspa)) + return -1; + + newroot = 0; + if (q) { + if (zfs_lookup_dataset(newspa, q, &newroot)) { + printf("\nCan't find dataset %s in ZFS pool %s\n", + q, newspa->spa_name); + return -1; + } + } + if (zfs_mount(newspa, newroot, &zfsmount)) { + printf("\nCan't mount ZFS dataset\n"); + return -1; + } + spa = newspa; + return (0); +} + +static int parse(void) { char *arg = cmd; char *ep, *p, *q; const char *cp; - //unsigned int drv; int c, i, j; while ((c = *arg++)) { @@ -773,37 +811,20 @@ parse(void) } /* + * If there is "zfs:" prefix simply ignore it. + */ + if (strncmp(arg, "zfs:", 4) == 0) + arg += 4; + + /* * If there is a colon, switch pools. */ - q = (char *) strchr(arg, ':'); + q = strchr(arg, ':'); if (q) { - spa_t *newspa; - uint64_t newroot; - - *q++ = 0; - newspa = spa_find_by_name(arg); - if (newspa) { - arg = q; - spa = newspa; - newroot = 0; - q = (char *) strchr(arg, ':'); - if (q) { - *q++ = 0; - if (zfs_lookup_dataset(spa, arg, &newroot)) { - printf("\nCan't find dataset %s in ZFS pool %s\n", - arg, spa->spa_name); - return -1; - } - arg = q; - } - if (zfs_mount(spa, newroot, &zfsmount)) { - printf("\nCan't mount ZFS dataset\n"); - return -1; - } - } else { - printf("\nCan't find ZFS pool %s\n", arg); + *q++ = '\0'; + if (zfs_mount_ds(arg) != 0) return -1; - } + arg = q; } if ((i = ep - arg)) { if ((size_t)i >= sizeof(kname)) From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 15:41:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D988B2B0; Sun, 28 Oct 2012 15:41:14 +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 BA06E8FC08; Sun, 28 Oct 2012 15:41:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFfEpw040457; Sun, 28 Oct 2012 15:41:14 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFfEb1040455; Sun, 28 Oct 2012 15:41:14 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281541.q9SFfEb1040455@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242226 - stable/9/sys/geom/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:41:15 -0000 Author: avg Date: Sun Oct 28 15:41:14 2012 New Revision: 242226 URL: http://svn.freebsd.org/changeset/base/242226 Log: MFC r241296: g_part_taste: directly destroy consumer and geom here, no need for withering Modified: stable/9/sys/geom/part/g_part.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Sun Oct 28 15:37:47 2012 (r242225) +++ stable/9/sys/geom/part/g_part.c Sun Oct 28 15:41:14 2012 (r242226) @@ -1875,7 +1875,10 @@ g_part_taste(struct g_class *mp, struct if (error == 0) error = g_access(cp, 1, 0, 0); if (error != 0) { - g_part_wither(gp, error); + if (cp->provider) + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_geom(gp); return (NULL); } @@ -1935,7 +1938,9 @@ g_part_taste(struct g_class *mp, struct g_topology_lock(); root_mount_rel(rht); g_access(cp, -1, 0, 0); - g_part_wither(gp, error); + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_geom(gp); return (NULL); } From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 15:45:19 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0963B595; Sun, 28 Oct 2012 15:45:19 +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 E4EAB8FC08; Sun, 28 Oct 2012 15:45:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFjId8041396; Sun, 28 Oct 2012 15:45:18 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFjIui041392; Sun, 28 Oct 2012 15:45:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281545.q9SFjIui041392@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242229 - stable/9/sys/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:45:19 -0000 Author: avg Date: Sun Oct 28 15:45:18 2012 New Revision: 242229 URL: http://svn.freebsd.org/changeset/base/242229 Log: MFC r241283: zfs boot: add code for listing child datasets of a given dataset Modified: stable/9/sys/boot/zfs/libzfs.h stable/9/sys/boot/zfs/zfs.c stable/9/sys/boot/zfs/zfsimpl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/libzfs.h ============================================================================== --- stable/9/sys/boot/zfs/libzfs.h Sun Oct 28 15:45:15 2012 (r242228) +++ stable/9/sys/boot/zfs/libzfs.h Sun Oct 28 15:45:18 2012 (r242229) @@ -59,6 +59,7 @@ int zfs_parsedev(struct zfs_devdesc *dev const char **path); char *zfs_fmtdev(void *vdev); int zfs_probe_dev(const char *devname, uint64_t *pool_guid); +int zfs_list(const char *name); extern struct devsw zfs_dev; extern struct fs_ops zfs_fsops; Modified: stable/9/sys/boot/zfs/zfs.c ============================================================================== --- stable/9/sys/boot/zfs/zfs.c Sun Oct 28 15:45:15 2012 (r242228) +++ stable/9/sys/boot/zfs/zfs.c Sun Oct 28 15:45:18 2012 (r242229) @@ -574,3 +574,38 @@ zfs_fmtdev(void *vdev) rootname); return (buf); } + +int +zfs_list(const char *name) +{ + static char poolname[ZFS_MAXNAMELEN]; + uint64_t objid; + spa_t *spa; + const char *dsname; + int len; + int rv; + + len = strlen(name); + dsname = strchr(name, '/'); + if (dsname != NULL) { + len = dsname - name; + dsname++; + } + memcpy(poolname, name, len); + poolname[len] = '\0'; + + spa = spa_find_by_name(poolname); + if (!spa) + return (ENXIO); + rv = zfs_spa_init(spa); + if (rv != 0) + return (rv); + if (dsname != NULL) + rv = zfs_lookup_dataset(spa, dsname, &objid); + else + rv = zfs_get_root(spa, &objid); + if (rv != 0) + return (rv); + rv = zfs_list_dataset(spa, objid); + return (0); +} Modified: stable/9/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/9/sys/boot/zfs/zfsimpl.c Sun Oct 28 15:45:15 2012 (r242228) +++ stable/9/sys/boot/zfs/zfsimpl.c Sun Oct 28 15:45:18 2012 (r242229) @@ -1332,8 +1332,6 @@ zap_lookup(const spa_t *spa, const dnode return (EIO); } -#ifdef BOOT2 - /* * List a microzap directory. Assumes that the zap scratch buffer contains * the directory contents. @@ -1458,8 +1456,6 @@ zap_list(const spa_t *spa, const dnode_p return fzap_list(spa, dnode); } -#endif - static int objset_get_dnode(const spa_t *spa, const objset_phys_t *os, uint64_t objnum, dnode_phys_t *dnode) { @@ -1696,6 +1692,38 @@ zfs_lookup_dataset(const spa_t *spa, con return (0); } +#ifndef BOOT2 +static int +zfs_list_dataset(const spa_t *spa, uint64_t objnum/*, int pos, char *entry*/) +{ + uint64_t dir_obj, child_dir_zapobj; + dnode_phys_t child_dir_zap, dir, dataset; + dsl_dataset_phys_t *ds; + dsl_dir_phys_t *dd; + + if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { + printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); + return (EIO); + } + ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; + dir_obj = ds->ds_dir_obj; + + if (objset_get_dnode(spa, &spa->spa_mos, dir_obj, &dir)) { + printf("ZFS: can't find dirobj %ju\n", (uintmax_t)dir_obj); + return (EIO); + } + dd = (dsl_dir_phys_t *)&dir.dn_bonus; + + child_dir_zapobj = dd->dd_child_dir_zapobj; + if (objset_get_dnode(spa, &spa->spa_mos, child_dir_zapobj, &child_dir_zap) != 0) { + printf("ZFS: can't find child zap %ju\n", (uintmax_t)dir_obj); + return (EIO); + } + + return (zap_list(spa, &child_dir_zap) != 0); +} +#endif + /* * Find the object set given the object number of its dataset object * and return its details in *objset From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 15:47:57 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8699C900; Sun, 28 Oct 2012 15:47:57 +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 6574A8FC17; Sun, 28 Oct 2012 15:47:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFlvnG041972; Sun, 28 Oct 2012 15:47:57 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFlvBi041969; Sun, 28 Oct 2012 15:47:57 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281547.q9SFlvBi041969@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242230 - stable/9/sys/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:47:57 -0000 Author: avg Date: Sun Oct 28 15:47:56 2012 New Revision: 242230 URL: http://svn.freebsd.org/changeset/base/242230 Log: MFC r241289: boot/zfs: call zfs_spa_init for all found pools Modified: stable/9/sys/boot/zfs/zfs.c stable/9/sys/boot/zfs/zfsimpl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/zfs.c ============================================================================== --- stable/9/sys/boot/zfs/zfs.c Sun Oct 28 15:45:18 2012 (r242229) +++ stable/9/sys/boot/zfs/zfs.c Sun Oct 28 15:47:56 2012 (r242230) @@ -369,10 +369,28 @@ vdev_read(vdev_t *vdev, void *priv, off_ static int zfs_dev_init(void) { + spa_t *spa; + spa_t *next; + spa_t *prev; + zfs_init(); if (archsw.arch_zfs_probe == NULL) return (ENXIO); archsw.arch_zfs_probe(); + + prev = NULL; + spa = STAILQ_FIRST(&zfs_pools); + while (spa != NULL) { + next = STAILQ_NEXT(spa, spa_link); + if (zfs_spa_init(spa)) { + if (prev == NULL) + STAILQ_REMOVE_HEAD(&zfs_pools, spa_link); + else + STAILQ_REMOVE_AFTER(&zfs_pools, prev, spa_link); + } else + prev = spa; + spa = next; + } return (0); } @@ -435,9 +453,6 @@ zfs_dev_open(struct open_file *f, ...) spa = spa_find_by_guid(dev->pool_guid); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); mount = malloc(sizeof(*mount)); rv = zfs_mount(spa, dev->root_guid, mount); if (rv != 0) { @@ -517,9 +532,6 @@ zfs_parsedev(struct zfs_devdesc *dev, co spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); dev->pool_guid = spa->spa_guid; if (rootname[0] != '\0') { rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); @@ -554,10 +566,6 @@ zfs_fmtdev(void *vdev) printf("ZFS: can't find pool by guid\n"); return (buf); } - if (zfs_spa_init(spa) != 0) { - printf("ZFS: can't init pool\n"); - return (buf); - } if (dev->root_guid == 0 && zfs_get_root(spa, &dev->root_guid)) { printf("ZFS: can't find root filesystem\n"); return (buf); @@ -597,9 +605,6 @@ zfs_list(const char *name) spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); if (dsname != NULL) rv = zfs_lookup_dataset(spa, dsname, &objid); else Modified: stable/9/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/9/sys/boot/zfs/zfsimpl.c Sun Oct 28 15:45:18 2012 (r242229) +++ stable/9/sys/boot/zfs/zfsimpl.c Sun Oct 28 15:47:56 2012 (r242230) @@ -1826,13 +1826,14 @@ static int zfs_spa_init(spa_t *spa) { - if (spa->spa_inited) - return (0); if (zio_read(spa, &spa->spa_uberblock.ub_rootbp, &spa->spa_mos)) { printf("ZFS: can't read MOS of pool %s\n", spa->spa_name); return (EIO); } - spa->spa_inited = 1; + if (spa->spa_mos.os_type != DMU_OST_META) { + printf("ZFS: corrupted MOS of pool %s\n", spa->spa_name); + return (EIO); + } return (0); } From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 15:51:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FB9EBEC; Sun, 28 Oct 2012 15:51:01 +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 362058FC17; Sun, 28 Oct 2012 15:51:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFp1fh042719; Sun, 28 Oct 2012 15:51:01 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFp0Rb042716; Sun, 28 Oct 2012 15:51:00 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281551.q9SFp0Rb042716@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242232 - stable/9/sys/boot/i386/loader X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:51:01 -0000 Author: avg Date: Sun Oct 28 15:51:00 2012 New Revision: 242232 URL: http://svn.freebsd.org/changeset/base/242232 Log: MFC r241284: zfs boot: add lszfs command to i386 loader Modified: stable/9/sys/boot/i386/loader/main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/i386/loader/main.c ============================================================================== --- stable/9/sys/boot/i386/loader/main.c Sun Oct 28 15:48:15 2012 (r242231) +++ stable/9/sys/boot/i386/loader/main.c Sun Oct 28 15:51:00 2012 (r242232) @@ -322,6 +322,29 @@ command_heap(int argc, char *argv[]) return(CMD_OK); } +#ifdef LOADER_ZFS_SUPPORT +COMMAND_SET(lszfs, "lszfs", "list child datasets of a zfs dataset", + command_lszfs); + +static int +command_lszfs(int argc, char *argv[]) +{ + int err; + + if (argc != 2) { + command_errmsg = "wrong number of arguments"; + return (CMD_ERROR); + } + + err = zfs_list(argv[1]); + if (err != 0) { + command_errmsg = strerror(err); + return (CMD_ERROR); + } + return (CMD_OK); +} +#endif + /* ISA bus access functions for PnP. */ static int isa_inb(int port) From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 15:54:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8C1BEFC; Sun, 28 Oct 2012 15:54:01 +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 BC7D68FC08; Sun, 28 Oct 2012 15:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFs1Cr043337; Sun, 28 Oct 2012 15:54:01 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFs11p043335; Sun, 28 Oct 2012 15:54:01 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281554.q9SFs11p043335@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242234 - stable/9/sys/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:54:02 -0000 Author: avg Date: Sun Oct 28 15:54:01 2012 New Revision: 242234 URL: http://svn.freebsd.org/changeset/base/242234 Log: MFC r241292: zfs loader: treat plain pool name as a name of its root dataset Modified: stable/9/sys/boot/zfs/zfs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/zfs.c ============================================================================== --- stable/9/sys/boot/zfs/zfs.c Sun Oct 28 15:51:15 2012 (r242233) +++ stable/9/sys/boot/zfs/zfs.c Sun Oct 28 15:54:01 2012 (r242234) @@ -533,12 +533,9 @@ zfs_parsedev(struct zfs_devdesc *dev, co if (!spa) return (ENXIO); dev->pool_guid = spa->spa_guid; - if (rootname[0] != '\0') { - rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); - if (rv != 0) - return (rv); - } else - dev->root_guid = 0; + rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); + if (rv != 0) + return (rv); if (path != NULL) *path = (*end == '\0') ? end : end + 1; dev->d_dev = &zfs_dev; @@ -558,9 +555,10 @@ zfs_fmtdev(void *vdev) if (dev->d_type != DEVT_ZFS) return (buf); - if (dev->pool_guid == 0) + if (dev->pool_guid == 0) { spa = STAILQ_FIRST(&zfs_pools); - else + dev->pool_guid = spa->spa_guid; + } else spa = spa_find_by_guid(dev->pool_guid); if (spa == NULL) { printf("ZFS: can't find pool by guid\n"); @@ -598,19 +596,17 @@ zfs_list(const char *name) if (dsname != NULL) { len = dsname - name; dsname++; - } + } else + dsname = ""; memcpy(poolname, name, len); poolname[len] = '\0'; spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - if (dsname != NULL) - rv = zfs_lookup_dataset(spa, dsname, &objid); - else - rv = zfs_get_root(spa, &objid); + rv = zfs_lookup_dataset(spa, dsname, &objid); if (rv != 0) return (rv); rv = zfs_list_dataset(spa, objid); - return (0); + return (rv); } From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 15:56:37 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58240249; Sun, 28 Oct 2012 15:56:37 +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 3F4B38FC0A; Sun, 28 Oct 2012 15:56:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFubLd043871; Sun, 28 Oct 2012 15:56:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFubEq043869; Sun, 28 Oct 2012 15:56:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281556.q9SFubEq043869@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242236 - stable/9/sys/dev/acpi_support X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:56:37 -0000 Author: avg Date: Sun Oct 28 15:56:36 2012 New Revision: 242236 URL: http://svn.freebsd.org/changeset/base/242236 Log: MFC r241537: acpi_wmi: move wmi_info_list into sc Modified: stable/9/sys/dev/acpi_support/acpi_wmi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpi_support/acpi_wmi.c ============================================================================== --- stable/9/sys/dev/acpi_support/acpi_wmi.c Sun Oct 28 15:54:15 2012 (r242235) +++ stable/9/sys/dev/acpi_support/acpi_wmi.c Sun Oct 28 15:56:36 2012 (r242236) @@ -74,6 +74,7 @@ struct acpi_wmi_softc { struct sbuf wmistat_sbuf; /* sbuf for /dev/wmistat output */ pid_t wmistat_open_pid; /* pid operating on /dev/wmistat */ int wmistat_bufptr; /* /dev/wmistat ptr to buffer position */ + TAILQ_HEAD(wmi_info_list_head, wmi_info) wmi_info_list; }; /* @@ -105,8 +106,6 @@ struct wmi_info { void *event_handler_user_data; /* ev handler cookie */ }; -TAILQ_HEAD(wmi_info_list_head, wmi_info) - wmi_info_list = TAILQ_HEAD_INITIALIZER(wmi_info_list); ACPI_SERIAL_DECL(acpi_wmi, "ACPI-WMI Mapping"); @@ -144,13 +143,13 @@ static ACPI_STATUS acpi_wmi_ec_handler(U UINT64 *value, void *context, void *region_context); /* helpers */ -static ACPI_STATUS acpi_wmi_read_wdg_blocks(ACPI_HANDLE h); +static ACPI_STATUS acpi_wmi_read_wdg_blocks(struct acpi_wmi_softc *sc, ACPI_HANDLE h); static ACPI_STATUS acpi_wmi_toggle_we_event_generation(device_t dev, struct wmi_info *winfo, enum event_generation_state state); static int acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, UINT8 *guid); -static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string( +static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string(struct acpi_wmi_softc *sc, const char *guid_string); static d_open_t acpi_wmi_wmistat_open; @@ -238,7 +237,7 @@ acpi_wmi_attach(device_t dev) ACPI_SERIAL_BEGIN(acpi_wmi); sc->wmi_dev = dev; sc->wmi_handle = acpi_get_handle(dev); - TAILQ_INIT(&wmi_info_list); + TAILQ_INIT(&sc->wmi_info_list); /* XXX Only works with one EC, but nearly all systems only have one. */ if ((sc->ec_dev = devclass_get_device(devclass_find("acpi_ec"), 0)) == NULL) @@ -254,7 +253,7 @@ acpi_wmi_attach(device_t dev) AcpiFormatException(status)); AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); - } else if (ACPI_FAILURE((status = acpi_wmi_read_wdg_blocks( + } else if (ACPI_FAILURE((status = acpi_wmi_read_wdg_blocks(sc, sc->wmi_handle)))) { device_printf(sc->wmi_dev, "couldn't parse _WDG - %s\n", AcpiFormatException(status)); @@ -305,11 +304,11 @@ acpi_wmi_detach(device_t dev) acpi_wmi_notify_handler); AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); - TAILQ_FOREACH_SAFE(winfo, &wmi_info_list, wmi_list, tmp) { + TAILQ_FOREACH_SAFE(winfo, &sc->wmi_info_list, wmi_list, tmp) { if (winfo->event_handler) acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); - TAILQ_REMOVE(&wmi_info_list, winfo, wmi_list); + TAILQ_REMOVE(&sc->wmi_info_list, winfo, wmi_list); free(winfo, M_ACPIWMI); } if (sc->wmistat_bufptr != -1) { @@ -334,12 +333,14 @@ acpi_wmi_detach(device_t dev) static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string) { + struct acpi_wmi_softc *sc; struct wmi_info *winfo; int ret; + sc = device_get_softc(dev); ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_BEGIN(acpi_wmi); - winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string); + winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string); ret = (winfo == NULL)?0:winfo->ginfo.max_instance+1; ACPI_SERIAL_END(acpi_wmi); @@ -365,7 +366,7 @@ acpi_wmi_evaluate_call_method(device_t d sc = device_get_softc(dev); ACPI_SERIAL_BEGIN(acpi_wmi); - if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) == NULL) status = AE_NOT_FOUND; else if (!(winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) @@ -407,6 +408,7 @@ static ACPI_STATUS acpi_wmi_install_event_handler_method(device_t dev, const char *guid_string, ACPI_NOTIFY_HANDLER event_handler, void *data) { + struct acpi_wmi_softc *sc = device_get_softc(dev); struct wmi_info *winfo; ACPI_STATUS status; @@ -416,7 +418,7 @@ acpi_wmi_install_event_handler_method(de ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || event_handler == NULL) status = AE_BAD_PARAMETER; - else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) == NULL) status = AE_NOT_EXIST; else if (winfo->event_handler != NULL || @@ -438,6 +440,7 @@ acpi_wmi_install_event_handler_method(de static ACPI_STATUS acpi_wmi_remove_event_handler_method(device_t dev, const char *guid_string) { + struct acpi_wmi_softc *sc = device_get_softc(dev); struct wmi_info *winfo; ACPI_STATUS status; @@ -446,7 +449,7 @@ acpi_wmi_remove_event_handler_method(dev status = AE_OK; ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string && - (winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + (winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) != NULL && winfo->event_handler) { status = acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); @@ -481,7 +484,7 @@ acpi_wmi_get_event_data_method(device_t params[0].Integer.Value = event_id; input.Pointer = params; input.Count = 1; - TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + TAILQ_FOREACH(winfo, &sc->wmi_info_list, wmi_list) { if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && ((UINT8) winfo->ginfo.oid[0] == event_id)) { status = AcpiEvaluateObject(sc->wmi_handle, "_WED", @@ -525,7 +528,7 @@ acpi_wmi_get_block_method(device_t dev, ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || out == NULL) status = AE_BAD_PARAMETER; - else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) == NULL) status = AE_ERROR; else if (instance > winfo->ginfo.max_instance) @@ -589,7 +592,7 @@ acpi_wmi_set_block_method(device_t dev, ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || in == NULL) status = AE_BAD_DATA; - else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) == NULL) status = AE_ERROR; else if (instance > winfo->ginfo.max_instance) @@ -623,6 +626,7 @@ acpi_wmi_set_block_method(device_t dev, static void acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) { + struct acpi_wmi_softc *sc = context; ACPI_NOTIFY_HANDLER handler; void *handler_data; struct wmi_info *winfo; @@ -632,7 +636,7 @@ acpi_wmi_notify_handler(ACPI_HANDLE h, U handler = NULL; handler_data = NULL; ACPI_SERIAL_BEGIN(acpi_wmi); - TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + TAILQ_FOREACH(winfo, &sc->wmi_info_list, wmi_list) { if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && ((UINT8) winfo->ginfo.oid[0] == notify)) { if (winfo->event_handler) { @@ -705,7 +709,7 @@ acpi_wmi_ec_handler(UINT32 function, ACP * into wmi_info_list. */ static ACPI_STATUS -acpi_wmi_read_wdg_blocks(ACPI_HANDLE h) +acpi_wmi_read_wdg_blocks(struct acpi_wmi_softc *sc, ACPI_HANDLE h) { ACPI_BUFFER out = {ACPI_ALLOCATE_BUFFER, NULL}; struct guid_info *ginfo; @@ -736,7 +740,7 @@ acpi_wmi_read_wdg_blocks(ACPI_HANDLE h) return (AE_NO_MEMORY); } winfo->ginfo = ginfo[i]; - TAILQ_INSERT_TAIL(&wmi_info_list, winfo, wmi_list); + TAILQ_INSERT_TAIL(&sc->wmi_info_list, winfo, wmi_list); } AcpiOsFree(out.Pointer); free(ginfo, M_ACPIWMI); @@ -846,7 +850,7 @@ acpi_wmi_guid_string_to_guid(const UINT8 * Return NULL if the GUID is unknown in the _WDG */ static struct wmi_info* -acpi_wmi_lookup_wmi_info_by_guid_string(const char *guid_string) +acpi_wmi_lookup_wmi_info_by_guid_string(struct acpi_wmi_softc *sc, const char *guid_string) { char guid[16]; struct wmi_info *winfo; @@ -856,7 +860,7 @@ acpi_wmi_lookup_wmi_info_by_guid_string( ACPI_SERIAL_ASSERT(acpi_wmi); if (!acpi_wmi_guid_string_to_guid(guid_string, guid)) { - TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + TAILQ_FOREACH(winfo, &sc->wmi_info_list, wmi_list) { if (!memcmp(winfo->ginfo.guid, guid, 16)) { return (winfo); } @@ -955,7 +959,7 @@ acpi_wmi_wmistat_read(struct cdev *dev, sbuf_printf(&sc->wmistat_sbuf, "GUID " " INST EXPE METH STR " "EVENT OID\n"); - TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + TAILQ_FOREACH(winfo, &sc->wmi_info_list, wmi_list) { guid = (UINT8*)winfo->ginfo.guid; sbuf_printf(&sc->wmistat_sbuf, "{%02X%02X%02X%02X-%02X%02X-" From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 15:59:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38C64516; Sun, 28 Oct 2012 15:59:18 +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 1ED848FC0A; Sun, 28 Oct 2012 15:59:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFxHY2044426; Sun, 28 Oct 2012 15:59:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFxHxS044424; Sun, 28 Oct 2012 15:59:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281559.q9SFxHxS044424@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242238 - stable/9/sbin/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:59:18 -0000 Author: avg Date: Sun Oct 28 15:59:17 2012 New Revision: 242238 URL: http://svn.freebsd.org/changeset/base/242238 Log: MFC r241772: document acpi_cpu devd notification about _CST change Modified: stable/9/sbin/devd/devd.conf.5 Directory Properties: stable/9/sbin/devd/ (props changed) Modified: stable/9/sbin/devd/devd.conf.5 ============================================================================== --- stable/9/sbin/devd/devd.conf.5 Sun Oct 28 15:56:53 2012 (r242237) +++ stable/9/sbin/devd/devd.conf.5 Sun Oct 28 15:59:17 2012 (r242238) @@ -319,6 +319,8 @@ Button state ($notify=0x00 is power, 0x0 Battery events. .It Li Lid Lid state ($notify=0x00 is closed, 0x01 is open). +.It Li PROCESSOR +Processor state/configuration ($notify=0x81 is a change in available Cx states). .It Li Thermal Thermal zone events. .El From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 16:06:55 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA06992B; Sun, 28 Oct 2012 16:06:55 +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 A7B5E8FC08; Sun, 28 Oct 2012 16:06:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SG6tLl046081; Sun, 28 Oct 2012 16:06:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SG6tmC046079; Sun, 28 Oct 2012 16:06:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281606.q9SG6tmC046079@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 16:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242240 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 16:06:56 -0000 Author: avg Date: Sun Oct 28 16:06:55 2012 New Revision: 242240 URL: http://svn.freebsd.org/changeset/base/242240 Log: MFC r241628: zfs: make use of getnewvnode_reserve in zfs_mknode and zfs_zget Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sun Oct 28 15:59:30 2012 (r242239) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sun Oct 28 16:06:55 2012 (r242240) @@ -855,6 +855,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, d } } + getnewvnode_reserve(1); ZFS_OBJ_HOLD_ENTER(zfsvfs, obj); VERIFY(0 == sa_buf_hold(zfsvfs->z_os, obj, NULL, &db)); @@ -1041,6 +1042,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, d KASSERT(err == 0, ("insmntque() failed: error %d", err)); } ZFS_OBJ_HOLD_EXIT(zfsvfs, obj); + getnewvnode_drop_reserve(); } /* @@ -1151,12 +1153,14 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_ *zpp = NULL; + getnewvnode_reserve(1); again: ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num); err = sa_buf_hold(zfsvfs->z_os, obj_num, NULL, &db); if (err) { ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + getnewvnode_drop_reserve(); return (err); } @@ -1167,6 +1171,7 @@ again: doi.doi_bonus_size < sizeof (znode_phys_t)))) { sa_buf_rele(db, NULL); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + getnewvnode_drop_reserve(); return (EINVAL); } @@ -1230,6 +1235,7 @@ again: sa_buf_rele(db, NULL); mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + getnewvnode_drop_reserve(); return (err); } @@ -1265,6 +1271,7 @@ again: } } ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + getnewvnode_drop_reserve(); return (err); } From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 16:10:03 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3002B97; Sun, 28 Oct 2012 16:10:03 +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 CA5388FC08; Sun, 28 Oct 2012 16:10:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SGA3w4046770; Sun, 28 Oct 2012 16:10:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SGA3Om046764; Sun, 28 Oct 2012 16:10:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281610.q9SGA3Om046764@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 16:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242241 - in stable/9/sys/boot: i386/loader i386/zfsboot zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 16:10:04 -0000 Author: avg Date: Sun Oct 28 16:10:03 2012 New Revision: 242241 URL: http://svn.freebsd.org/changeset/base/242241 Log: MFC r241293: zfs boot: export boot/primary pool and vdev guid all the way to kenv Modified: stable/9/sys/boot/i386/loader/main.c stable/9/sys/boot/i386/zfsboot/zfsboot.c stable/9/sys/boot/zfs/libzfs.h stable/9/sys/boot/zfs/zfsimpl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/i386/loader/main.c ============================================================================== --- stable/9/sys/boot/i386/loader/main.c Sun Oct 28 16:06:55 2012 (r242240) +++ stable/9/sys/boot/i386/loader/main.c Sun Oct 28 16:10:03 2012 (r242241) @@ -209,6 +209,7 @@ extract_currdev(void) { struct i386_devdesc new_currdev; #ifdef LOADER_ZFS_SUPPORT + char buf[20]; struct zfs_boot_args *zargs; #endif int biosdev = -1; @@ -239,10 +240,17 @@ extract_currdev(void) if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) zargs = (struct zfs_boot_args *)(kargs + 1); - if (zargs != NULL && zargs->size >= sizeof(*zargs)) { + if (zargs != NULL && + zargs->size >= offsetof(struct zfs_boot_args, primary_pool)) { /* sufficient data is provided */ new_currdev.d_kind.zfs.pool_guid = zargs->pool; new_currdev.d_kind.zfs.root_guid = zargs->root; + if (zargs->size >= sizeof(*zargs) && zargs->primary_vdev != 0) { + sprintf(buf, "%llu", zargs->primary_pool); + setenv("vfs.zfs.boot.primary_pool", buf, 1); + sprintf(buf, "%llu", zargs->primary_vdev); + setenv("vfs.zfs.boot.primary_vdev", buf, 1); + } } else { /* old style zfsboot block */ new_currdev.d_kind.zfs.pool_guid = kargs->zfspool; Modified: stable/9/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/9/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 16:06:55 2012 (r242240) +++ stable/9/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 16:10:03 2012 (r242241) @@ -176,6 +176,8 @@ zfs_read(spa_t *spa, const dnode_phys_t * Current ZFS pool */ static spa_t *spa; +static spa_t *primary_spa; +static vdev_t *primary_vdev; /* * A wrapper for dskread that doesn't have to worry about whether the @@ -526,7 +528,7 @@ main(void) * first pool we found, if any. */ if (!spa) { - spa = STAILQ_FIRST(&zfs_pools); + spa = spa_get_primary(); if (!spa) { printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); for (;;) @@ -534,6 +536,9 @@ main(void) } } + primary_spa = spa; + primary_vdev = spa_get_primary_vdev(spa); + if (zfs_spa_init(spa) != 0 || zfs_mount(spa, 0, &zfsmount) != 0) { printf("%s: failed to mount default pool %s\n", BOOTPROG, spa->spa_name); @@ -702,6 +707,11 @@ load(void) zfsargs.size = sizeof(zfsargs); zfsargs.pool = zfsmount.spa->spa_guid; zfsargs.root = zfsmount.rootobj; + zfsargs.primary_pool = primary_spa->spa_guid; + if (primary_vdev != NULL) + zfsargs.primary_vdev = primary_vdev->v_guid; + else + printf("failed to detect primary vdev\n"); __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), bootdev, KARGS_FLAGS_ZFS | KARGS_FLAGS_EXTARG, Modified: stable/9/sys/boot/zfs/libzfs.h ============================================================================== --- stable/9/sys/boot/zfs/libzfs.h Sun Oct 28 16:06:55 2012 (r242240) +++ stable/9/sys/boot/zfs/libzfs.h Sun Oct 28 16:10:03 2012 (r242241) @@ -53,6 +53,8 @@ struct zfs_boot_args uint32_t reserved; uint64_t pool; uint64_t root; + uint64_t primary_pool; + uint64_t primary_vdev; }; int zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, Modified: stable/9/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/9/sys/boot/zfs/zfsimpl.c Sun Oct 28 16:06:55 2012 (r242240) +++ stable/9/sys/boot/zfs/zfsimpl.c Sun Oct 28 16:10:03 2012 (r242241) @@ -648,6 +648,34 @@ spa_find_by_name(const char *name) return (0); } +#ifdef BOOT2 +static spa_t * +spa_get_primary(void) +{ + + return (STAILQ_FIRST(&zfs_pools)); +} + +static vdev_t * +spa_get_primary_vdev(const spa_t *spa) +{ + vdev_t *vdev; + vdev_t *kid; + + if (spa == NULL) + spa = spa_get_primary(); + if (spa == NULL) + return (NULL); + vdev = STAILQ_FIRST(&spa->spa_vdevs); + if (vdev == NULL) + return (NULL); + for (kid = STAILQ_FIRST(&vdev->v_children); kid != NULL; + kid = STAILQ_FIRST(&vdev->v_children)) + vdev = kid; + return (vdev); +} +#endif + static spa_t * spa_create(uint64_t guid) { From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 16:11:58 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5F56E63; Sun, 28 Oct 2012 16:11:58 +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 A44998FC0C; Sun, 28 Oct 2012 16:11:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SGBwsX047240; Sun, 28 Oct 2012 16:11:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SGBwjn047237; Sun, 28 Oct 2012 16:11:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281611.q9SGBwjn047237@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 16:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242243 - stable/9/sys/boot/i386/zfsboot X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 16:11:59 -0000 Author: avg Date: Sun Oct 28 16:11:58 2012 New Revision: 242243 URL: http://svn.freebsd.org/changeset/base/242243 Log: MFC r241294: zfsboot: simplify probe_drive() a little bit Modified: stable/9/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/9/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 16:10:18 2012 (r242242) +++ stable/9/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 16:11:58 2012 (r242243) @@ -345,7 +345,7 @@ copy_dsk(struct dsk *dsk) } static void -probe_drive(struct dsk *dsk, spa_t **spap) +probe_drive(struct dsk *dsk) { #ifdef GPT struct gpt_hdr hdr; @@ -359,9 +359,10 @@ probe_drive(struct dsk *dsk, spa_t **spa /* * If we find a vdev on the whole disk, stop here. Otherwise dig - * out the MBR and probe each slice in turn for a vdev. + * out the partition table and probe each slice/partition + * in turn for a vdev. */ - if (vdev_probe(vdev_read, dsk, spap) == 0) + if (vdev_probe(vdev_read, dsk, NULL) == 0) return; sec = dmadat->secbuf; @@ -399,13 +400,7 @@ probe_drive(struct dsk *dsk, spa_t **spa if (memcmp(&ent->ent_type, &freebsd_zfs_uuid, sizeof(uuid_t)) == 0) { dsk->start = ent->ent_lba_start; - if (vdev_probe(vdev_read, dsk, spap) == 0) { - /* - * We record the first pool we find (we will try - * to boot from that one). - */ - spap = NULL; - + if (vdev_probe(vdev_read, dsk, NULL) == 0) { /* * This slice had a vdev. We need a new dsk * structure now since the vdev now owns this one. @@ -428,13 +423,7 @@ trymbr: if (!dp[i].dp_typ) continue; dsk->start = dp[i].dp_start; - if (vdev_probe(vdev_read, dsk, spap) == 0) { - /* - * We record the first pool we find (we will try to boot - * from that one. - */ - spap = 0; - + if (vdev_probe(vdev_read, dsk, NULL) == 0) { /* * This slice had a vdev. We need a new dsk structure now * since the vdev now owns this one. @@ -493,7 +482,7 @@ main(void) * Probe the boot drive first - we will try to boot from whatever * pool we find on that drive. */ - probe_drive(dsk, &spa); + probe_drive(dsk); /* * Probe the rest of the drives that the bios knows about. This @@ -520,20 +509,17 @@ main(void) dsk->part = 0; dsk->start = 0; dsk->init = 0; - probe_drive(dsk, NULL); + probe_drive(dsk); } /* - * If we didn't find a pool on the boot drive, default to the - * first pool we found, if any. + * The first discovered pool, if any, is the pool. */ + spa = spa_get_primary(); if (!spa) { - spa = spa_get_primary(); - if (!spa) { - printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); - for (;;) - ; - } + printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); + for (;;) + ; } primary_spa = spa; From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 28 16:14:07 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A03E81C2; Sun, 28 Oct 2012 16:14:07 +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 87AE68FC08; Sun, 28 Oct 2012 16:14:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SGE7TT047747; Sun, 28 Oct 2012 16:14:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SGE7qS047745; Sun, 28 Oct 2012 16:14:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281614.q9SGE7qS047745@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 16:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242245 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 16:14:07 -0000 Author: avg Date: Sun Oct 28 16:14:07 2012 New Revision: 242245 URL: http://svn.freebsd.org/changeset/base/242245 Log: MFC r241281: ktrace/kern_exec: check p_tracecred instead of p_cred Modified: stable/9/sys/kern/kern_exec.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Sun Oct 28 16:12:12 2012 (r242244) +++ stable/9/sys/kern/kern_exec.c Sun Oct 28 16:14:07 2012 (r242245) @@ -694,7 +694,8 @@ interpret: setsugid(p); #ifdef KTRACE - if (priv_check_cred(oldcred, PRIV_DEBUG_DIFFCRED, 0)) + if (p->p_tracecred != NULL && + priv_check_cred(p->p_tracecred, PRIV_DEBUG_DIFFCRED, 0)) ktrprocexec(p, &tracecred, &tracevp); #endif /* From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 03:45:38 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D57CF00; Mon, 29 Oct 2012 03:45:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64A448FC0C; Mon, 29 Oct 2012 03:45:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T3jcNs068781; Mon, 29 Oct 2012 03:45:38 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T3jcpX068777; Mon, 29 Oct 2012 03:45:38 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290345.q9T3jcpX068777@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 03:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242278 - in stable/9/sys/dev/usb: . net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 03:45:38 -0000 Author: eadler Date: Mon Oct 29 03:45:37 2012 New Revision: 242278 URL: http://svn.freebsd.org/changeset/base/242278 Log: MFC r241793: Add support for iPhone 5 tethering. PR: usb/172172 Approved by: cperciva (implicit) Modified: stable/9/sys/dev/usb/net/if_ipheth.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/if_ipheth.c ============================================================================== --- stable/9/sys/dev/usb/net/if_ipheth.c Mon Oct 29 03:31:22 2012 (r242277) +++ stable/9/sys/dev/usb/net/if_ipheth.c Mon Oct 29 03:45:37 2012 (r242278) @@ -161,6 +161,9 @@ static const STRUCT_USB_HOST_ID ipheth_d {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_4, IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, IPHETH_USBINTF_PROTO)}, + {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_5, + IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, + IPHETH_USBINTF_PROTO)}, }; static int Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Mon Oct 29 03:31:22 2012 (r242277) +++ stable/9/sys/dev/usb/usbdevs Mon Oct 29 03:45:37 2012 (r242278) @@ -1078,6 +1078,7 @@ product APPLE IPOD_TOUCH 0x1291 iPod Tou product APPLE IPHONE_3G 0x1292 iPhone 3G product APPLE IPHONE_3GS 0x1294 iPhone 3GS product APPLE IPHONE_4 0x1297 iPhone 4 +product APPLE IPHONE_5 0x12a8 iPhone 5 product APPLE IPAD 0x129a iPad product APPLE ETHERNET 0x1402 Ethernet A1277 From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 03:48:25 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F4822A8; Mon, 29 Oct 2012 03:48:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7667A8FC15; Mon, 29 Oct 2012 03:48:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T3mPRx069316; Mon, 29 Oct 2012 03:48:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T3mPPE069312; Mon, 29 Oct 2012 03:48:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290348.q9T3mPPE069312@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 03:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242281 - stable/9/sys/dev/usb/input X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 03:48:25 -0000 Author: eadler Date: Mon Oct 29 03:48:25 2012 New Revision: 242281 URL: http://svn.freebsd.org/changeset/base/242281 Log: MFC r241843: Make uhid attach to devices that look like keyboards or mice if the quirk which prevents higher level drivers from attaching is set. PR: usb/172458 Approved by: cperciva (implicit) Modified: stable/9/sys/dev/usb/input/uhid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/uhid.c ============================================================================== --- stable/9/sys/dev/usb/input/uhid.c Mon Oct 29 03:48:24 2012 (r242280) +++ stable/9/sys/dev/usb/input/uhid.c Mon Oct 29 03:48:25 2012 (r242281) @@ -691,10 +691,11 @@ uhid_probe(device_t dev) */ if ((uaa->info.bInterfaceClass == UICLASS_HID) && (uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && - ((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) || - (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))) { + (((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) && + !usb_test_quirk(uaa, UQ_KBD_IGNORE)) || + ((uaa->info.bInterfaceProtocol == UIPROTO_MOUSE) && + !usb_test_quirk(uaa, UQ_UMS_IGNORE)))) return (ENXIO); - } return (BUS_PROBE_GENERIC); } From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 03:52:19 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2BCD603; Mon, 29 Oct 2012 03:52:19 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 851568FC16; Mon, 29 Oct 2012 03:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T3qJ4F070076; Mon, 29 Oct 2012 03:52:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T3qJa3070064; Mon, 29 Oct 2012 03:52:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290352.q9T3qJa3070064@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 03:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242283 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 03:52:19 -0000 Author: eadler Date: Mon Oct 29 03:52:18 2012 New Revision: 242283 URL: http://svn.freebsd.org/changeset/base/242283 Log: MFC r241855,r241859: Update the kill(2) and killpg(2) man pages to the modern permission checks. Also indicate killpg(2) is POSIX compliant. Correct the killpg(2) return values: Return EPERM if processes were found but they were unable to be signaled. Return the first error from p_cansignal if no signal was successful. Discussed with: jilles Approved by: cperciva (implicit) Modified: stable/9/sys/kern/kern_sig.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_sig.c ============================================================================== --- stable/9/sys/kern/kern_sig.c Mon Oct 29 03:52:18 2012 (r242282) +++ stable/9/sys/kern/kern_sig.c Mon Oct 29 03:52:18 2012 (r242283) @@ -1599,8 +1599,10 @@ killpg1(struct thread *td, int sig, int { struct proc *p; struct pgrp *pgrp; - int nfound = 0; + int err; + int ret; + ret = ESRCH; if (all) { /* * broadcast @@ -1613,11 +1615,14 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - if (p_cansignal(td, p, sig) == 0) { - nfound++; + err = p_cansignal(td, p, sig); + if (err == 0) { if (sig) pksignal(p, sig, ksi); + ret = err; } + else if (ret == ESRCH) + ret = err; PROC_UNLOCK(p); } sx_sunlock(&allproc_lock); @@ -1644,16 +1649,19 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - if (p_cansignal(td, p, sig) == 0) { - nfound++; + err = p_cansignal(td, p, sig); + if (err == 0) { if (sig) pksignal(p, sig, ksi); + ret = err; } + else if (ret == ESRCH) + ret = err; PROC_UNLOCK(p); } PGRP_UNLOCK(pgrp); } - return (nfound ? 0 : ESRCH); + return (ret); } #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 04:09:21 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5C40BDAA; Mon, 29 Oct 2012 04:09:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25D0C8FC0A; Mon, 29 Oct 2012 04:09:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T49Kmo072920; Mon, 29 Oct 2012 04:09:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T49Kvs072915; Mon, 29 Oct 2012 04:09:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290409.q9T49Kvs072915@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242286 - stable/9/sys/dev/mpt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:09:21 -0000 Author: eadler Date: Mon Oct 29 04:09:20 2012 New Revision: 242286 URL: http://svn.freebsd.org/changeset/base/242286 Log: MFC r241858: Remove unused code since the 5.x days Approved by: cperciva (implicit) Modified: stable/9/sys/dev/mpt/mpt_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_pci.c Mon Oct 29 04:09:20 2012 (r242285) +++ stable/9/sys/dev/mpt/mpt_pci.c Mon Oct 29 04:09:20 2012 (r242286) @@ -261,68 +261,6 @@ mpt_pci_probe(device_t dev) return (rval); } -#if __FreeBSD_version < 500000 -static void -mpt_set_options(struct mpt_softc *mpt) -{ - int bitmap; - - bitmap = 0; - if (getenv_int("mpt_disable", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->disabled = 1; - } - } - bitmap = 0; - if (getenv_int("mpt_debug", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG; - } - } - bitmap = 0; - if (getenv_int("mpt_debug1", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG1; - } - } - bitmap = 0; - if (getenv_int("mpt_debug2", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG2; - } - } - bitmap = 0; - if (getenv_int("mpt_debug3", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG3; - } - } - - mpt->cfg_role = MPT_ROLE_DEFAULT; - bitmap = 0; - if (getenv_int("mpt_nil_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role = 0; - } - mpt->do_cfg_role = 1; - } - bitmap = 0; - if (getenv_int("mpt_tgt_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role |= MPT_ROLE_TARGET; - } - mpt->do_cfg_role = 1; - } - bitmap = 0; - if (getenv_int("mpt_ini_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role |= MPT_ROLE_INITIATOR; - } - mpt->do_cfg_role = 1; - } - mpt->msi_enable = 0; -} -#else static void mpt_set_options(struct mpt_softc *mpt) { @@ -354,7 +292,6 @@ mpt_set_options(struct mpt_softc *mpt) mpt->msi_enable = tval; } } -#endif static void mpt_link_peer(struct mpt_softc *mpt) From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 04:16:53 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73F5E388; Mon, 29 Oct 2012 04:16:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BC458FC14; Mon, 29 Oct 2012 04:16:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T4GrY4074293; Mon, 29 Oct 2012 04:16:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T4GqZa074281; Mon, 29 Oct 2012 04:16:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290416.q9T4GqZa074281@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242289 - stable/9/lib/libfetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:16:53 -0000 Author: eadler Date: Mon Oct 29 04:16:52 2012 New Revision: 242289 URL: http://svn.freebsd.org/changeset/base/242289 Log: MFC r241840: Don't deny non-temporary redirects if the -A option is set (per the man page) [0] While here add support for draft-reschke-http-status-308-07 PR: 172451 [0] Approved by: cperciva (implicit) Modified: stable/9/lib/libfetch/http.c stable/9/lib/libfetch/http.errors Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/http.c ============================================================================== --- stable/9/lib/libfetch/http.c Mon Oct 29 04:16:52 2012 (r242288) +++ stable/9/lib/libfetch/http.c Mon Oct 29 04:16:52 2012 (r242289) @@ -96,6 +96,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_SEE_OTHER 303 #define HTTP_NOT_MODIFIED 304 #define HTTP_TEMP_REDIRECT 307 +#define HTTP_PERM_REDIRECT 308 #define HTTP_NEED_AUTH 401 #define HTTP_NEED_PROXY_AUTH 407 #define HTTP_BAD_RANGE 416 @@ -1516,8 +1517,7 @@ http_request(struct url *URL, const char /* try the provided URL first */ url = URL; - /* if the A flag is set, we only get one try */ - n = noredirect ? 1 : MAX_REDIRECT; + n = MAX_REDIRECT; i = 0; e = HTTP_PROTOCOL_ERROR; @@ -1764,6 +1764,16 @@ http_request(struct url *URL, const char case hdr_location: if (!HTTP_REDIRECT(conn->err)) break; + /* + * if the A flag is set, we don't follow + * temporary redirects. + */ + if (noredirect && + conn->err != HTTP_MOVED_PERM && + conn->err != HTTP_PERM_REDIRECT) { + n = 1; + break; + } if (new) free(new); if (verbose) Modified: stable/9/lib/libfetch/http.errors ============================================================================== --- stable/9/lib/libfetch/http.errors Mon Oct 29 04:16:52 2012 (r242288) +++ stable/9/lib/libfetch/http.errors Mon Oct 29 04:16:52 2012 (r242289) @@ -18,6 +18,7 @@ 304 OK Not Modified 305 INFO Use Proxy 307 MOVED Temporary Redirect +308 MOVED Permanent Redirect 400 PROTO Bad Request 401 AUTH Unauthorized 402 AUTH Payment Required From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 04:18:35 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06CDE7EF; Mon, 29 Oct 2012 04:18:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E184A8FC15; Mon, 29 Oct 2012 04:18:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T4IYow074697; Mon, 29 Oct 2012 04:18:34 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T4IYG8074695; Mon, 29 Oct 2012 04:18:34 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290418.q9T4IYG8074695@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:18:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242293 - stable/9/lib/libfetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:18:35 -0000 Author: eadler Date: Mon Oct 29 04:18:34 2012 New Revision: 242293 URL: http://svn.freebsd.org/changeset/base/242293 Log: MFC r241841: Implement HTTP 305 redirect handling. PR: 172452 Approved by: cperciva (implicit) Modified: stable/9/lib/libfetch/http.c Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/http.c ============================================================================== --- stable/9/lib/libfetch/http.c Mon Oct 29 04:18:34 2012 (r242292) +++ stable/9/lib/libfetch/http.c Mon Oct 29 04:18:34 2012 (r242293) @@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_MOVED_TEMP 302 #define HTTP_SEE_OTHER 303 #define HTTP_NOT_MODIFIED 304 +#define HTTP_USE_PROXY 305 #define HTTP_TEMP_REDIRECT 307 #define HTTP_PERM_REDIRECT 308 #define HTTP_NEED_AUTH 401 @@ -105,6 +106,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_REDIRECT(xyz) ((xyz) == HTTP_MOVED_PERM \ || (xyz) == HTTP_MOVED_TEMP \ || (xyz) == HTTP_TEMP_REDIRECT \ + || (xyz) == HTTP_USE_PROXY \ || (xyz) == HTTP_SEE_OTHER) #define HTTP_ERROR(xyz) ((xyz) > 400 && (xyz) < 599) @@ -1689,6 +1691,7 @@ http_request(struct url *URL, const char case HTTP_MOVED_PERM: case HTTP_MOVED_TEMP: case HTTP_SEE_OTHER: + case HTTP_USE_PROXY: /* * Not so fine, but we still have to read the * headers to get the new location. @@ -1770,7 +1773,8 @@ http_request(struct url *URL, const char */ if (noredirect && conn->err != HTTP_MOVED_PERM && - conn->err != HTTP_PERM_REDIRECT) { + conn->err != HTTP_PERM_REDIRECT && + conn->err != HTTP_USE_PROXY) { n = 1; break; } From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 04:21:16 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E772EC73; Mon, 29 Oct 2012 04:21:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCF5C8FC18; Mon, 29 Oct 2012 04:21:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T4LGFU075203; Mon, 29 Oct 2012 04:21:16 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T4LGQA075201; Mon, 29 Oct 2012 04:21:16 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290421.q9T4LGQA075201@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242294 - stable/9/usr.bin/uuencode X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:21:17 -0000 Author: eadler Date: Mon Oct 29 04:21:16 2012 New Revision: 242294 URL: http://svn.freebsd.org/changeset/base/242294 Log: MFC r242136: Prefer an example users born after myself might use. Approved by: cperciva (implicit) Modified: stable/9/usr.bin/uuencode/uuencode.1 Directory Properties: stable/9/usr.bin/uuencode/ (props changed) Modified: stable/9/usr.bin/uuencode/uuencode.1 ============================================================================== --- stable/9/usr.bin/uuencode/uuencode.1 Mon Oct 29 04:18:34 2012 (r242293) +++ stable/9/usr.bin/uuencode/uuencode.1 Mon Oct 29 04:21:16 2012 (r242294) @@ -183,7 +183,7 @@ tree. .Pp .Bd -literal -offset indent -compact tar cf \- src_tree \&| compress \&| -uuencode src_tree.tar.Z \&| mail sys1!sys2!user +uuencode src_tree.tar.Z \&| mail user@example.com .Ed .Pp The following example unpacks all uuencoded From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 04:32:46 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB29C3AB; Mon, 29 Oct 2012 04:32:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kostikbel-1-pt.tunnel.tserv11.ams1.ipv6.he.net [IPv6:2001:470:1f14:13d6::2]) by mx1.freebsd.org (Postfix) with ESMTP id 51EF18FC14; Mon, 29 Oct 2012 04:32:46 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id q9T4Wg3M081354; Mon, 29 Oct 2012 06:32:42 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id q9T4WgI0081353; Mon, 29 Oct 2012 06:32:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 29 Oct 2012 06:32:42 +0200 From: Konstantin Belousov To: Eitan Adler Subject: Re: svn commit: r242283 - stable/9/sys/kern Message-ID: <20121029043242.GH73505@kib.kiev.ua> References: <201210290352.q9T3qJa3070064@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Fnm8lRGFTVS/3GuM" Content-Disposition: inline In-Reply-To: <201210290352.q9T3qJa3070064@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:32:47 -0000 --Fnm8lRGFTVS/3GuM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 29, 2012 at 03:52:19AM +0000, Eitan Adler wrote: > Author: eadler > Date: Mon Oct 29 03:52:18 2012 > New Revision: 242283 > URL: http://svn.freebsd.org/changeset/base/242283 >=20 > Log: > MFC r241855,r241859: > Update the kill(2) and killpg(2) man pages to the modern permission > checks. Also indicate killpg(2) is POSIX compliant. > =20 > Correct the killpg(2) return values: > =20 > Return EPERM if processes were found but they > were unable to be signaled. > =20 > Return the first error from p_cansignal if no signal was successful. > =20 > Discussed with: jilles > Approved by: cperciva (implicit) >=20 > Modified: > stable/9/sys/kern/kern_sig.c > Directory Properties: > stable/9/sys/ (props changed) According to svn mail, r241855 was not merged. >=20 > Modified: stable/9/sys/kern/kern_sig.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/9/sys/kern/kern_sig.c Mon Oct 29 03:52:18 2012 (r242282) > +++ stable/9/sys/kern/kern_sig.c Mon Oct 29 03:52:18 2012 (r242283) > @@ -1599,8 +1599,10 @@ killpg1(struct thread *td, int sig, int=20 > { > struct proc *p; > struct pgrp *pgrp; > - int nfound =3D 0; > + int err; > + int ret; > =20 > + ret =3D ESRCH; > if (all) { > /* > * broadcast > @@ -1613,11 +1615,14 @@ killpg1(struct thread *td, int sig, int=20 > PROC_UNLOCK(p); > continue; > } > - if (p_cansignal(td, p, sig) =3D=3D 0) { > - nfound++; > + err =3D p_cansignal(td, p, sig); > + if (err =3D=3D 0) { > if (sig) > pksignal(p, sig, ksi); > + ret =3D err; > } > + else if (ret =3D=3D ESRCH) > + ret =3D err; > PROC_UNLOCK(p); > } > sx_sunlock(&allproc_lock); > @@ -1644,16 +1649,19 @@ killpg1(struct thread *td, int sig, int=20 > PROC_UNLOCK(p); > continue; > } > - if (p_cansignal(td, p, sig) =3D=3D 0) { > - nfound++; > + err =3D p_cansignal(td, p, sig); > + if (err =3D=3D 0) { > if (sig) > pksignal(p, sig, ksi); > + ret =3D err; > } > + else if (ret =3D=3D ESRCH) > + ret =3D err; > PROC_UNLOCK(p); > } > PGRP_UNLOCK(pgrp); > } > - return (nfound ? 0 : ESRCH); > + return (ret); > } > =20 > #ifndef _SYS_SYSPROTO_H_ --Fnm8lRGFTVS/3GuM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCOBukACgkQC3+MBN1Mb4iDgwCeO8ml+F6PXv1qbKW2KRR5ZYYE QrcAoPfXlJjbRSXvwG/qlHMjJ+UqzY5Y =3osD -----END PGP SIGNATURE----- --Fnm8lRGFTVS/3GuM-- From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 04:47:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5544A94 for ; Mon, 29 Oct 2012 04:47:18 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 866648FC15 for ; Mon, 29 Oct 2012 04:47:18 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so3254171pad.13 for ; Sun, 28 Oct 2012 21:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=ufbtiYn0RyKrcZfVZAQUL6x5M47vTGQu8Bx9ZjENevE=; b=V1HfhVYirSNZHq4PZXe55oIWiXKwsPkAHrwsnuyQaQyTxQd3TWz0eUJHEQqB6RbPAA j9QnJRlimASiVC4oXg/0M8zp3NCNDD4dZy32nAQn0GGBgfhz8cUjctoUqWrbwpZJn/G/ x6VQoxyL1KsJwjQvjOZpFfKGi2yRNIVqn48W8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=ufbtiYn0RyKrcZfVZAQUL6x5M47vTGQu8Bx9ZjENevE=; b=bdVcHSbcXjZNuH3Jw/CoGI07/KoSbpzjbsR1nX0Psgukh6eFiMmbRPVm8mInO7Faq6 cCMl4xqJ/D19kNp9tH6H7pBLMtYMMr0rexE7Qhs53BMoLzo3BvE5RqXL8Jpu35YXyHtm LKa30fQZHmv8/F6ak7DT776EZGJPDhWz2cCPm3CFf+N/tAdPJ8Erm6yF1O8Lk05J3aPm iJNTwLCOg9FkxQWpvsgV1+KiTpz78kIFOo2eFtPVCUXqvhFCiCGNLiHLf1Y5auEHPwt4 Q00mlrKHL6ZIXpZOahYarkaFxqISa8p00S4KM3cTyaR5xwnrZ7kyFXMFSjlORU5HBjea BbqA== Received: by 10.68.200.231 with SMTP id jv7mr88976626pbc.140.1351486037942; Sun, 28 Oct 2012 21:47:17 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Sun, 28 Oct 2012 21:46:47 -0700 (PDT) In-Reply-To: <20121029043242.GH73505@kib.kiev.ua> References: <201210290352.q9T3qJa3070064@svn.freebsd.org> <20121029043242.GH73505@kib.kiev.ua> From: Eitan Adler Date: Mon, 29 Oct 2012 00:46:47 -0400 X-Google-Sender-Auth: ry8_QfUdeLqN_XPQmsRCa1GO124 Message-ID: Subject: Re: svn commit: r242283 - stable/9/sys/kern To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQm8Ejhldado2gT4N/3r71Dly9OUEb/ZX/wAID1gM41txCrIIHc2hQqG/OBgm3aLWmwNtIX+ Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:47:18 -0000 On 29 October 2012 00:32, Konstantin Belousov wrote: > On Mon, Oct 29, 2012 at 03:52:19AM +0000, Eitan Adler wrote: >> Author: eadler >> Date: Mon Oct 29 03:52:18 2012 >> New Revision: 242283 >> URL: http://svn.freebsd.org/changeset/base/242283 >> >> Log: >> MFC r241855,r241859: >> Update the kill(2) and killpg(2) man pages to the modern permission >> checks. Also indicate killpg(2) is POSIX compliant. >> >> Correct the killpg(2) return values: >> >> Return EPERM if processes were found but they >> were unable to be signaled. >> >> Return the first error from p_cansignal if no signal was successful. >> >> Discussed with: jilles >> Approved by: cperciva (implicit) >> >> Modified: >> stable/9/sys/kern/kern_sig.c >> Directory Properties: >> stable/9/sys/ (props changed) > According to svn mail, r241855 was not merged. Okay, this is weird. I am certain my original merge command included both revisions. Looking at the email it is clear that the documentation was not MFCed. If I attempt to MFC again now I see no changes. %svn merge -c241855 svn+ssh://svn.freebsd.org/base//head/sys stable9/sys %svn status stable9 %svn diff stable9 % What did I do wrong? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 04:50:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A3F6D44 for ; Mon, 29 Oct 2012 04:50:39 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5188FC0C for ; Mon, 29 Oct 2012 04:50:39 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id z9so2297462dad.13 for ; Sun, 28 Oct 2012 21:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=MO7wU5BfGeduFKU9gXBiLk0wYAvR3NBxSo237+DhXQ0=; b=Jx59Ob48s2cZnElL1XjHUzfiKmG87GIMzd+NCvtGOJflmgK9m1IFxh5ZR3e5DmZszQ Qc4j68d86GmeJQocDrvC+v2l37Dt255ZtPnJz5EBffQD3dSwl07dUzYRiX+2H4eAofyK 9er733MdkcZIYi8lzzKTJQ7ank//WCxoBMAqg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=MO7wU5BfGeduFKU9gXBiLk0wYAvR3NBxSo237+DhXQ0=; b=magaBHscsie9Mbxj4Ix50Jsk9Sv9/0o3IFQY9ucoCDziaTNMpF5fgGupcwpuKqkPz4 TNW20BfxztYQI4VuUPhvsC71arGzJqBsi7BJhOLF/PYrAkm0Ql3WjYFieHmQw0x6p/MU l9h2r2GfZXAwJq0gJC6s2jjTTj05aZtfY+HF6aunmTqswflr5f4kgakL2ctgXmOiw2bd R0TDTUmYI0WX0XJqURxFIPLbmsE5jnqU3Q49++hoxWosFXtlmKWI2bLUkggDhiTF2nAU EkNiHKzGFS0r+KYPwnCqfU3y3SrDDCIZGCoF08M6uKd9HfqRehZOG6/gH84/7e5W6Nd8 vzHg== Received: by 10.66.84.132 with SMTP id z4mr7812077pay.63.1351486238909; Sun, 28 Oct 2012 21:50:38 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Sun, 28 Oct 2012 21:50:08 -0700 (PDT) In-Reply-To: References: <201210290352.q9T3qJa3070064@svn.freebsd.org> <20121029043242.GH73505@kib.kiev.ua> From: Eitan Adler Date: Mon, 29 Oct 2012 00:50:08 -0400 X-Google-Sender-Auth: l96kPi8oygYfNJ89zeJ9Z5itxho Message-ID: Subject: Re: svn commit: r242283 - stable/9/sys/kern To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkKPkSD11a/B6TPqqlvYVkJ4GSWXj1wnfx2M85ONfVIbNT4avRQ04edgi3kqOMu+dZoYL8+ Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:50:39 -0000 On 29 October 2012 00:46, Eitan Adler wrote: > On 29 October 2012 00:32, Konstantin Belousov wrote: >> On Mon, Oct 29, 2012 at 03:52:19AM +0000, Eitan Adler wrote: >>> Author: eadler >>> Date: Mon Oct 29 03:52:18 2012 >>> New Revision: 242283 >>> URL: http://svn.freebsd.org/changeset/base/242283 >>> >>> Log: >>> MFC r241855,r241859: >>> Update the kill(2) and killpg(2) man pages to the modern permission >>> checks. Also indicate killpg(2) is POSIX compliant. >>> >>> Correct the killpg(2) return values: >>> >>> Return EPERM if processes were found but they >>> were unable to be signaled. >>> >>> Return the first error from p_cansignal if no signal was successful. >>> >>> Discussed with: jilles >>> Approved by: cperciva (implicit) >>> >>> Modified: >>> stable/9/sys/kern/kern_sig.c >>> Directory Properties: >>> stable/9/sys/ (props changed) > >> According to svn mail, r241855 was not merged. > > Okay, this is weird. I am certain my original merge command included > both revisions. Looking at the email it is clear that the > documentation was not MFCed. > > If I attempt to MFC again now I see no changes. > > %svn merge -c241855 svn+ssh://svn.freebsd.org/base//head/sys stable9/sys > %svn status stable9 > %svn diff stable9 > % > > What did I do wrong? Ah! I see. I forgot that the manual pages are not in the same directory and that I need to merge to lib/libc as well. I shall fix now. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 04:51:52 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C3B7EAD; Mon, 29 Oct 2012 04:51:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1183F8FC12; Mon, 29 Oct 2012 04:51:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T4ppsX080127; Mon, 29 Oct 2012 04:51:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T4ppdp080124; Mon, 29 Oct 2012 04:51:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290451.q9T4ppdp080124@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242298 - in stable/9/lib/libc: compat-43 sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:51:52 -0000 Author: eadler Date: Mon Oct 29 04:51:51 2012 New Revision: 242298 URL: http://svn.freebsd.org/changeset/base/242298 Log: MFC r241855: Update the kill(2) and killpg(2) man pages to the modern permission checks. Also indicate killpg(2) is POSIX compliant. Approved by: cperciva (implicit) Modified: stable/9/lib/libc/compat-43/killpg.2 stable/9/lib/libc/sys/kill.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/compat-43/killpg.2 ============================================================================== --- stable/9/lib/libc/compat-43/killpg.2 Mon Oct 29 04:51:50 2012 (r242297) +++ stable/9/lib/libc/compat-43/killpg.2 Mon Oct 29 04:51:51 2012 (r242298) @@ -58,11 +58,9 @@ is 0, .Fn killpg sends the signal to the sending process's process group. .Pp -The sending process and members of the process group must -have the same effective user ID, or -the sender must be the super-user. -As a single special case the continue signal SIGCONT may be sent -to any process with the same session ID as the caller. +The sending process must be able to +.Fn kill +at least one process in the receiving process group. .Sh RETURN VALUES .Rv -std killpg .Sh ERRORS @@ -80,9 +78,8 @@ is not a valid signal number. No process can be found in the process group specified by .Fa pgrp . .It Bq Er EPERM -The sending process is not the super-user and one or more -of the target processes has an effective user ID different from that -of the sending process. +.Fn kill +returns EPERM for all processes in the process group. .El .Sh SEE ALSO .Xr getpgrp 2 , Modified: stable/9/lib/libc/sys/kill.2 ============================================================================== --- stable/9/lib/libc/sys/kill.2 Mon Oct 29 04:51:50 2012 (r242297) +++ stable/9/lib/libc/sys/kill.2 Mon Oct 29 04:51:51 2012 (r242298) @@ -64,11 +64,19 @@ This can be used to check the validity o For a process to have permission to send a signal to a process designated by .Fa pid , -the real or effective user ID of the receiving process must match -that of the sending process or the user must have appropriate privileges -(such as given by a set-user-ID program or the user is the super-user). +the user must be the super-user, or +the real or saved user ID of the receiving process must match +the real or effective user ID of the sending process. A single exception is the signal SIGCONT, which may always be sent -to any process with the same session ID as the caller. +to any process with the same session ID as the sender. +In addition, if the +.Va security.bsd.conservative_signals +.Xr sysctl +is set to 1, the user is not a super-user, and +the receiver is set-uid, then +only job control and terminal control signals may +be sent (in particular, only SIGKILL, SIGINT, SIGTERM, SIGALRM, +SIGSTOP, SIGTTIN, SIGTTOU, SIGTSTP, SIGHUP, SIGUSR1, SIGUSR2). .Bl -tag -width Ds .It \&If Fa pid No \&is greater than zero : The @@ -124,10 +132,9 @@ is not a valid signal number. No process or process group can be found corresponding to that specified by .Fa pid . .It Bq Er EPERM -The sending process is not the super-user and its effective -user id does not match the effective user-id of the receiving process. -When signaling a process group, this error is returned if any members -of the group could not be signaled. +The sending process does not have permission to send +.Va sig +to the receiving process. .El .Sh SEE ALSO .Xr getpgrp 2 , From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 16:58:45 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EBEB7F92; Mon, 29 Oct 2012 16:58:45 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2AF58FC0A; Mon, 29 Oct 2012 16:58:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9TGwjJo003046; Mon, 29 Oct 2012 16:58:45 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9TGwjQB003043; Mon, 29 Oct 2012 16:58:45 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201210291658.q9TGwjQB003043@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 29 Oct 2012 16:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242318 - stable/9/etc/defaults X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 16:58:46 -0000 Author: ume Date: Mon Oct 29 16:58:45 2012 New Revision: 242318 URL: http://svn.freebsd.org/changeset/base/242318 Log: MFC r241788: Set default for ${pkg_info} like ${pkg_version}. Modified: stable/9/etc/defaults/periodic.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/defaults/periodic.conf ============================================================================== --- stable/9/etc/defaults/periodic.conf Mon Oct 29 16:42:37 2012 (r242317) +++ stable/9/etc/defaults/periodic.conf Mon Oct 29 16:58:45 2012 (r242318) @@ -143,6 +143,7 @@ daily_status_ntpd_enable="NO" # Check # 490.status-pkg-changes daily_status_pkg_changes_enable="NO" # Show package changes +pkg_info="pkg_info" # Use this program # 500.queuerun daily_queuerun_enable="YES" # Run mail queue From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 17:41:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9314DCE; Mon, 29 Oct 2012 17:41:39 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 884DB8FC0C; Mon, 29 Oct 2012 17:41:38 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so4155913lbd.13 for ; Mon, 29 Oct 2012 10:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=y26Mq0fLtBfiSfGiYA1iUDFDflfBnx5ngjqqF+Q34zE=; b=B3rp1SpSkYORhB2T3QgIw36cud2G2XjNC4t93UUVb6WRQajpJG63O28WP2/GsK54Wr KOy5OTj6FT+ITV068kxShsei0ObeUjXI9E/qaIg2C4eDvZVGIhD/NX3mCqOojWaePzAU vourhEQMyzJSD9tYweeqDPAAYgfbHFUYLmgO4gxTyrg44FbdkH12Td9XTMuV5tE0ThmJ Amsyz3Xspv2n4iluvoMuSob+FW2BjvmQV9M+HIW02l8TxKtqj2rE2omuVa25cDyD58g5 qPfFCkaGQpIxG5pFeUCsF9Eq9bIF47sWl+Tuzh2oLOgsyiKOc+Uxtv2XJKjTrnyQTjC0 nIlg== MIME-Version: 1.0 Received: by 10.112.45.66 with SMTP id k2mr12116975lbm.89.1351532497396; Mon, 29 Oct 2012 10:41:37 -0700 (PDT) Received: by 10.112.59.41 with HTTP; Mon, 29 Oct 2012 10:41:37 -0700 (PDT) In-Reply-To: <201210291658.q9TGwjQB003043@svn.freebsd.org> References: <201210291658.q9TGwjQB003043@svn.freebsd.org> Date: Mon, 29 Oct 2012 10:41:37 -0700 Message-ID: Subject: Re: svn commit: r242318 - stable/9/etc/defaults From: Garrett Cooper To: Hajimu UMEMOTO Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 17:41:40 -0000 On Mon, Oct 29, 2012 at 9:58 AM, Hajimu UMEMOTO wrote: > Author: ume > Date: Mon Oct 29 16:58:45 2012 > New Revision: 242318 > URL: http://svn.freebsd.org/changeset/base/242318 > > Log: > MFC r241788: Set default for ${pkg_info} like ${pkg_version}. > > Modified: > stable/9/etc/defaults/periodic.conf > Directory Properties: > stable/9/etc/ (props changed) > > Modified: stable/9/etc/defaults/periodic.conf > ============================================================================== > --- stable/9/etc/defaults/periodic.conf Mon Oct 29 16:42:37 2012 (r242317) > +++ stable/9/etc/defaults/periodic.conf Mon Oct 29 16:58:45 2012 (r242318) > @@ -143,6 +143,7 @@ daily_status_ntpd_enable="NO" # Check > > # 490.status-pkg-changes > daily_status_pkg_changes_enable="NO" # Show package changes > +pkg_info="pkg_info" # Use this program I meant to comment on this earlier. Wouldn't it be smarter to say..? # Getting this via make is a chicken and egg problem: how can one reliably divine ${PKG_DBDIR} # without knowing where ${PORTSDIR}/Mk is? Just simpler to work with the default as opposed to # dealing with all edgecases. : ${PKG_DBDIR=/var/db/pkg} if [ -f $PKG_DBDIR/local.sqlite ] then pkg_info="pkg info" pkg_version="pkg version" else pkg_info="pkg_info" pkg_version="pkg_version" fi The code that you added assumes that someone is not using pkgng, which isn't terribly useful if someone's running an up-to-date ports tree. Thanks, -Garrett From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 29 21:11:38 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A50B2C6; Mon, 29 Oct 2012 21:11:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30E6E8FC0A; Mon, 29 Oct 2012 21:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9TLBc8H045040; Mon, 29 Oct 2012 21:11:38 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9TLBb4R045038; Mon, 29 Oct 2012 21:11:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210292111.q9TLBb4R045038@svn.freebsd.org> From: Dimitry Andric Date: Mon, 29 Oct 2012 21:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242329 - stable/9/lib/libc++ X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 21:11:38 -0000 Author: dim Date: Mon Oct 29 21:11:37 2012 New Revision: 242329 URL: http://svn.freebsd.org/changeset/base/242329 Log: MFC r241909: Allow building libc++ with any custom -std=xxx flag. Note that using -std=gnu++98 will give a lot of warnings with clang, so please use -std=c++0x or higher, or use NO_WERROR. Modified: stable/9/lib/libc++/Makefile Directory Properties: stable/9/lib/libc++/ (props changed) Modified: stable/9/lib/libc++/Makefile ============================================================================== --- stable/9/lib/libc++/Makefile Mon Oct 29 21:08:06 2012 (r242328) +++ stable/9/lib/libc++/Makefile Mon Oct 29 21:11:37 2012 (r242329) @@ -53,7 +53,9 @@ cxxrt_${_S}: WARNS= 0 CFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT +.if !defined(CXXFLAGS) || ${CXXFLAGS:M-std=*}" == "" CXXFLAGS+= -std=c++0x +.endif DPADD= ${LIBCXXRT} LDADD= -lcxxrt From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 30 03:21:24 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 522F8B58; Tue, 30 Oct 2012 03:21:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A13B8FC08; Tue, 30 Oct 2012 03:21:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9U3LOnW003640; Tue, 30 Oct 2012 03:21:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9U3LNDh003638; Tue, 30 Oct 2012 03:21:23 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210300321.q9U3LNDh003638@svn.freebsd.org> From: Eitan Adler Date: Tue, 30 Oct 2012 03:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242335 - stable/9/gnu/usr.bin/send-pr X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 03:21:24 -0000 Author: eadler Date: Tue Oct 30 03:21:23 2012 New Revision: 242335 URL: http://svn.freebsd.org/changeset/base/242335 Log: MFC r241857: Add support for the "&" character in usernames. Charlie & finally has his last name. PR: gnu/37910 Approved by: cperciva (implicit) Modified: stable/9/gnu/usr.bin/send-pr/send-pr.sh Directory Properties: stable/9/gnu/usr.bin/send-pr/ (props changed) Modified: stable/9/gnu/usr.bin/send-pr/send-pr.sh ============================================================================== --- stable/9/gnu/usr.bin/send-pr/send-pr.sh Tue Oct 30 03:03:37 2012 (r242334) +++ stable/9/gnu/usr.bin/send-pr/send-pr.sh Tue Oct 30 03:21:23 2012 (r242335) @@ -23,7 +23,7 @@ # $FreeBSD$ # The version of this send-pr. -VERSION=3.113 +VERSION=3.114 # The submitter-id for your site. # "current-users" is the only allowable value for FreeBSD. @@ -92,11 +92,16 @@ elif [ -f $HOME/.fullname ]; then ORIGINATOR="`sed -e '1q' $HOME/.fullname`" else PTEMP=`mktemp -t p` || exit 1 + PTEMP2=`mktemp -t p` || exit 1 # Must use temp file due to incompatibilities in quoting behavior # and to protect shell metacharacters in the expansion of $LOGNAME - $PW usershow $LOGNAME | awk -F: '{ print $8 }' | sed -e 's/,.*//' > $PTEMP + $ECHON1 $LOGNAME | awk '{print toupper(substr($1,1,1))substr($1,2)}' > $PTEMP2 + ICLOGNAME="`cat $PTEMP2`" + $PW usershow $LOGNAME | awk -F: '{ print $8 }' \ + | sed -e "s/\&/$ICLOGNAME/" \ + | sed -e 's/,.*//' > $PTEMP ORIGINATOR="`cat $PTEMP`" - rm -f $PTEMP + rm -f "$PTEMP" "$PTEMP2" fi FROM="$ORIGINATOR <$LOGNAME>" From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 30 03:30:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7ADC136; Tue, 30 Oct 2012 03:30:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEB5B8FC0C; Tue, 30 Oct 2012 03:30:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9U3U10K005152; Tue, 30 Oct 2012 03:30:01 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9U3U1Y6005148; Tue, 30 Oct 2012 03:30:01 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210300330.q9U3U1Y6005148@svn.freebsd.org> From: Eitan Adler Date: Tue, 30 Oct 2012 03:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242339 - stable/9/share/syscons/keymaps X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 03:30:02 -0000 Author: eadler Date: Tue Oct 30 03:30:01 2012 New Revision: 242339 URL: http://svn.freebsd.org/changeset/base/242339 Log: MFC r241851: Add Danish keyboard model for macbooks to syscons. (not verified to be accurate) PR: conf/146793 Approved by: cperciva (implicit) Added: stable/9/share/syscons/keymaps/danish.iso.macbook.kbd - copied unchanged from r241851, head/share/syscons/keymaps/danish.iso.macbook.kbd Modified: stable/9/share/syscons/keymaps/INDEX.keymaps stable/9/share/syscons/keymaps/Makefile Directory Properties: stable/9/share/syscons/keymaps/ (props changed) Modified: stable/9/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/9/share/syscons/keymaps/INDEX.keymaps Tue Oct 30 03:30:00 2012 (r242338) +++ stable/9/share/syscons/keymaps/INDEX.keymaps Tue Oct 30 03:30:01 2012 (r242339) @@ -117,6 +117,8 @@ danish.cp865.kbd:fr:Danois Code page 865 danish.cp865.kbd:pt:Dinamarquês Codepage 865 danish.cp865.kbd:es:Danés Codepage 865 +danish.iso.macbook.kbd:Danish ISO-8859-1 (macbook) + dutch.iso.acc.kbd:en:Dutch ISO keymap (accent keys) eee_nordic.kbd:en:Nordic layout on Asus eeePC Modified: stable/9/share/syscons/keymaps/Makefile ============================================================================== --- stable/9/share/syscons/keymaps/Makefile Tue Oct 30 03:30:00 2012 (r242338) +++ stable/9/share/syscons/keymaps/Makefile Tue Oct 30 03:30:01 2012 (r242339) @@ -10,6 +10,7 @@ FILES= INDEX.keymaps \ cs.latin2.qwertz.kbd \ cz.iso2.kbd \ danish.iso.kbd danish.iso.acc.kbd danish.cp865.kbd \ + danish.iso.macbook.kbd \ dutch.iso.acc.kbd \ eee_nordic.kbd el.iso07.kbd \ estonian.iso.kbd estonian.iso15.kbd estonian.cp850.kbd \ Copied: stable/9/share/syscons/keymaps/danish.iso.macbook.kbd (from r241851, head/share/syscons/keymaps/danish.iso.macbook.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/syscons/keymaps/danish.iso.macbook.kbd Tue Oct 30 03:30:01 2012 (r242339, copy of r241851, head/share/syscons/keymaps/danish.iso.macbook.kbd) @@ -0,0 +1,117 @@ +# $FreeBSD$ +# Danish ISO 8859-1 keyboard layout for Apple MacBook keyboards. Not all +# key combinations are available in this character set yet. +# by Erik Cederstrand +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' '1' nop 161 175 '1' '1' O + 003 '2' '"' '2' '2' nop nop '2' '2' O + 004 '3' '#' '3' '3' 167 '$' '3' '3' O + 005 '4' nop '4' '4' 163 162 '4' '4' O + 006 '5' '%' '5' '5' nop nop '5' '5' O + 007 '6' '&' '6' '6' nop nop '6' '6' O + 008 '7' '/' '7' '7' 182 '\' '7' '7' O + 009 '8' '(' '8' '8' '[' '{' '8' '8' O + 010 '9' ')' '9' '9' ']' '}' '9' '9' O + 011 '0' '=' '0' '0' nop nop '0' '0' O + 012 '+' '?' '+' '+' 177 191 '+' '+' O + 013 dacu dgra dacu dacu ''' nop dacu dacu O + 014 bs del del bs del bs susp bs O + 015 ht btab ht ht ht btab ht ht O + 016 'q' 'Q' dc1 dc1 186 nop nop nop C + 017 'w' 'W' etb etb 'w' 176 nop nop C + 018 'e' 'E' enq enq 223 nop nop nop C + 019 'r' 'R' dc2 dc2 174 nop nop nop C + 020 't' 'T' dc4 dc4 nop nop nop nop C + 021 'y' 'Y' em em 165 255 nop nop C + 022 'u' 'U' nak nak 252 nop nop nop C + 023 'i' 'I' ht ht '|' nop nop nop C + 024 'o' 'O' si si nop nop nop nop C + 025 'p' 'P' dle dle nop nop nop nop C + 026 229 nop nop nop nop nop nop nop C + 027 168 '^' nop nop '~' '^' '~' '~' O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 170 nop nop nop C + 031 's' 'S' dc3 dc3 nop nop nop nop C + 032 'd' 'D' eot eot 240 nop nop nop C + 033 'f' 'F' ack ack nop nop nop nop C + 034 'g' 'G' bel bel 169 nop nop nop C + 035 'h' 'H' bs bs 171 187 nop nop C + 036 'j' 'J' nl nl nop nop nop nop C + 037 'k' 'K' vt vt nop nop nop nop C + 038 'l' 'L' ff ff 172 nop nop nop C + 039 230 nop nop nop 228 nop nop nop C + 040 248 nop nop nop 246 nop nop nop C + 041 '$' 167 '0' '0' nop ''' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 ''' '*' nop nop '@' nop nop nop O + 044 'z' 'Z' sub sub nop 184 nop nop C + 045 'x' 'X' can can nop nop nop nop C + 046 'c' 'C' etx etx 231 nop nop nop C + 047 'v' 'V' syn syn 'v' 'V' nop nop C + 048 'b' 'B' stx stx nop nop nop nop C + 049 'n' 'N' so so 241 nop nop nop C + 050 'm' 'M' cr cr 181 nop nop nop C + 051 ',' ';' ',' ',' ',' ';' ',' ',' O + 052 '.' ':' '.' '.' 183 247 '.' '.' O + 053 '-' '_' '-' '-' '-' nop '-' '-' O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 nlock fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 slock fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 '7' '7' '7' '7' '7' '7' '7' '7' N + 072 '8' '8' '8' '8' '8' '8' '8' '8' N + 073 '9' '9' '9' '9' '9' '9' '9' '9' N + 074 '-' '-' '-' '-' '-' '-' '-' '-' N + 075 '4' '4' '4' '4' '4' '4' '4' '4' N + 076 '5' '5' '5' '5' '5' '5' '5' '5' N + 077 '6' '6' '6' '6' '6' '6' '6' '6' N + 078 '+' '+' '+' '+' '+' '+' '+' '+' N + 079 '1' '1' '1' '1' '1' '1' '1' '1' N + 080 '2' '2' '2' '2' '2' '2' '2' '2' N + 081 '3' '3' '3' '3' '3' '3' '3' '3' N + 082 '0' '0' '0' '0' '0' '0' '0' '0' N + 083 ',' ',' ',' ',' ',' ',' ',' ',' N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' fs fs '\' '>' fs fs O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 73 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 81 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 79 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 71 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 del del del del del fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 30 04:06:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73C5F79B; Tue, 30 Oct 2012 04:06:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48AAA8FC0A; Tue, 30 Oct 2012 04:06:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9U46Dbh010799; Tue, 30 Oct 2012 04:06:13 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9U46DVB010794; Tue, 30 Oct 2012 04:06:13 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210300406.q9U46DVB010794@svn.freebsd.org> From: Eitan Adler Date: Tue, 30 Oct 2012 04:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242340 - in stable/9/sys/dev: e1000 ixgbe sound/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 04:06:13 -0000 Author: eadler Date: Tue Oct 30 04:06:12 2012 New Revision: 242340 URL: http://svn.freebsd.org/changeset/base/242340 Log: MFC r241917: Now that device disabling is generic, remove extraneous code from the device drivers that used to provide this feature. Approved by: cperciva (implicit) Modified: stable/9/sys/dev/e1000/if_lem.c stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c stable/9/sys/dev/sound/pci/emu10kx.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/e1000/if_lem.c ============================================================================== --- stable/9/sys/dev/e1000/if_lem.c Tue Oct 30 03:30:01 2012 (r242339) +++ stable/9/sys/dev/e1000/if_lem.c Tue Oct 30 04:06:12 2012 (r242340) @@ -391,11 +391,6 @@ lem_attach(device_t dev) INIT_DEBUGOUT("lem_attach: begin"); - if (resource_disabled("lem", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Tue Oct 30 03:30:01 2012 (r242339) +++ stable/9/sys/dev/ixgbe/ixgbe.c Tue Oct 30 04:06:12 2012 (r242340) @@ -399,11 +399,6 @@ ixgbe_attach(device_t dev) INIT_DEBUGOUT("ixgbe_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: stable/9/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixv.c Tue Oct 30 03:30:01 2012 (r242339) +++ stable/9/sys/dev/ixgbe/ixv.c Tue Oct 30 04:06:12 2012 (r242340) @@ -299,11 +299,6 @@ ixv_attach(device_t dev) INIT_DEBUGOUT("ixv_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: stable/9/sys/dev/sound/pci/emu10kx.c ============================================================================== --- stable/9/sys/dev/sound/pci/emu10kx.c Tue Oct 30 03:30:01 2012 (r242339) +++ stable/9/sys/dev/sound/pci/emu10kx.c Tue Oct 30 04:06:12 2012 (r242340) @@ -3050,11 +3050,6 @@ emu_pci_attach(device_t dev) sc = device_get_softc(dev); unit = device_get_unit(dev); - if (resource_disabled("emu10kx", unit)) { - device_printf(dev, "disabled by kernel hints\n"); - return (ENXIO); /* XXX to avoid unit reuse */ - } - /* Get configuration */ sc->ctx = device_get_sysctl_ctx(dev); From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 30 07:51:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8B08850; Tue, 30 Oct 2012 07:51:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A991B8FC0C; Tue, 30 Oct 2012 07:51:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9U7pIGx045588; Tue, 30 Oct 2012 07:51:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9U7pIjf045573; Tue, 30 Oct 2012 07:51:18 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210300751.q9U7pIjf045573@svn.freebsd.org> From: Dimitry Andric Date: Tue, 30 Oct 2012 07:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242347 - in stable/9: contrib/libstdc++/config/os/bsd/freebsd contrib/libstdc++/include/bits contrib/libstdc++/include/debug contrib/libstdc++/include/ext contrib/libstdc++/include/std... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 07:51:19 -0000 Author: dim Date: Tue Oct 30 07:51:18 2012 New Revision: 242347 URL: http://svn.freebsd.org/changeset/base/242347 Log: MFC r241957: Fix several clang warnings in libstdc++, which were exposed by the recent atf import. These changes are purely cosmetic, no functional change. MFC r241959: Fix a number of other clang warnings in libstdc++, which could appear when building other C++ software with it. Also fix one actual bug in libsupc++, which was exposed by such a warning. This latter fix is the only functional change. MFC r241960: For building GNU libstdc++ and libsupc++, filter out libc++-specific and -std= flags above c++98 or gnu++98 from CXXFLAGS *after* including bsd.lib.mk, otherwise some additions to CXXFLAGS done in bsd.*.mk might not be preserved. Modified: stable/9/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h stable/9/contrib/libstdc++/include/bits/fstream.tcc stable/9/contrib/libstdc++/include/bits/locale_facets.h stable/9/contrib/libstdc++/include/bits/locale_facets.tcc stable/9/contrib/libstdc++/include/bits/streambuf_iterator.h stable/9/contrib/libstdc++/include/debug/safe_iterator.tcc stable/9/contrib/libstdc++/include/ext/ropeimpl.h stable/9/contrib/libstdc++/include/std/std_sstream.h stable/9/contrib/libstdc++/libsupc++/tinfo.cc stable/9/contrib/libstdc++/src/locale.cc stable/9/contrib/libstdc++/src/strstream.cc stable/9/contrib/libstdc++/src/tree.cc stable/9/gnu/lib/libstdc++/Makefile stable/9/gnu/lib/libsupc++/Makefile Directory Properties: stable/9/contrib/libstdc++/ (props changed) stable/9/gnu/lib/libstdc++/ (props changed) stable/9/gnu/lib/libsupc++/ (props changed) Modified: stable/9/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h ============================================================================== --- stable/9/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h Tue Oct 30 07:51:18 2012 (r242347) @@ -38,8 +38,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /// @brief Base class for ctype. - struct ctype_base + class ctype_base { + public: // Non-standard typedefs. typedef const int* __to_type; Modified: stable/9/contrib/libstdc++/include/bits/fstream.tcc ============================================================================== --- stable/9/contrib/libstdc++/include/bits/fstream.tcc Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/include/bits/fstream.tcc Tue Oct 30 07:51:18 2012 (r242347) @@ -641,21 +641,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std) setbuf(char_type* __s, streamsize __n) { if (!this->is_open()) - if (__s == 0 && __n == 0) - _M_buf_size = 1; - else if (__s && __n > 0) - { - // This is implementation-defined behavior, and assumes that - // an external char_type array of length __n exists and has - // been pre-allocated. If this is not the case, things will - // quickly blow up. When __n > 1, __n - 1 positions will be - // used for the get area, __n - 1 for the put area and 1 - // position to host the overflow char of a full put area. - // When __n == 1, 1 position will be used for the get area - // and 0 for the put area, as in the unbuffered case above. - _M_buf = __s; - _M_buf_size = __n; - } + { + if (__s == 0 && __n == 0) + _M_buf_size = 1; + else if (__s && __n > 0) + { + // This is implementation-defined behavior, and assumes that + // an external char_type array of length __n exists and has + // been pre-allocated. If this is not the case, things will + // quickly blow up. When __n > 1, __n - 1 positions will be + // used for the get area, __n - 1 for the put area and 1 + // position to host the overflow char of a full put area. + // When __n == 1, 1 position will be used for the get area + // and 0 for the put area, as in the unbuffered case above. + _M_buf = __s; + _M_buf_size = __n; + } + } return this; } Modified: stable/9/contrib/libstdc++/include/bits/locale_facets.h ============================================================================== --- stable/9/contrib/libstdc++/include/bits/locale_facets.h Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/include/bits/locale_facets.h Tue Oct 30 07:51:18 2012 (r242347) @@ -4335,8 +4335,9 @@ _GLIBCXX_END_LDBL_NAMESPACE /** * @brief Messages facet base class providing catalog typedef. */ - struct messages_base + class messages_base { + public: typedef int catalog; }; Modified: stable/9/contrib/libstdc++/include/bits/locale_facets.tcc ============================================================================== --- stable/9/contrib/libstdc++/include/bits/locale_facets.tcc Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/include/bits/locale_facets.tcc Tue Oct 30 07:51:18 2012 (r242347) @@ -316,7 +316,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE int __sep_pos = 0; while (!__testeof) { - if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero]) @@ -558,7 +558,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE int __sep_pos = 0; while (!__testeof) { - if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero] @@ -748,16 +748,20 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE const char_type __c = *__beg; if (__testf) - if (__n < __lc->_M_falsename_size) - __testf = __c == __lc->_M_falsename[__n]; - else - break; + { + if (__n < __lc->_M_falsename_size) + __testf = __c == __lc->_M_falsename[__n]; + else + break; + } if (__testt) - if (__n < __lc->_M_truename_size) - __testt = __c == __lc->_M_truename[__n]; - else - break; + { + if (__n < __lc->_M_truename_size) + __testt = __c == __lc->_M_truename[__n]; + else + break; + } if (!__testf && !__testt) break; @@ -1387,9 +1391,9 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE == money_base::space))) || (__i == 2 && ((static_cast(__p.field[3]) == money_base::value) - || __mandatory_sign + || (__mandatory_sign && (static_cast(__p.field[3]) - == money_base::sign)))) + == money_base::sign))))) { const size_type __len = __lc->_M_curr_symbol_size; size_type __j = 0; Modified: stable/9/contrib/libstdc++/include/bits/streambuf_iterator.h ============================================================================== --- stable/9/contrib/libstdc++/include/bits/streambuf_iterator.h Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/include/bits/streambuf_iterator.h Tue Oct 30 07:51:18 2012 (r242347) @@ -160,7 +160,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { const bool __thiseof = _M_at_eof(); const bool __beof = __b._M_at_eof(); - return (__thiseof && __beof || (!__thiseof && !__beof)); + return ((__thiseof && __beof) || (!__thiseof && !__beof)); } private: Modified: stable/9/contrib/libstdc++/include/debug/safe_iterator.tcc ============================================================================== --- stable/9/contrib/libstdc++/include/debug/safe_iterator.tcc Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/include/debug/safe_iterator.tcc Tue Oct 30 07:51:18 2012 (r242347) @@ -54,8 +54,8 @@ namespace __gnu_debug static_cast(_M_sequence)->begin(); std::pair __dist = this->_M_get_distance(__begin, *this); - bool __ok = (__dist.second == __dp_exact && __dist.first >= -__n - || __dist.second != __dp_exact && __dist.first > 0); + bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n) + || (__dist.second != __dp_exact && __dist.first > 0)); return __ok; } else @@ -64,8 +64,8 @@ namespace __gnu_debug static_cast(_M_sequence)->end(); std::pair __dist = this->_M_get_distance(*this, __end); - bool __ok = (__dist.second == __dp_exact && __dist.first >= __n - || __dist.second != __dp_exact && __dist.first > 0); + bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n) + || (__dist.second != __dp_exact && __dist.first > 0)); return __ok; } } Modified: stable/9/contrib/libstdc++/include/ext/ropeimpl.h ============================================================================== --- stable/9/contrib/libstdc++/include/ext/ropeimpl.h Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/include/ext/ropeimpl.h Tue Oct 30 07:51:18 2012 (r242347) @@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } else { - char* __kind; + const char* __kind; switch (__r->_M_tag) { Modified: stable/9/contrib/libstdc++/include/std/std_sstream.h ============================================================================== --- stable/9/contrib/libstdc++/include/std/std_sstream.h Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/include/std/std_sstream.h Tue Oct 30 07:51:18 2012 (r242347) @@ -240,10 +240,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { const bool __testin = _M_mode & ios_base::in; if (this->pptr() && this->pptr() > this->egptr()) - if (__testin) - this->setg(this->eback(), this->gptr(), this->pptr()); - else - this->setg(this->pptr(), this->pptr(), this->pptr()); + { + if (__testin) + this->setg(this->eback(), this->gptr(), this->pptr()); + else + this->setg(this->pptr(), this->pptr(), this->pptr()); + } } }; Modified: stable/9/contrib/libstdc++/libsupc++/tinfo.cc ============================================================================== --- stable/9/contrib/libstdc++/libsupc++/tinfo.cc Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/libsupc++/tinfo.cc Tue Oct 30 07:51:18 2012 (r242347) @@ -499,9 +499,9 @@ __do_dyncast (ptrdiff_t src2dst, result.whole2dst = __sub_kind (result.whole2dst | result2.whole2dst); } - else if ((result.dst_ptr != 0 & result2.dst_ptr != 0) - || (result.dst_ptr != 0 & result2_ambig) - || (result2.dst_ptr != 0 & result_ambig)) + else if ((result.dst_ptr != 0 && result2.dst_ptr != 0) + || (result.dst_ptr != 0 && result2_ambig) + || (result2.dst_ptr != 0 && result_ambig)) { // Found two different DST_TYPE bases, or a valid one and a set of // ambiguous ones, must disambiguate. See whether SRC_PTR is Modified: stable/9/contrib/libstdc++/src/locale.cc ============================================================================== --- stable/9/contrib/libstdc++/src/locale.cc Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/src/locale.cc Tue Oct 30 07:51:18 2012 (r242347) @@ -146,7 +146,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) locale::_S_normalize_category(category __cat) { int __ret = 0; - if (__cat == none || (__cat & all) && !(__cat & ~all)) + if (__cat == none || ((__cat & all) && !(__cat & ~all))) __ret = __cat; else { Modified: stable/9/contrib/libstdc++/src/strstream.cc ============================================================================== --- stable/9/contrib/libstdc++/src/strstream.cc Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/src/strstream.cc Tue Oct 30 07:51:18 2012 (r242347) @@ -311,10 +311,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstreambuf::_M_free(char* p) { if (p) - if (_M_free_fun) - _M_free_fun(p); - else - delete[] p; + { + if (_M_free_fun) + _M_free_fun(p); + else + delete[] p; + } } void Modified: stable/9/contrib/libstdc++/src/tree.cc ============================================================================== --- stable/9/contrib/libstdc++/src/tree.cc Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/contrib/libstdc++/src/tree.cc Tue Oct 30 07:51:18 2012 (r242347) @@ -316,17 +316,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __z->_M_parent->_M_right = __x; if (__leftmost == __z) - if (__z->_M_right == 0) // __z->_M_left must be null also - __leftmost = __z->_M_parent; - // makes __leftmost == _M_header if __z == __root - else - __leftmost = _Rb_tree_node_base::_S_minimum(__x); + { + if (__z->_M_right == 0) // __z->_M_left must be null also + __leftmost = __z->_M_parent; + // makes __leftmost == _M_header if __z == __root + else + __leftmost = _Rb_tree_node_base::_S_minimum(__x); + } if (__rightmost == __z) - if (__z->_M_left == 0) // __z->_M_right must be null also - __rightmost = __z->_M_parent; - // makes __rightmost == _M_header if __z == __root - else // __x == __z->_M_left - __rightmost = _Rb_tree_node_base::_S_maximum(__x); + { + if (__z->_M_left == 0) // __z->_M_right must be null also + __rightmost = __z->_M_parent; + // makes __rightmost == _M_header if __z == __root + else // __x == __z->_M_left + __rightmost = _Rb_tree_node_base::_S_maximum(__x); + } } if (__y->_M_color != _S_red) { Modified: stable/9/gnu/lib/libstdc++/Makefile ============================================================================== --- stable/9/gnu/lib/libstdc++/Makefile Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/gnu/lib/libstdc++/Makefile Tue Oct 30 07:51:18 2012 (r242347) @@ -22,7 +22,6 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated -CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} DPADD= ${LIBM} @@ -626,3 +625,6 @@ ${VERSION_MAP}: ${SRCDIR}/config/abi/pre CLEANFILES+= ${VERSION_MAP} .include + +# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} Modified: stable/9/gnu/lib/libsupc++/Makefile ============================================================================== --- stable/9/gnu/lib/libsupc++/Makefile Tue Oct 30 06:36:14 2012 (r242346) +++ stable/9/gnu/lib/libsupc++/Makefile Tue Oct 30 07:51:18 2012 (r242347) @@ -24,7 +24,6 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections -CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h @@ -43,3 +42,6 @@ VERSION_MAP= ${.CURDIR}/Version.map .include + +# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 30 17:05:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E747F39; Tue, 30 Oct 2012 17:05:13 +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 E8BBC8FC16; Tue, 30 Oct 2012 17:05:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UH5CB5035427; Tue, 30 Oct 2012 17:05:12 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UH5CNS035422; Tue, 30 Oct 2012 17:05:12 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201210301705.q9UH5CNS035422@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 30 Oct 2012 17:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242365 - in stable/9: lib/libmemstat sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 17:05:13 -0000 Author: mdf Date: Tue Oct 30 17:05:12 2012 New Revision: 242365 URL: http://svn.freebsd.org/changeset/base/242365 Log: MFC r242152: Const-ify the zone name argument to uma_zcreate(9). Modified: stable/9/lib/libmemstat/memstat_uma.c stable/9/sys/vm/uma.h stable/9/sys/vm/uma_core.c stable/9/sys/vm/uma_int.h Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libmemstat/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/lib/libmemstat/memstat_uma.c ============================================================================== --- stable/9/lib/libmemstat/memstat_uma.c Tue Oct 30 16:56:16 2012 (r242364) +++ stable/9/lib/libmemstat/memstat_uma.c Tue Oct 30 17:05:12 2012 (r242365) @@ -254,7 +254,7 @@ kread(kvm_t *kvm, void *kvm_pointer, voi } static int -kread_string(kvm_t *kvm, void *kvm_pointer, char *buffer, int buflen) +kread_string(kvm_t *kvm, const void *kvm_pointer, char *buffer, int buflen) { ssize_t ret; int i; Modified: stable/9/sys/vm/uma.h ============================================================================== --- stable/9/sys/vm/uma.h Tue Oct 30 16:56:16 2012 (r242364) +++ stable/9/sys/vm/uma.h Tue Oct 30 17:05:12 2012 (r242365) @@ -165,9 +165,9 @@ typedef void (*uma_fini)(void *mem, int * A pointer to a structure which is intended to be opaque to users of * the interface. The value may be null if the wait flag is not set. */ -uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, - uma_init uminit, uma_fini fini, int align, - u_int32_t flags); +uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor, + uma_dtor dtor, uma_init uminit, uma_fini fini, + int align, u_int32_t flags); /* * Create a secondary uma zone Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Tue Oct 30 16:56:16 2012 (r242364) +++ stable/9/sys/vm/uma_core.c Tue Oct 30 17:05:12 2012 (r242365) @@ -153,7 +153,7 @@ static struct callout uma_callout; * a special allocation function just for zones. */ struct uma_zctor_args { - char *name; + const char *name; size_t size; uma_ctor ctor; uma_dtor dtor; @@ -1821,7 +1821,7 @@ uma_set_align(int align) /* See uma.h */ uma_zone_t -uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, +uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor, uma_init uminit, uma_fini fini, int align, u_int32_t flags) { Modified: stable/9/sys/vm/uma_int.h ============================================================================== --- stable/9/sys/vm/uma_int.h Tue Oct 30 16:56:16 2012 (r242364) +++ stable/9/sys/vm/uma_int.h Tue Oct 30 17:05:12 2012 (r242365) @@ -202,7 +202,7 @@ struct uma_keg { struct mtx uk_lock; /* Lock for the keg */ struct uma_hash uk_hash; - char *uk_name; /* Name of creating zone. */ + const char *uk_name; /* Name of creating zone. */ LIST_HEAD(,uma_zone) uk_zones; /* Keg's zones */ LIST_HEAD(,uma_slab) uk_part_slab; /* partially allocated slabs */ LIST_HEAD(,uma_slab) uk_free_slab; /* empty slab list */ @@ -305,7 +305,7 @@ typedef struct uma_klink *uma_klink_t; * */ struct uma_zone { - char *uz_name; /* Text name of the zone */ + const char *uz_name; /* Text name of the zone */ struct mtx *uz_lock; /* Lock for the zone (keg's lock) */ LIST_ENTRY(uma_zone) uz_link; /* List of all zones in keg */ From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 30 17:24:27 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D9E9A82; Tue, 30 Oct 2012 17:24:27 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFA2C8FC0A; Tue, 30 Oct 2012 17:24:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UHOQIe038733; Tue, 30 Oct 2012 17:24:26 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UHOQEK038730; Tue, 30 Oct 2012 17:24:26 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201210301724.q9UHOQEK038730@svn.freebsd.org> From: Alfred Perlstein Date: Tue, 30 Oct 2012 17:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242368 - stable/9/sys/fs/tmpfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 17:24:27 -0000 Author: alfred Date: Tue Oct 30 17:24:26 2012 New Revision: 242368 URL: http://svn.freebsd.org/changeset/base/242368 Log: MFC: Allow NFS exports of tmpfs. r234346 Approved by: kevlo, kib Modified: stable/9/sys/fs/tmpfs/tmpfs.h stable/9/sys/fs/tmpfs/tmpfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs.h Tue Oct 30 17:05:47 2012 (r242367) +++ stable/9/sys/fs/tmpfs/tmpfs.h Tue Oct 30 17:24:26 2012 (r242368) @@ -387,6 +387,9 @@ struct tmpfs_mount { * tmpfs_pool.c. */ uma_zone_t tm_dirent_pool; uma_zone_t tm_node_pool; + + /* Read-only status. */ + int tm_ronly; }; #define TMPFS_LOCK(tm) mtx_lock(&(tm)->allnode_lock) #define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->allnode_lock) Modified: stable/9/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs_vfsops.c Tue Oct 30 17:05:47 2012 (r242367) +++ stable/9/sys/fs/tmpfs/tmpfs_vfsops.c Tue Oct 30 17:24:26 2012 (r242368) @@ -82,6 +82,10 @@ static const char *tmpfs_opts[] = { NULL }; +static const char *tmpfs_updateopts[] = { + "from", "export", NULL +}; + /* --------------------------------------------------------------------- */ static int @@ -193,10 +197,13 @@ tmpfs_mount(struct mount *mp) return (EINVAL); if (mp->mnt_flag & MNT_UPDATE) { - /* XXX: There is no support yet to update file system - * settings. Should be added. */ - - return EOPNOTSUPP; + /* Only support update mounts for certain options. */ + if (vfs_filteropt(mp->mnt_optnew, tmpfs_updateopts) != 0) + return (EOPNOTSUPP); + if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) != + ((struct tmpfs_mount *)mp->mnt_data)->tm_ronly) + return (EOPNOTSUPP); + return (0); } vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY); @@ -269,6 +276,7 @@ tmpfs_mount(struct mount *mp) tmpfs_node_ctor, tmpfs_node_dtor, tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0); + tmp->tm_ronly = (mp->mnt_flag & MNT_RDONLY) != 0; /* Allocate the root node. */ error = tmpfs_alloc_node(tmp, VDIR, root_uid, From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 30 19:21:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D0CA594; Tue, 30 Oct 2012 19:21:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64AFC8FC08; Tue, 30 Oct 2012 19:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UJLsIW057313; Tue, 30 Oct 2012 19:21:54 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UJLspu057311; Tue, 30 Oct 2012 19:21:54 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210301921.q9UJLspu057311@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 30 Oct 2012 19:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242369 - stable/9/sys/dev/cxgb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 19:21:54 -0000 Author: np Date: Tue Oct 30 19:21:53 2012 New Revision: 242369 URL: http://svn.freebsd.org/changeset/base/242369 Log: MFC r242087: Initialize the response queue mutex a bit earlier to avoid a panic that occurs if t3_sge_alloc_qset fails and then t3_free_qset attempts to destroy an uninitialized mutex. Modified: stable/9/sys/dev/cxgb/cxgb_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_sge.c Tue Oct 30 17:24:26 2012 (r242368) +++ stable/9/sys/dev/cxgb/cxgb_sge.c Tue Oct 30 19:21:53 2012 (r242369) @@ -2473,6 +2473,10 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i goto err; } + snprintf(q->rspq.lockbuf, RSPQ_NAME_LEN, "t3 rspq lock %d:%d", + device_get_unit(sc->dev), irq_vec_idx); + MTX_INIT(&q->rspq.lock, q->rspq.lockbuf, NULL, MTX_DEF); + for (i = 0; i < ntxq; ++i) { size_t sz = i == TXQ_CTRL ? 0 : sizeof(struct tx_sw_desc); @@ -2590,11 +2594,7 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i goto err_unlock; } } - - snprintf(q->rspq.lockbuf, RSPQ_NAME_LEN, "t3 rspq lock %d:%d", - device_get_unit(sc->dev), irq_vec_idx); - MTX_INIT(&q->rspq.lock, q->rspq.lockbuf, NULL, MTX_DEF); - + mtx_unlock_spin(&sc->sge.reg_lock); t3_update_qset_coalesce(q, p); From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 30 21:04:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85ED5CD2; Tue, 30 Oct 2012 21:04:13 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535BD8FC14; Tue, 30 Oct 2012 21:04:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UL4DJq075548; Tue, 30 Oct 2012 21:04:13 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UL4DTZ075546; Tue, 30 Oct 2012 21:04:13 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201210302104.q9UL4DTZ075546@svn.freebsd.org> From: Andrey Zonov Date: Tue, 30 Oct 2012 21:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242375 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 21:04:13 -0000 Author: zont Date: Tue Oct 30 21:04:12 2012 New Revision: 242375 URL: http://svn.freebsd.org/changeset/base/242375 Log: MFC r241735: - Update cachelimit after hashsize and bucketlimit were set. Approved by: kib (mentor) Modified: stable/9/sys/netinet/tcp_hostcache.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/9/sys/netinet/tcp_hostcache.c Tue Oct 30 21:00:46 2012 (r242374) +++ stable/9/sys/netinet/tcp_hostcache.c Tue Oct 30 21:04:12 2012 (r242375) @@ -174,6 +174,7 @@ static MALLOC_DEFINE(M_HOSTCACHE, "hostc void tcp_hc_init(void) { + u_int cache_limit; int i; /* @@ -182,23 +183,27 @@ tcp_hc_init(void) V_tcp_hostcache.cache_count = 0; V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; - V_tcp_hostcache.cache_limit = - V_tcp_hostcache.hashsize * V_tcp_hostcache.bucket_limit; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; V_tcp_hostcache.prune = TCP_HOSTCACHE_PRUNE; TUNABLE_INT_FETCH("net.inet.tcp.hostcache.hashsize", &V_tcp_hostcache.hashsize); - TUNABLE_INT_FETCH("net.inet.tcp.hostcache.cachelimit", - &V_tcp_hostcache.cache_limit); - TUNABLE_INT_FETCH("net.inet.tcp.hostcache.bucketlimit", - &V_tcp_hostcache.bucket_limit); if (!powerof2(V_tcp_hostcache.hashsize)) { printf("WARNING: hostcache hash size is not a power of 2.\n"); V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; /* default */ } V_tcp_hostcache.hashmask = V_tcp_hostcache.hashsize - 1; + TUNABLE_INT_FETCH("net.inet.tcp.hostcache.bucketlimit", + &V_tcp_hostcache.bucket_limit); + + cache_limit = V_tcp_hostcache.hashsize * V_tcp_hostcache.bucket_limit; + V_tcp_hostcache.cache_limit = cache_limit; + TUNABLE_INT_FETCH("net.inet.tcp.hostcache.cachelimit", + &V_tcp_hostcache.cache_limit); + if (V_tcp_hostcache.cache_limit > cache_limit) + V_tcp_hostcache.cache_limit = cache_limit; + /* * Allocate the hash table. */ From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 31 04:07:52 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4386DC5; Wed, 31 Oct 2012 04:07:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BD6E8FC12; Wed, 31 Oct 2012 04:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9V47qKF044247; Wed, 31 Oct 2012 04:07:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9V47qtf044245; Wed, 31 Oct 2012 04:07:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201210310407.q9V47qtf044245@svn.freebsd.org> From: Glen Barber Date: Wed, 31 Oct 2012 04:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242388 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 04:07:52 -0000 Author: gjb (doc,ports committer) Date: Wed Oct 31 04:07:52 2012 New Revision: 242388 URL: http://svn.freebsd.org/changeset/base/242388 Log: MFC r241451, r241596: r241451 (emaste): - Exclude potential circular symlink when creating src tarball. - Normal release builds are not affected by this but it can happen if using these release bits against a work tree. r241596 (emaste): - Exclude potential circular symlink - This does not occur with normal release builds but can happen when reusing these release parts for other purposes. Approved by: emaste Modified: stable/9/release/Makefile Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Wed Oct 31 03:55:33 2012 (r242387) +++ stable/9/release/Makefile Wed Oct 31 04:07:52 2012 (r242388) @@ -81,7 +81,7 @@ src.txz: -mkdir -p ${DISTDIR}/usr ln -fs ${WORLDDIR} ${DISTDIR}/usr/src cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn \ - --exclude CVS usr/src + --exclude CVS --exclude @ --exclude usr/src/release/dist usr/src ports.txz: -mkdir -p ${DISTDIR}/usr From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 31 07:57:49 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8F43482; Wed, 31 Oct 2012 07:57:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 933168FC15; Wed, 31 Oct 2012 07:57:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9V7vnSA084555; Wed, 31 Oct 2012 07:57:49 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9V7vnY7084552; Wed, 31 Oct 2012 07:57:49 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210310757.q9V7vnY7084552@svn.freebsd.org> From: Dimitry Andric Date: Wed, 31 Oct 2012 07:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242393 - stable/9/contrib/llvm/lib/Analysis X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 07:57:50 -0000 Author: dim Date: Wed Oct 31 07:57:49 2012 New Revision: 242393 URL: http://svn.freebsd.org/changeset/base/242393 Log: MFC r242007: Pull in r165367 from upstream llvm trunk: Make sure always-inline functions get inlined. Without this change, when the estimated cost for inlining a function with an "alwaysinline" attribute was lower than the inlining threshold, the getInlineCost function was returning that estimated cost rather than the special InlineCost::AlwaysInlineCost value. That is fine in the normal inlining case, but it can fail when the inliner considers the opportunity cost of inlining into an internal or linkonce-odr function. It may decide not to inline the always-inline function in that case. The fix here is just to make getInlineCost always return the special value for always-inline functions. I ran into this building clang with libc++. Tablegen failed to link because of an always-inline function that was not inlined. I have been unable to reduce the testcase down to a reasonable size. This should fix the link errors that were reported when atf-run was compiled with clang -stdlib=libc++. In this case, at -O3 optimization, some calls to basic_ios::clear() were not inlined, even when the function was marked __always_inline__. Reported by: Jan Beich Modified: stable/9/contrib/llvm/lib/Analysis/InlineCost.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/Analysis/InlineCost.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Analysis/InlineCost.cpp Wed Oct 31 06:35:50 2012 (r242392) +++ stable/9/contrib/llvm/lib/Analysis/InlineCost.cpp Wed Oct 31 07:57:49 2012 (r242393) @@ -138,6 +138,7 @@ public: int getThreshold() { return Threshold; } int getCost() { return Cost; } + bool isAlwaysInline() { return AlwaysInline; } // Keep a bunch of stats about the cost savings found so we can print them // out when debugging. @@ -1015,7 +1016,8 @@ InlineCost InlineCostAnalyzer::getInline // Check if there was a reason to force inlining or no inlining. if (!ShouldInline && CA.getCost() < CA.getThreshold()) return InlineCost::getNever(); - if (ShouldInline && CA.getCost() >= CA.getThreshold()) + if (ShouldInline && (CA.isAlwaysInline() || + CA.getCost() >= CA.getThreshold())) return InlineCost::getAlways(); return llvm::InlineCost::get(CA.getCost(), CA.getThreshold()); From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 31 14:02:51 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8768F75; Wed, 31 Oct 2012 14:02:51 +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 A0CB68FC08; Wed, 31 Oct 2012 14:02:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9VE2pER056894; Wed, 31 Oct 2012 14:02:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9VE2pMM056891; Wed, 31 Oct 2012 14:02:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210311402.q9VE2pMM056891@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 31 Oct 2012 14:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242397 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 14:02:51 -0000 Author: kib Date: Wed Oct 31 14:02:51 2012 New Revision: 242397 URL: http://svn.freebsd.org/changeset/base/242397 Log: MFC r242011: Dirty the newly copied anonymous pages after the wired region is forked. Otherwise, pagedaemon might reclaim the page without saving its content into the swap file, resulting in the valid content replaced by zeroes. MFC r242012: Commit the actual text provided by Alan, instead of the wrong update in r242011. Modified: stable/9/sys/vm/vm_fault.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_fault.c ============================================================================== --- stable/9/sys/vm/vm_fault.c Wed Oct 31 13:52:03 2012 (r242396) +++ stable/9/sys/vm/vm_fault.c Wed Oct 31 14:02:51 2012 (r242397) @@ -1308,9 +1308,13 @@ vm_fault_copy_entry(vm_map_t dst_map, vm access &= ~VM_PROT_WRITE; /* - * Loop through all of the pages in the entry's range, copying each - * one from the source object (it should be there) to the destination - * object. + * Loop through all of the virtual pages within the entry's + * range, copying each page from the source object to the + * destination object. Since the source is wired, those pages + * must exist. In contrast, the destination is pageable. + * Since the destination object does share any backing storage + * with the source object, all of its pages must be dirtied, + * regardless of whether they can be written. */ for (vaddr = dst_entry->start, dst_pindex = 0; vaddr < dst_entry->end; @@ -1353,6 +1357,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm pmap_copy_page(src_m, dst_m); VM_OBJECT_UNLOCK(object); dst_m->valid = VM_PAGE_BITS_ALL; + dst_m->dirty = VM_PAGE_BITS_ALL; VM_OBJECT_UNLOCK(dst_object); /* From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 31 21:21:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5E0BB3E; Wed, 31 Oct 2012 21:21:08 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 840588FC08; Wed, 31 Oct 2012 21:21:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9VLL8PG033391; Wed, 31 Oct 2012 21:21:08 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9VLL8Eg033385; Wed, 31 Oct 2012 21:21:08 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201210312121.q9VLL8Eg033385@svn.freebsd.org> From: Sean Bruno Date: Wed, 31 Oct 2012 21:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242413 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 21:21:08 -0000 Author: sbruno Date: Wed Oct 31 21:21:08 2012 New Revision: 242413 URL: http://svn.freebsd.org/changeset/base/242413 Log: man4 MFC r227652 and r230450 man pages were missed in the MFC of virtio(4) to stable/9 r233648 needs to be applied as well as r241470 Added: stable/9/share/man/man4/virtio.4 - copied, changed from r227652, head/share/man/man4/virtio.4 stable/9/share/man/man4/virtio_balloon.4 - copied, changed from r227652, head/share/man/man4/virtio_balloon.4 stable/9/share/man/man4/virtio_blk.4 - copied, changed from r227652, head/share/man/man4/virtio_blk.4 stable/9/share/man/man4/vtnet.4 - copied, changed from r227652, head/share/man/man4/vtnet.4 Modified: Directory Properties: stable/9/share/man/man4/ (props changed) Copied and modified: stable/9/share/man/man4/virtio.4 (from r227652, head/share/man/man4/virtio.4) ============================================================================== --- head/share/man/man4/virtio.4 Fri Nov 18 05:43:43 2011 (r227652, copy source) +++ stable/9/share/man/man4/virtio.4 Wed Oct 31 21:21:08 2012 (r242413) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2011 +.Dd January 22, 2012 .Dt VIRTIO 4 .Os .Sh NAME @@ -48,24 +48,25 @@ virtio_pci_load="YES" .Sh DESCRIPTION VirtIO is a specification for para-virtualized I/O in a virtual machine (VM). Traditionally, the hypervisor emulated real devices such as an Ethernet -interface or disk controller to provide the VM with I/O. This emulation is -often inefficient. +interface or disk controller to provide the VM with I/O. +This emulation is often inefficient. .Pp VirtIO defines an interface for efficient I/O between the hypervisor and VM. -The -.Xr virtio 4 +The +.Xr virtio 4 module provides a shared memory transport called a virtqueue. The .Xr virtio_pci 4 device driver represents an emulated PCI device that the hypervisor makes -available to the VM. This device provides the probing, configuration, and -interrupt notifications need to interact with the hypervisor. +available to the VM. +This device provides the probing, configuration, and +interrupt notifications needed to interact with the hypervisor. .Fx supports the following VirtIO devices: .Bl -hang -offset indent -width xxxxxxxx .It Nm Ethernet An emulated Ethernet device is provided by the -.Xr if_vtnet 4 +.Xr vtnet 4 device driver. .It Nm Block An emulated disk controller is provided by the @@ -78,9 +79,9 @@ provided by the device driver. .El .Sh SEE ALSO -.Xr if_vtnet 4 , +.Xr virtio_balloon 4 , .Xr virtio_blk 4 , -.Xr virtio_balloon 4 +.Xr vtnet 4 .Sh HISTORY Support for VirtIO first appeared in .Fx 9.0 . Copied and modified: stable/9/share/man/man4/virtio_balloon.4 (from r227652, head/share/man/man4/virtio_balloon.4) ============================================================================== --- head/share/man/man4/virtio_balloon.4 Fri Nov 18 05:43:43 2011 (r227652, copy source) +++ stable/9/share/man/man4/virtio_balloon.4 Wed Oct 31 21:21:08 2012 (r242413) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2011 +.Dd January 22, 2012 .Dt VIRTIO_BALLOON 4 .Os .Sh NAME @@ -51,8 +51,8 @@ device driver provides support for VirtI .Pp The memory balloon allows the guest to, at the request of the hypervisor, return memory allocated to the hypervisor so it can -be made available to other guests. The hypervisor can later -signal the balloon to return the memory. +be made available to other guests. +The hypervisor can later signal the balloon to return the memory. .Sh SEE ALSO .Xr virtio 4 .Sh HISTORY Copied and modified: stable/9/share/man/man4/virtio_blk.4 (from r227652, head/share/man/man4/virtio_blk.4) ============================================================================== --- head/share/man/man4/virtio_blk.4 Fri Nov 18 05:43:43 2011 (r227652, copy source) +++ stable/9/share/man/man4/virtio_blk.4 Wed Oct 31 21:21:08 2012 (r242413) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2011 +.Dd January 22, 2012 .Dt VIRTIO_BLK 4 .Os .Sh NAME @@ -48,7 +48,6 @@ virtio_blk_load="YES" The .Nm device driver provides support for VirtIO block devices. -.Pp .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -57,7 +56,8 @@ prompt before booting the kernel or stor .Bl -tag -width "xxxxxx" .It Va hw.vtblk.no_ident This tunable disables retrieving the device identification string -from the hypervisor. The default value is 0. +from the hypervisor. +The default value is 0. .El .Sh SEE ALSO .Xr virtio 4 Copied and modified: stable/9/share/man/man4/vtnet.4 (from r227652, head/share/man/man4/vtnet.4) ============================================================================== --- head/share/man/man4/vtnet.4 Fri Nov 18 05:43:43 2011 (r227652, copy source) +++ stable/9/share/man/man4/vtnet.4 Wed Oct 31 21:21:08 2012 (r242413) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2011 +.Dd January 22, 2012 .Dt VTNET 4 .Os .Sh NAME @@ -62,7 +62,6 @@ utility configures the adapter to receiv .Pp For more information on configuring this device, see .Xr ifconfig 8 . -.El .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -70,19 +69,21 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width "xxxxxx" .It Va hw.vtnet.csum_disable -This tunable disables receive and send checksum offload. The default -value is 0. +This tunable disables receive and send checksum offload. +The default value is 0. .It Va hw.vtnet.tso_disable -This tunable disables TSO. The default value is 0. +This tunable disables TSO. +The default value is 0. .It Va hw.vtnet.lro_disable -This tunable disables LRO. The default value is 0. +This tunable disables LRO. +The default value is 0. .El .Sh SEE ALSO .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , -.Xr vlan 4 , .Xr virtio 4 , +.Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 1 20:46:49 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06C407D2; Thu, 1 Nov 2012 20:46:49 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E14988FC16; Thu, 1 Nov 2012 20:46:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA1Kkmuw073217; Thu, 1 Nov 2012 20:46:48 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA1KkmtS073215; Thu, 1 Nov 2012 20:46:48 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201211012046.qA1KkmtS073215@svn.freebsd.org> From: Jim Harris Date: Thu, 1 Nov 2012 20:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242456 - stable/9/usr.sbin/pciconf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2012 20:46:49 -0000 Author: jimharris Date: Thu Nov 1 20:46:48 2012 New Revision: 242456 URL: http://svn.freebsd.org/changeset/base/242456 Log: MFC r242085: For PCI Express capability, if max link width is greater than zero, print the current and max link speed. Sponsored by: Intel Modified: stable/9/usr.sbin/pciconf/cap.c Directory Properties: stable/9/usr.sbin/pciconf/ (props changed) Modified: stable/9/usr.sbin/pciconf/cap.c ============================================================================== --- stable/9/usr.sbin/pciconf/cap.c Thu Nov 1 20:43:23 2012 (r242455) +++ stable/9/usr.sbin/pciconf/cap.c Thu Nov 1 20:46:48 2012 (r242456) @@ -363,6 +363,22 @@ cap_subvendor(int fd, struct pci_conf *p #define MAX_PAYLOAD(field) (128 << (field)) +static const char * +link_speed_string(uint8_t speed) +{ + + switch (speed) { + case 1: + return ("2.5"); + case 2: + return ("5.0"); + case 3: + return ("8.0"); + default: + return ("undef"); + } +} + static void cap_express(int fd, struct pci_conf *p, uint8_t ptr) { @@ -416,6 +432,16 @@ cap_express(int fd, struct pci_conf *p, flags = read_config(fd, &p->pc_sel, ptr+ PCIER_LINK_STA, 2); printf(" link x%d(x%d)", (flags & PCIEM_LINK_STA_WIDTH) >> 4, (val & PCIEM_LINK_CAP_MAX_WIDTH) >> 4); + /* + * Only print link speed info if the link's max width is + * greater than 0. + */ + if ((val & PCIEM_LINK_CAP_MAX_WIDTH) != 0) { + printf("\n speed"); + printf(" %s(%s)", (flags & PCIEM_LINK_STA_WIDTH) == 0 ? + "0.0" : link_speed_string(flags & PCIEM_LINK_STA_SPEED), + link_speed_string(val & PCIEM_LINK_CAP_MAX_SPEED)); + } } static void From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 2 14:16:10 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92A5AF22; Fri, 2 Nov 2012 14:16:10 +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 786188FC17; Fri, 2 Nov 2012 14:16:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA2EGAho037101; Fri, 2 Nov 2012 14:16:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA2EGAWN037096; Fri, 2 Nov 2012 14:16:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211021416.qA2EGAWN037096@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Nov 2012 14:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242477 - in stable/9/contrib/gcc/config: arm i386 sparc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 14:16:10 -0000 Author: kib Date: Fri Nov 2 14:16:09 2012 New Revision: 242477 URL: http://svn.freebsd.org/changeset/base/242477 Log: MFC r236137: Enable gnu hash generation for dynamic ELF binaries on x86. MFC r236329 (by marius): Merge r236137 from x86: Enable GNU hash generation for dynamic ELF binaries. While at it, sync the order of options with x86 and pass along the verbose flag. MFC r237099 (by marius): Merge r236137 from x86: Enable GNU hash generation for dynamic ELF binaries. MFC discussed with: kan (some time ago) Modified: stable/9/contrib/gcc/config/arm/freebsd.h stable/9/contrib/gcc/config/i386/freebsd.h stable/9/contrib/gcc/config/i386/freebsd64.h stable/9/contrib/gcc/config/sparc/freebsd.h Directory Properties: stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/config/arm/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/arm/freebsd.h Fri Nov 2 13:56:36 2012 (r242476) +++ stable/9/contrib/gcc/config/arm/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) @@ -50,6 +50,7 @@ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ + %{!static:--hash-style=both} \ %{symbolic:-Bsymbolic} \ -X %{mbig-endian:-EB} %{mlittle-endian:-EL}" Modified: stable/9/contrib/gcc/config/i386/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/i386/freebsd.h Fri Nov 2 13:56:36 2012 (r242476) +++ stable/9/contrib/gcc/config/i386/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) @@ -49,6 +49,7 @@ Boston, MA 02110-1301, USA. */ %{rdynamic: -export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ + %{!static:--hash-style=both} \ %{symbolic:-Bsymbolic}" /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h Modified: stable/9/contrib/gcc/config/i386/freebsd64.h ============================================================================== --- stable/9/contrib/gcc/config/i386/freebsd64.h Fri Nov 2 13:56:36 2012 (r242476) +++ stable/9/contrib/gcc/config/i386/freebsd64.h Fri Nov 2 14:16:09 2012 (r242477) @@ -54,4 +54,5 @@ Boston, MA 02110-1301, USA. */ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ + %{!static:--hash-style=both} \ %{symbolic:-Bsymbolic}" Modified: stable/9/contrib/gcc/config/sparc/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/sparc/freebsd.h Fri Nov 2 13:56:36 2012 (r242476) +++ stable/9/contrib/gcc/config/sparc/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) @@ -45,14 +45,16 @@ Boston, MA 02110-1301, USA. */ #define LINK_SPEC "%(link_arch) \ %{!mno-relax:%{!r:-relax}} \ %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ + %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ - %{symbolic:-Bsymbolic} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ - %{static:-Bstatic}}" + %{static:-Bstatic}} \ + %{!static:--hash-style=both} \ + %{symbolic:-Bsymbolic}" /************************[ Target stuff ]***********************************/ From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 2 14:18:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2A58142; Fri, 2 Nov 2012 14:18:31 +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 8FA478FC0A; Fri, 2 Nov 2012 14:18:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA2EIVxR037507; Fri, 2 Nov 2012 14:18:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA2EIVAj037499; Fri, 2 Nov 2012 14:18:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211021418.qA2EIVAj037499@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Nov 2012 14:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242478 - in stable/9/contrib/gcc/config: arm i386 ia64 mips rs6000 sparc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 14:18:31 -0000 Author: kib Date: Fri Nov 2 14:18:30 2012 New Revision: 242478 URL: http://svn.freebsd.org/changeset/base/242478 Log: MFC r238472: Pass --enable-new-dtags to the linker invocation by default. If desired, one can turn off the generation of post-ELF standard dtags by overriding it with --disable-new-dtags after the default switch. Immediate effect of the change is that -rpath path is now stored both in DT_RPATH and DT_RUNPATH tags, which is the right way to provide rpath for dynamic linker supporting DT_RUNPATH per specification. Note that rtld on stable/9 interprets DT_RPATH the same as DT_RUNPATH by default. MFC discussed with: kan (some time ago) Modified: stable/9/contrib/gcc/config/arm/freebsd.h stable/9/contrib/gcc/config/i386/freebsd.h stable/9/contrib/gcc/config/i386/freebsd64.h stable/9/contrib/gcc/config/ia64/freebsd.h stable/9/contrib/gcc/config/mips/freebsd.h stable/9/contrib/gcc/config/rs6000/freebsd.h stable/9/contrib/gcc/config/sparc/freebsd.h Directory Properties: stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/config/arm/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/arm/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) +++ stable/9/contrib/gcc/config/arm/freebsd.h Fri Nov 2 14:18:30 2012 (r242478) @@ -50,7 +50,7 @@ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ - %{!static:--hash-style=both} \ + %{!static:--hash-style=both --enable-new-dtags} \ %{symbolic:-Bsymbolic} \ -X %{mbig-endian:-EB} %{mlittle-endian:-EL}" Modified: stable/9/contrib/gcc/config/i386/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/i386/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) +++ stable/9/contrib/gcc/config/i386/freebsd.h Fri Nov 2 14:18:30 2012 (r242478) @@ -49,7 +49,7 @@ Boston, MA 02110-1301, USA. */ %{rdynamic: -export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ - %{!static:--hash-style=both} \ + %{!static:--hash-style=both --enable-new-dtags} \ %{symbolic:-Bsymbolic}" /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h Modified: stable/9/contrib/gcc/config/i386/freebsd64.h ============================================================================== --- stable/9/contrib/gcc/config/i386/freebsd64.h Fri Nov 2 14:16:09 2012 (r242477) +++ stable/9/contrib/gcc/config/i386/freebsd64.h Fri Nov 2 14:18:30 2012 (r242478) @@ -54,5 +54,5 @@ Boston, MA 02110-1301, USA. */ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ - %{!static:--hash-style=both} \ + %{!static:--hash-style=both --enable-new-dtags} \ %{symbolic:-Bsymbolic}" Modified: stable/9/contrib/gcc/config/ia64/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/ia64/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) +++ stable/9/contrib/gcc/config/ia64/freebsd.h Fri Nov 2 14:18:30 2012 (r242478) @@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */ %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ + %{!static:--enable-new-dtags} \ %{symbolic:-Bsymbolic} \ %{!shared: \ %{!static: \ Modified: stable/9/contrib/gcc/config/mips/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/mips/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) +++ stable/9/contrib/gcc/config/mips/freebsd.h Fri Nov 2 14:18:30 2012 (r242478) @@ -56,6 +56,7 @@ Boston, MA 02110-1301, USA. */ %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ + %{!static:--enable-new-dtags} \ %{!shared: \ %{!static: \ %{rdynamic: -export-dynamic} \ Modified: stable/9/contrib/gcc/config/rs6000/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/rs6000/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) +++ stable/9/contrib/gcc/config/rs6000/freebsd.h Fri Nov 2 14:18:30 2012 (r242478) @@ -180,6 +180,7 @@ extern int dot_symbols; %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ + %{!static:--enable-new-dtags} \ %{!shared: \ %{!static: \ %{rdynamic: -export-dynamic} \ Modified: stable/9/contrib/gcc/config/sparc/freebsd.h ============================================================================== --- stable/9/contrib/gcc/config/sparc/freebsd.h Fri Nov 2 14:16:09 2012 (r242477) +++ stable/9/contrib/gcc/config/sparc/freebsd.h Fri Nov 2 14:18:30 2012 (r242478) @@ -53,7 +53,7 @@ Boston, MA 02110-1301, USA. */ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ - %{!static:--hash-style=both} \ + %{!static:--hash-style=both --enable-new-dtags} \ %{symbolic:-Bsymbolic}" From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 2 16:54:12 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C92BBE03; Fri, 2 Nov 2012 16:54: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 AC3828FC08; Fri, 2 Nov 2012 16:54:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA2GsCNG062978; Fri, 2 Nov 2012 16:54:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA2GsCG1062970; Fri, 2 Nov 2012 16:54:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201211021654.qA2GsCG1062970@svn.freebsd.org> From: Xin LI Date: Fri, 2 Nov 2012 16:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242484 - in stable/9: contrib/libpcap contrib/libpcap/net contrib/libpcap/packaging contrib/libpcap/pcap contrib/libpcap/test contrib/libpcap/tests lib/libpcap sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 16:54:12 -0000 Author: delphij Date: Fri Nov 2 16:54:12 2012 New Revision: 242484 URL: http://svn.freebsd.org/changeset/base/242484 Log: MFC r241231: MFV: libpcap 1.3.0. Added: stable/9/contrib/libpcap/pcap-canusb-linux.c - copied unchanged from r241231, head/contrib/libpcap/pcap-canusb-linux.c stable/9/contrib/libpcap/pcap-canusb-linux.h - copied unchanged from r241231, head/contrib/libpcap/pcap-canusb-linux.h stable/9/contrib/libpcap/tests/ - copied from r241231, head/contrib/libpcap/tests/ Deleted: stable/9/contrib/libpcap/net/ stable/9/contrib/libpcap/test/ Modified: stable/9/contrib/libpcap/CHANGES stable/9/contrib/libpcap/CREDITS stable/9/contrib/libpcap/Makefile.in stable/9/contrib/libpcap/VERSION stable/9/contrib/libpcap/config.h.in stable/9/contrib/libpcap/configure stable/9/contrib/libpcap/configure.in stable/9/contrib/libpcap/gencode.c stable/9/contrib/libpcap/gencode.h stable/9/contrib/libpcap/optimize.c stable/9/contrib/libpcap/packaging/pcap.spec.in stable/9/contrib/libpcap/pcap-bpf.c stable/9/contrib/libpcap/pcap-common.c stable/9/contrib/libpcap/pcap-linux.c stable/9/contrib/libpcap/pcap-netfilter-linux.c stable/9/contrib/libpcap/pcap.c stable/9/contrib/libpcap/pcap/bpf.h stable/9/lib/libpcap/config.h stable/9/sys/net/bpf.h Directory Properties: stable/9/contrib/libpcap/ (props changed) stable/9/lib/libpcap/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/contrib/libpcap/CHANGES ============================================================================== --- stable/9/contrib/libpcap/CHANGES Fri Nov 2 16:31:01 2012 (r242483) +++ stable/9/contrib/libpcap/CHANGES Fri Nov 2 16:54:12 2012 (r242484) @@ -1,3 +1,22 @@ +Friday March 30, 2012. mcr@sandelman.ca +Summary for 1.3.0 libpcap release + Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}. + Linux: Don't fail if netfilter isn't enabled in the kernel. + Add new link-layer type for NFC Forum LLCP. + Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball. + Add LINKTYPE_NG40/DLT_NG40. + Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams. + [PATCH] Fix AIX-3.5 crash with read failure during stress + AIX fixes. + Introduce --disable-shared configure option. + Added initial support for canusb devices. + Include the pcap(3PCAP) additions as 1.2.1 changes. + many updates to documentation: pcap.3pcap.in + Improve 'inbound'/'outbound' capture filters under Linux. + Note the cleanup of handling of new DLT_/LINKTYPE_ values. + On Lion, don't build for PPC. + For mac80211 devices we need to clean up monitor mode on exit. + Friday December 9, 2011. guy@alum.mit.edu. Summary for 1.2.1 libpcap release Update README file. Modified: stable/9/contrib/libpcap/CREDITS ============================================================================== --- stable/9/contrib/libpcap/CREDITS Fri Nov 2 16:31:01 2012 (r242483) +++ stable/9/contrib/libpcap/CREDITS Fri Nov 2 16:54:12 2012 (r242484) @@ -34,6 +34,7 @@ Additional people who have contributed p David Kaelbling David Young Dean Gaudet + dhruv Don Ebright Dug Song Dustin Spicuzza Modified: stable/9/contrib/libpcap/Makefile.in ============================================================================== --- stable/9/contrib/libpcap/Makefile.in Fri Nov 2 16:31:01 2012 (r242483) +++ stable/9/contrib/libpcap/Makefile.in Fri Nov 2 16:54:12 2012 (r242484) @@ -82,7 +82,7 @@ YACC = @V_YACC@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ FSRC = fad-@V_FINDALLDEVS@.c SSRC = @SSRC@ CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ @@ -289,6 +289,8 @@ EXTRA_DIST = \ pcap-bt-linux.h \ pcap-can-linux.c \ pcap-can-linux.h \ + pcap-canusb-linux.c \ + pcap-canusb-linux.h \ pcap-config.in \ pcap-dag.c \ pcap-dag.h \ Modified: stable/9/contrib/libpcap/VERSION ============================================================================== --- stable/9/contrib/libpcap/VERSION Fri Nov 2 16:31:01 2012 (r242483) +++ stable/9/contrib/libpcap/VERSION Fri Nov 2 16:54:12 2012 (r242484) @@ -1 +1 @@ -1.2.1 +1.3.0 Modified: stable/9/contrib/libpcap/config.h.in ============================================================================== --- stable/9/contrib/libpcap/config.h.in Fri Nov 2 16:31:01 2012 (r242483) +++ stable/9/contrib/libpcap/config.h.in Fri Nov 2 16:54:12 2012 (r242484) @@ -232,6 +232,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -244,6 +247,9 @@ /* target host supports CAN sniffing */ #undef PCAP_SUPPORT_CAN +/* target host supports canusb */ +#undef PCAP_SUPPORT_CANUSB + /* target host supports netfilter sniffing */ #undef PCAP_SUPPORT_NETFILTER Modified: stable/9/contrib/libpcap/configure ============================================================================== --- stable/9/contrib/libpcap/configure Fri Nov 2 16:31:01 2012 (r242483) +++ stable/9/contrib/libpcap/configure Fri Nov 2 16:54:12 2012 (r242484) @@ -1,61 +1,84 @@ #! /bin/sh # From configure.in Revision: 1.168 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.67. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -64,20 +87,18 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -88,354 +109,321 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi -if ( set x; as_func_ret_success y && test x = "$1" ); then - : +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -if as_func_ret_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_ret_success failed. + as_expr=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -452,8 +440,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -463,49 +450,40 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -513,7 +491,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -530,12 +508,12 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -549,11 +527,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -568,7 +546,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -576,6 +553,7 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="pcap.c" # Factoring default headers for most tests. @@ -614,100 +592,128 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 2 16:57:52 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AE07FBD; Fri, 2 Nov 2012 16:57:52 +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 7FAA48FC08; Fri, 2 Nov 2012 16:57:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA2Gvq6U063584; Fri, 2 Nov 2012 16:57:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA2GvqSY063570; Fri, 2 Nov 2012 16:57:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201211021657.qA2GvqSY063570@svn.freebsd.org> From: Xin LI Date: Fri, 2 Nov 2012 16:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242485 - in stable/9: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 16:57:52 -0000 Author: delphij Date: Fri Nov 2 16:57:51 2012 New Revision: 242485 URL: http://svn.freebsd.org/changeset/base/242485 Log: MFC r241235: MFV tcpdump 4.3.0. Added: stable/9/contrib/tcpdump/print-tipc.c - copied unchanged from r241235, head/contrib/tcpdump/print-tipc.c Modified: stable/9/contrib/tcpdump/CHANGES stable/9/contrib/tcpdump/CREDITS stable/9/contrib/tcpdump/Makefile.in stable/9/contrib/tcpdump/VERSION stable/9/contrib/tcpdump/configure stable/9/contrib/tcpdump/configure.in stable/9/contrib/tcpdump/decode_prefix.h stable/9/contrib/tcpdump/ethertype.h stable/9/contrib/tcpdump/forces.h stable/9/contrib/tcpdump/netdissect.h stable/9/contrib/tcpdump/print-802_11.c stable/9/contrib/tcpdump/print-bgp.c stable/9/contrib/tcpdump/print-ether.c stable/9/contrib/tcpdump/print-forces.c stable/9/contrib/tcpdump/print-icmp6.c stable/9/contrib/tcpdump/print-igmp.c stable/9/contrib/tcpdump/print-ip.c stable/9/contrib/tcpdump/print-ip6opts.c stable/9/contrib/tcpdump/print-ldp.c stable/9/contrib/tcpdump/print-lldp.c stable/9/contrib/tcpdump/print-lwapp.c stable/9/contrib/tcpdump/print-ospf6.c stable/9/contrib/tcpdump/print-pim.c stable/9/contrib/tcpdump/print-pppoe.c stable/9/contrib/tcpdump/print-rrcp.c stable/9/contrib/tcpdump/tcpdump.1.in stable/9/contrib/tcpdump/tcpdump.c stable/9/usr.sbin/tcpdump/tcpdump/Makefile stable/9/usr.sbin/tcpdump/tcpdump/tcpdump.1 Directory Properties: stable/9/contrib/tcpdump/ (props changed) stable/9/usr.sbin/tcpdump/ (props changed) Modified: stable/9/contrib/tcpdump/CHANGES ============================================================================== --- stable/9/contrib/tcpdump/CHANGES Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/CHANGES Fri Nov 2 16:57:51 2012 (r242485) @@ -1,3 +1,19 @@ +Friday April 3, 2011. mcr@sandelman.ca. + Summary for 4.3.0 tcpdump release + fixes for forces: SPARSE data (per RFC 5810) + some more test cases added + updates to documentation on -l, -U and -w flags. + Fix printing of BGP optional headers. + Tried to include DLT_PFSYNC support, failed due to headers required. + added TIPC support. + Fix LLDP Network Policy bit definitions. + fixes for IGMPv3's Max Response Time: it is in units of 0.1 second. + SIGUSR1 can be used rather than SIGINFO for stats + permit -n flag to affect print-ip for protocol numbers + ND_OPT_ADVINTERVAL is in milliseconds, not seconds + Teach PPPoE parser about RFC 4638 + + Friday December 9, 2011. guy@alum.mit.edu. Summary for 4.2.1 tcpdump release Only build the Babel printer if IPv6 is enabled. Modified: stable/9/contrib/tcpdump/CREDITS ============================================================================== --- stable/9/contrib/tcpdump/CREDITS Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/CREDITS Fri Nov 2 16:57:51 2012 (r242485) @@ -43,6 +43,7 @@ Additional people who have contributed p Chris Larson Christian Sievers Christophe Rhodes + Cliff Frey Craig Rodrigues Crist J. Clark Daniel Hagerty @@ -102,6 +103,7 @@ Additional people who have contributed p Kelly Carmichael Ken Hornstein Kevin Steves + Kenichi Maehashi Klaus Klein Kris Kennaway Krzysztof Halasa @@ -176,6 +178,7 @@ Additional people who have contributed p Sepherosa Ziehau Seth Webster Shinsuke Suzuki + Simon Ruderich Steinar Haug Swaminathan Chandrasekaran Takashi Yamamoto Modified: stable/9/contrib/tcpdump/Makefile.in ============================================================================== --- stable/9/contrib/tcpdump/Makefile.in Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/Makefile.in Fri Nov 2 16:57:51 2012 (r242485) @@ -77,7 +77,7 @@ CSRC = addrtoname.c af.c checksum.c cpac print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \ print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ print-eap.c print-eigrp.c\ - print-esp.c print-ether.c print-fddi.c print-fr.c \ + print-esp.c print-ether.c print-fddi.c print-forces.c print-fr.c \ print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \ print-ipx.c print-isoclns.c print-juniper.c print-krb.c \ @@ -91,8 +91,8 @@ CSRC = addrtoname.c af.c checksum.c cpac print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ - print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \ - print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \ + print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \ + print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \ print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c LIBNETDISSECT_SRC=print-isakmp.c @@ -304,10 +304,11 @@ EXTRA_DIST = \ tests/forces1.pcap \ tests/forces1vvv.out \ tests/forces1vvvv.out \ - tests/forces2.out \ tests/forces2v.out \ tests/forces2vv.out \ tests/forces3vvv.out \ + tests/icmpv6.out \ + tests/icmpv6.pcap \ tests/ikev2four.out \ tests/ikev2four.pcap \ tests/ikev2fourv.out \ @@ -335,6 +336,8 @@ EXTRA_DIST = \ tests/mpls-traceroute.pcap \ tests/ospf-gmpls.out \ tests/ospf-gmpls.pcap \ + tests/pppoe.out \ + tests/pppoe.pcap \ tests/print-A.out \ tests/print-AA.out \ tests/print-capX.out \ Modified: stable/9/contrib/tcpdump/VERSION ============================================================================== --- stable/9/contrib/tcpdump/VERSION Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/VERSION Fri Nov 2 16:57:51 2012 (r242485) @@ -1 +1 @@ -4.2.1 +4.3.0 Modified: stable/9/contrib/tcpdump/configure ============================================================================== --- stable/9/contrib/tcpdump/configure Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/configure Fri Nov 2 16:57:51 2012 (r242485) @@ -7554,9 +7554,23 @@ if test $ac_cv_func_pcap_loop = yes; the else { { echo "$as_me:$LINENO: error: Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report" >&5 +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves." >&5 echo "$as_me: error: Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report" >&2;} +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves." >&2;} { (exit 1); exit 1; }; } fi @@ -9330,7 +9344,7 @@ fi done if test $ac_cv_func_pcap_findalldevs = "yes" ; then - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" { echo "$as_me:$LINENO: checking for pcap_if_t" >&5 echo $ECHO_N "checking for pcap_if_t... $ECHO_C" >&6; } @@ -11748,7 +11762,7 @@ _ACEOF fi - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" for ac_header in openssl/evp.h Modified: stable/9/contrib/tcpdump/configure.in ============================================================================== --- stable/9/contrib/tcpdump/configure.in Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/configure.in Fri Nov 2 16:57:51 2012 (r242485) @@ -732,7 +732,7 @@ if test $ac_cv_func_pcap_findalldevs = " dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't dnl have pcap_if_t. - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_TYPES(pcap_if_t, , , [#include ]) CPPFLAGS="$savedcppflags" @@ -1067,7 +1067,7 @@ if test "$want_libcrypto" != "no"; then fi AC_CHECK_LIB(crypto, DES_cbc_encrypt) - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_HEADERS(openssl/evp.h) CPPFLAGS="$savedcppflags" Modified: stable/9/contrib/tcpdump/decode_prefix.h ============================================================================== --- stable/9/contrib/tcpdump/decode_prefix.h Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/decode_prefix.h Fri Nov 2 16:57:51 2012 (r242485) @@ -33,9 +33,9 @@ #ifndef tcpdump_decode_prefix_h #define tcpdump_decode_prefix_h -extern int decode_prefix4(const u_char *pptr, char *buf, u_int buflen); +extern int decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen); #ifdef INET6 -extern int decode_prefix6(const u_char *pd, char *buf, u_int buflen); +extern int decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen); #endif #endif Modified: stable/9/contrib/tcpdump/ethertype.h ============================================================================== --- stable/9/contrib/tcpdump/ethertype.h Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/ethertype.h Fri Nov 2 16:57:51 2012 (r242485) @@ -101,6 +101,9 @@ #ifndef ETHERTYPE_AARP #define ETHERTYPE_AARP 0x80f3 #endif +#ifndef ETHERTYPE_TIPC +#define ETHERTYPE_TIPC 0x88ca +#endif #ifndef ETHERTYPE_8021Q #define ETHERTYPE_8021Q 0x8100 #endif Modified: stable/9/contrib/tcpdump/forces.h ============================================================================== --- stable/9/contrib/tcpdump/forces.h Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/forces.h Fri Nov 2 16:57:51 2012 (r242485) @@ -308,7 +308,7 @@ static const struct optlv_h OPTLV_msg[F_ /* F_OP_GET */ {ZERO_TTLV, 0, " Get", recpdoptlv_print}, /* F_OP_GETPROP */ {ZERO_TTLV, 0, " GetProp", recpdoptlv_print}, /* F_OP_GETRESP */ - {TTLV_T2, B_FULLD | B_RESTV, " GetResp", recpdoptlv_print}, + {TTLV_T2, B_FULLD | B_SPARD | B_RESTV, " GetResp", recpdoptlv_print}, /* F_OP_GETPRESP */ {TTLV_T2, B_FULLD | B_RESTV, " GetPropResp", recpdoptlv_print}, /* F_OP_REPORT */ Modified: stable/9/contrib/tcpdump/netdissect.h ============================================================================== --- stable/9/contrib/tcpdump/netdissect.h Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/netdissect.h Fri Nov 2 16:57:51 2012 (r242485) @@ -280,6 +280,7 @@ extern int esp_print(netdissect_options register const u_char *bp, int len, register const u_char *bp2, int *nhdr, int *padlen); extern void arp_print(netdissect_options *,const u_char *, u_int, u_int); +extern void tipc_print(netdissect_options *, const u_char *, u_int, u_int); extern void icmp6_print(netdissect_options *ndo, const u_char *, u_int, const u_char *, int); extern void isakmp_print(netdissect_options *,const u_char *, Modified: stable/9/contrib/tcpdump/print-802_11.c ============================================================================== --- stable/9/contrib/tcpdump/print-802_11.c Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/print-802_11.c Fri Nov 2 16:57:51 2012 (r242485) @@ -485,7 +485,7 @@ static const char *auth_alg_text[]={"Ope #define NUM_AUTH_ALGS (sizeof auth_alg_text / sizeof auth_alg_text[0]) static const char *status_text[] = { - "Succesful", /* 0 */ + "Successful", /* 0 */ "Unspecified failure", /* 1 */ "Reserved", /* 2 */ "Reserved", /* 3 */ Modified: stable/9/contrib/tcpdump/print-bgp.c ============================================================================== --- stable/9/contrib/tcpdump/print-bgp.c Fri Nov 2 16:54:12 2012 (r242484) +++ stable/9/contrib/tcpdump/print-bgp.c Fri Nov 2 16:57:51 2012 (r242485) @@ -93,8 +93,7 @@ struct bgp_opt { /* variable length */ }; #define BGP_OPT_SIZE 2 /* some compilers may pad to 4 bytes */ - -#define BGP_UPDATE_MINSIZE 23 +#define BGP_CAP_HEADER_SIZE 2 /* some compilers may pad to 4 bytes */ struct bgp_notification { u_int8_t bgpn_marker[16]; @@ -115,19 +114,10 @@ struct bgp_route_refresh { }; /* EXTRACT_16BITS(&bgp_route_refresh->afi) (sigh) */ #define BGP_ROUTE_REFRESH_SIZE 23 -struct bgp_attr { - u_int8_t bgpa_flags; - u_int8_t bgpa_type; - union { - u_int8_t len; - u_int16_t elen; - } bgpa_len; -#define bgp_attr_len(p) \ - (((p)->bgpa_flags & 0x10) ? \ - EXTRACT_16BITS(&(p)->bgpa_len.elen) : (p)->bgpa_len.len) -#define bgp_attr_off(p) \ - (((p)->bgpa_flags & 0x10) ? 4 : 3) -}; +#define bgp_attr_lenlen(flags, p) \ + (((flags) & 0x10) ? 2 : 1) +#define bgp_attr_len(flags, p) \ + (((flags) & 0x10) ? EXTRACT_16BITS(p) : *(p)) #define BGPTYPE_ORIGIN 1 #define BGPTYPE_AS_PATH 2 @@ -493,38 +483,49 @@ as_printf (char *str, int size, u_int as return str; } +#define ITEMCHECK(minlen) if (itemlen < minlen) goto badtlv; + int -decode_prefix4(const u_char *pptr, char *buf, u_int buflen) +decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in_addr addr; - u_int plen; + u_int plen, plenbytes; TCHECK(pptr[0]); + ITEMCHECK(1); plen = pptr[0]; if (32 < plen) return -1; + itemlen -= 1; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[1], (plen + 7) / 8); - memcpy(&addr, &pptr[1], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[1], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pptr[1], plenbytes); if (plen % 8) { - ((u_char *)&addr)[(plen + 7) / 8 - 1] &= + ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } snprintf(buf, buflen, "%s/%d", getname((u_char *)&addr), plen); - return 1 + (plen + 7) / 8; + return 1 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int -decode_labeled_prefix4(const u_char *pptr, char *buf, u_int buflen) +decode_labeled_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in_addr addr; - u_int plen; + u_int plen, plenbytes; - TCHECK(pptr[0]); + /* prefix length and label = 4 bytes */ + TCHECK2(pptr[0], 4); + ITEMCHECK(4); plen = pptr[0]; /* get prefix length */ /* this is one of the weirdnesses of rfc3107 @@ -542,12 +543,15 @@ decode_labeled_prefix4(const u_char *ppt if (32 < plen) return -1; + itemlen -= 4; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[4], (plen + 7) / 8); - memcpy(&addr, &pptr[4], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[4], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pptr[4], plenbytes); if (plen % 8) { - ((u_char *)&addr)[(plen + 7) / 8 - 1] &= + ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } /* the label may get offsetted by 4 bits so lets shift it right */ @@ -557,10 +561,13 @@ decode_labeled_prefix4(const u_char *ppt EXTRACT_24BITS(pptr+1)>>4, ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); - return 4 + (plen + 7) / 8; + return 4 + plenbytes; trunc: return -2; + +badtlv: + return -3; } /* @@ -1041,37 +1048,46 @@ trunc: #ifdef INET6 int -decode_prefix6(const u_char *pd, char *buf, u_int buflen) +decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen) { struct in6_addr addr; - u_int plen; + u_int plen, plenbytes; TCHECK(pd[0]); + ITEMCHECK(1); plen = pd[0]; if (128 < plen) return -1; + itemlen -= 1; memset(&addr, 0, sizeof(addr)); - TCHECK2(pd[1], (plen + 7) / 8); - memcpy(&addr, &pd[1], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pd[1], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pd[1], plenbytes); if (plen % 8) { - addr.s6_addr[(plen + 7) / 8 - 1] &= + addr.s6_addr[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } snprintf(buf, buflen, "%s/%d", getname6((u_char *)&addr), plen); - return 1 + (plen + 7) / 8; + return 1 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int -decode_labeled_prefix6(const u_char *pptr, char *buf, u_int buflen) +decode_labeled_prefix6(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in6_addr addr; - u_int plen; + u_int plen, plenbytes; - TCHECK(pptr[0]); + /* prefix length and label = 4 bytes */ + TCHECK2(pptr[0], 4); + ITEMCHECK(4); plen = pptr[0]; /* get prefix length */ if (24 > plen) @@ -1081,12 +1097,14 @@ decode_labeled_prefix6(const u_char *ppt if (128 < plen) return -1; + itemlen -= 4; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[4], (plen + 7) / 8); - memcpy(&addr, &pptr[4], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[4], plenbytes); + memcpy(&addr, &pptr[4], plenbytes); if (plen % 8) { - addr.s6_addr[(plen + 7) / 8 - 1] &= + addr.s6_addr[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } /* the label may get offsetted by 4 bits so lets shift it right */ @@ -1096,10 +1114,13 @@ decode_labeled_prefix6(const u_char *ppt EXTRACT_24BITS(pptr+1)>>4, ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); - return 4 + (plen + 7) / 8; + return 4 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int @@ -1266,7 +1287,7 @@ trunc: } static int -bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) +bgp_attr_print(u_int atype, const u_char *pptr, u_int len) { int i; u_int16_t af; @@ -1276,7 +1297,7 @@ bgp_attr_print(const struct bgp_attr *at u_int32_t i; } bw; int advance; - int tlen; + u_int tlen; const u_char *tptr; char buf[MAXHOSTNAMELEN + 100]; char tokbuf[TOKBUFSIZE]; @@ -1285,7 +1306,7 @@ bgp_attr_print(const struct bgp_attr *at tptr = pptr; tlen=len; - switch (attr->bgpa_type) { + switch (atype) { case BGPTYPE_ORIGIN: if (len != 1) printf("invalid len"); @@ -1321,7 +1342,7 @@ bgp_attr_print(const struct bgp_attr *at * 2 bytes first, and it does not pass, assume that ASs are * encoded in 4 bytes format and move on. */ - as_size = bgp_attr_get_as_size(attr->bgpa_type, pptr, len); + as_size = bgp_attr_get_as_size(atype, pptr, len); while (tptr < pptr + len) { TCHECK(tptr[0]); @@ -1657,20 +1678,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST): case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix4(tptr, buf, sizeof(buf)); + advance = decode_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix4(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1718,20 +1743,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix6(tptr, buf, sizeof(buf)); + advance = decode_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix6(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1821,20 +1850,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST): case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix4(tptr, buf, sizeof(buf)); + advance = decode_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix4(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1853,20 +1886,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix6(tptr, buf, sizeof(buf)); + advance = decode_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix6(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -2097,40 +2134,50 @@ bgp_attr_print(const struct bgp_attr *at } case BGPTYPE_ATTR_SET: TCHECK2(tptr[0], 4); + if (len < 4) + goto trunc; printf("\n\t Origin AS: %s", as_printf(astostr, sizeof(astostr), EXTRACT_32BITS(tptr))); tptr+=4; len -=4; - while (len >= 2 ) { - int alen; - struct bgp_attr bgpa; + while (len) { + u_int aflags, atype, alenlen, alen; - TCHECK2(tptr[0], sizeof(bgpa)); - memcpy(&bgpa, tptr, sizeof(bgpa)); - alen = bgp_attr_len(&bgpa); - tptr += bgp_attr_off(&bgpa); - len -= bgp_attr_off(&bgpa); + TCHECK2(tptr[0], 2); + if (len < 2) + goto trunc; + aflags = *tptr; + atype = *(tptr + 1); + tptr += 2; + len -= 2; + alenlen = bgp_attr_lenlen(aflags, tptr); + TCHECK2(tptr[0], alenlen); + if (len < alenlen) + goto trunc; + alen = bgp_attr_len(aflags, tptr); + tptr += alenlen; + len -= alenlen; printf("\n\t %s (%u), length: %u", tok2strbuf(bgp_attr_values, - "Unknown Attribute", bgpa.bgpa_type, - tokbuf, sizeof(tokbuf)), - bgpa.bgpa_type, + "Unknown Attribute", atype, + tokbuf, sizeof(tokbuf)), + atype, alen); - if (bgpa.bgpa_flags) { + if (aflags) { printf(", Flags [%s%s%s%s", - bgpa.bgpa_flags & 0x80 ? "O" : "", - bgpa.bgpa_flags & 0x40 ? "T" : "", - bgpa.bgpa_flags & 0x20 ? "P" : "", - bgpa.bgpa_flags & 0x10 ? "E" : ""); - if (bgpa.bgpa_flags & 0xf) - printf("+%x", bgpa.bgpa_flags & 0xf); + aflags & 0x80 ? "O" : "", + aflags & 0x40 ? "T" : "", + aflags & 0x20 ? "P" : "", + aflags & 0x10 ? "E" : ""); + if (aflags & 0xf) + printf("+%x", aflags & 0xf); printf("]: "); } /* FIXME check for recursion */ - if (!bgp_attr_print(&bgpa, tptr, alen)) + if (!bgp_attr_print(atype, tptr, alen)) return 0; tptr += alen; len -= alen; @@ -2140,7 +2187,7 @@ bgp_attr_print(const struct bgp_attr *at default: TCHECK2(*pptr,len); - printf("\n\t no Attribute %u decoder",attr->bgpa_type); /* we have no decoder for the attribute */ + printf("\n\t no Attribute %u decoder",atype); /* we have no decoder for the attribute */ if (vflag <= 1) print_unknown_data(pptr,"\n\t ",len); break; @@ -2156,14 +2203,97 @@ trunc: } static void +bgp_capabilities_print(const u_char *opt, int caps_len) +{ + char tokbuf[TOKBUFSIZE]; + char tokbuf2[TOKBUFSIZE]; + int cap_type, cap_len, tcap_len, cap_offset; + int i = 0; + + while (i < caps_len) { + TCHECK2(opt[i], BGP_CAP_HEADER_SIZE); + cap_type=opt[i]; + cap_len=opt[i+1]; + tcap_len=cap_len; + printf("\n\t %s (%u), length: %u", + tok2strbuf(bgp_capcode_values, "Unknown", + cap_type, tokbuf, sizeof(tokbuf)), + cap_type, + cap_len); + TCHECK2(opt[i+2], cap_len); + switch (cap_type) { + case BGP_CAPCODE_MP: + printf("\n\t\tAFI %s (%u), SAFI %s (%u)", + tok2strbuf(af_values, "Unknown", + EXTRACT_16BITS(opt+i+2), + tokbuf, sizeof(tokbuf)), + EXTRACT_16BITS(opt+i+2), + tok2strbuf(bgp_safi_values, "Unknown", + opt[i+5], + tokbuf, sizeof(tokbuf)), + opt[i+5]); + break; + case BGP_CAPCODE_RESTART: + printf("\n\t\tRestart Flags: [%s], Restart Time %us", + ((opt[i+2])&0x80) ? "R" : "none", + EXTRACT_16BITS(opt+i+2)&0xfff); + tcap_len-=2; + cap_offset=4; + while(tcap_len>=4) { + printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", + tok2strbuf(af_values,"Unknown", + EXTRACT_16BITS(opt+i+cap_offset), + tokbuf, sizeof(tokbuf)), + EXTRACT_16BITS(opt+i+cap_offset), + tok2strbuf(bgp_safi_values,"Unknown", + opt[i+cap_offset+2], + tokbuf2, sizeof(tokbuf2)), + opt[i+cap_offset+2], + ((opt[i+cap_offset+3])&0x80) ? "yes" : "no" ); + tcap_len-=4; + cap_offset+=4; + } + break; + case BGP_CAPCODE_RR: + case BGP_CAPCODE_RR_CISCO: + break; + case BGP_CAPCODE_AS_NEW: + + /* + * Extract the 4 byte AS number encoded. + */ + if (cap_len == 4) { + printf("\n\t\t 4 Byte AS %s", + as_printf(astostr, sizeof(astostr), + EXTRACT_32BITS(opt + i + 2))); + } + break; + default: + printf("\n\t\tno decoder for Capability %u", + cap_type); + if (vflag <= 1) + print_unknown_data(&opt[i+2],"\n\t\t",cap_len); + break; + } + if (vflag > 1 && cap_len > 0) { + print_unknown_data(&opt[i+2],"\n\t\t",cap_len); + } + i += BGP_CAP_HEADER_SIZE + cap_len; + } + return; + +trunc: + printf("[|BGP]"); +} + +static void bgp_open_print(const u_char *dat, int length) { struct bgp_open bgpo; struct bgp_opt bgpopt; const u_char *opt; - int i,cap_type,cap_len,tcap_len,cap_offset; + int i; char tokbuf[TOKBUFSIZE]; - char tokbuf2[TOKBUFSIZE]; TCHECK2(dat[0], BGP_OPEN_SIZE); memcpy(&bgpo, dat, BGP_OPEN_SIZE); @@ -2188,96 +2318,31 @@ bgp_open_print(const u_char *dat, int le TCHECK2(opt[i], BGP_OPT_SIZE); memcpy(&bgpopt, &opt[i], BGP_OPT_SIZE); if (i + 2 + bgpopt.bgpopt_len > bgpo.bgpo_optlen) { - printf("\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len); + printf("\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len); break; } printf("\n\t Option %s (%u), length: %u", - tok2strbuf(bgp_opt_values,"Unknown", + tok2strbuf(bgp_opt_values,"Unknown", bgpopt.bgpopt_type, tokbuf, sizeof(tokbuf)), - bgpopt.bgpopt_type, - bgpopt.bgpopt_len); + bgpopt.bgpopt_type, + bgpopt.bgpopt_len); - /* now lets decode the options we know*/ - switch(bgpopt.bgpopt_type) { - case BGP_OPT_CAP: - cap_type=opt[i+BGP_OPT_SIZE]; - cap_len=opt[i+BGP_OPT_SIZE+1]; - tcap_len=cap_len; - printf("\n\t %s (%u), length: %u", - tok2strbuf(bgp_capcode_values, "Unknown", - cap_type, tokbuf, sizeof(tokbuf)), - cap_type, - cap_len); - switch(cap_type) { - case BGP_CAPCODE_MP: - printf("\n\t\tAFI %s (%u), SAFI %s (%u)", - tok2strbuf(af_values, "Unknown", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2), - tokbuf, sizeof(tokbuf)), - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2), - tok2strbuf(bgp_safi_values, "Unknown", - opt[i+BGP_OPT_SIZE+5], - tokbuf, sizeof(tokbuf)), - opt[i+BGP_OPT_SIZE+5]); - break; - case BGP_CAPCODE_RESTART: - printf("\n\t\tRestart Flags: [%s], Restart Time %us", - ((opt[i+BGP_OPT_SIZE+2])&0x80) ? "R" : "none", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2)&0xfff); - tcap_len-=2; - cap_offset=4; - while(tcap_len>=4) { - printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", - tok2strbuf(af_values,"Unknown", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset), - tokbuf, sizeof(tokbuf)), - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset), - tok2strbuf(bgp_safi_values,"Unknown", - opt[i+BGP_OPT_SIZE+cap_offset+2], - tokbuf2, sizeof(tokbuf2)), - opt[i+BGP_OPT_SIZE+cap_offset+2], - ((opt[i+BGP_OPT_SIZE+cap_offset+3])&0x80) ? "yes" : "no" ); - tcap_len-=4; - cap_offset+=4; - } - break; - case BGP_CAPCODE_RR: - case BGP_CAPCODE_RR_CISCO: - break; - case BGP_CAPCODE_AS_NEW: + /* now let's decode the options we know*/ + switch(bgpopt.bgpopt_type) { - /* - * Extract the 4 byte AS number encoded. - */ - TCHECK2(opt[i + BGP_OPT_SIZE + 2], cap_len); - if (cap_len == 4) { - printf("\n\t\t 4 Byte AS %s", - as_printf(astostr, sizeof(astostr), - EXTRACT_32BITS(opt + i + BGP_OPT_SIZE + 2))); - } - break; - default: - TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len); - printf("\n\t\tno decoder for Capability %u", - cap_type); - if (vflag <= 1) - print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len); - break; - } - if (vflag > 1) { - TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len); - print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len); - } - break; - case BGP_OPT_AUTH: - default: - printf("\n\t no decoder for option %u", - bgpopt.bgpopt_type); - break; - } + case BGP_OPT_CAP: + bgp_capabilities_print(&opt[i+BGP_OPT_SIZE], + bgpopt.bgpopt_len); + break; + case BGP_OPT_AUTH: + default: + printf("\n\t no decoder for option %u", + bgpopt.bgpopt_type); + break; + } i += BGP_OPT_SIZE + bgpopt.bgpopt_len; } return; @@ -2289,107 +2354,163 @@ static void bgp_update_print(const u_char *dat, int length) { struct bgp bgp; - struct bgp_attr bgpa; const u_char *p; + int withdrawn_routes_len; int len; int i; char tokbuf[TOKBUFSIZE]; +#ifndef INET6 + char buf[MAXHOSTNAMELEN + 100]; + int wpfx; +#endif TCHECK2(dat[0], BGP_SIZE); + if (length < BGP_SIZE) + goto trunc; memcpy(&bgp, dat, BGP_SIZE); p = dat + BGP_SIZE; /*XXX*/ + length -= BGP_SIZE; /* Unfeasible routes */ - len = EXTRACT_16BITS(p); - if (len) { + TCHECK2(p[0], 2); + if (length < 2) + goto trunc; + withdrawn_routes_len = EXTRACT_16BITS(p); + p += 2; + length -= 2; + if (withdrawn_routes_len) { /* * Without keeping state from the original NLRI message, * it's not possible to tell if this a v4 or v6 route, * so only try to decode it if we're not v6 enabled. */ + TCHECK2(p[0], withdrawn_routes_len); + if (length < withdrawn_routes_len) + goto trunc; #ifdef INET6 - printf("\n\t Withdrawn routes: %d bytes", len); + printf("\n\t Withdrawn routes: %d bytes", withdrawn_routes_len); + p += withdrawn_routes_len; + length -= withdrawn_routes_len; #else - char buf[MAXHOSTNAMELEN + 100]; - int wpfx; + if (withdrawn_routes_len < 2) + goto trunc; + length -= 2; + withdrawn_routes_len -= 2; - TCHECK2(p[2], len); - i = 2; printf("\n\t Withdrawn routes:"); - while(i < 2 + len) { - wpfx = decode_prefix4(&p[i], buf, sizeof(buf)); + while(withdrawn_routes_len > 0) { + wpfx = decode_prefix4(p, withdrawn_routes_len, buf, sizeof(buf)); if (wpfx == -1) { printf("\n\t (illegal prefix length)"); break; } else if (wpfx == -2) goto trunc; + else if (wpfx == -3) + goto trunc; /* bytes left, but not enough */ else { - i += wpfx; printf("\n\t %s", buf); + p += wpfx; + length -= wpfx; + withdrawn_routes_len -= wpfx; } } #endif } - p += 2 + len; TCHECK2(p[0], 2); + if (length < 2) + goto trunc; len = EXTRACT_16BITS(p); + p += 2; + length -= 2; - if (len == 0 && length == BGP_UPDATE_MINSIZE) { + if (withdrawn_routes_len == 0 && len == 0 && length == 0) { + /* No withdrawn routes, no path attributes, no NLRI */ printf("\n\t End-of-Rib Marker (empty NLRI)"); return; } if (len) { /* do something more useful!*/ - i = 2; - while (i < 2 + len) { - int alen, aoff; - - TCHECK2(p[i], sizeof(bgpa)); - memcpy(&bgpa, &p[i], sizeof(bgpa)); - alen = bgp_attr_len(&bgpa); - aoff = bgp_attr_off(&bgpa); + while (len) { + int aflags, atype, alenlen, alen; + + TCHECK2(p[0], 2); + if (len < 2) + goto trunc; + if (length < 2) + goto trunc; + aflags = *p; + atype = *(p + 1); + p += 2; + len -= 2; + length -= 2; + alenlen = bgp_attr_lenlen(aflags, p); + TCHECK2(p[0], alenlen); + if (len < alenlen) + goto trunc; + if (length < alenlen) + goto trunc; + alen = bgp_attr_len(aflags, p); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 2 23:25:53 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B02E654; Fri, 2 Nov 2012 23:25:53 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6760A8FC0A; Fri, 2 Nov 2012 23:25:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA2NPrC7024294; Fri, 2 Nov 2012 23:25:53 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA2NPrHv024292; Fri, 2 Nov 2012 23:25:53 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201211022325.qA2NPrHv024292@svn.freebsd.org> From: Sean Bruno Date: Fri, 2 Nov 2012 23:25:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242500 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 23:25:53 -0000 Author: sbruno Date: Fri Nov 2 23:25:52 2012 New Revision: 242500 URL: http://svn.freebsd.org/changeset/base/242500 Log: MFC r241710 est(4) man page update to document the exposed sysctl r/o variables available to the user. Should be applicable to all branches and versions where est(4) exists. MFC r241727 Fix minor whitespace issues. Modified: stable/9/share/man/man4/est.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/est.4 ============================================================================== --- stable/9/share/man/man4/est.4 Fri Nov 2 22:32:47 2012 (r242499) +++ stable/9/share/man/man4/est.4 Fri Nov 2 23:25:52 2012 (r242500) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 12, 2012 +.Dd October 18, 2012 .Dt EST 4 .Os .Sh NAME @@ -63,13 +63,36 @@ behavior. .Bl -tag -width indent .It hw.est.msr_info Attempt to infer information from direct probing of the msr. -Should only be used in diagnostic cases +Should only be used in diagnostic cases. .Pq default 0 .It hw.est.strict Validate frequency requested is accepted by the cpu when set. It appears that this will only work on single core cpus. .Pq default 0 .El +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 8 +values are available +.Bl -tag -width indent +.It Va dev.est.%d.\%desc +Description of support, almost always Enhanced SpeedStep Frequency Control. +.It dev.est.0.%desc: Enhanced SpeedStep Frequency Control +.It Va dev.est.%d.\%driver +Driver in use, always est. +.It dev.est.0.%driver: est +.It Va dev.est.%d.\%parent +.It dev.est.0.%parent: cpu0 +The cpu that is exposing these frequencies. +For example +.Va cpu0 . +.It Va dev.est.%d.freq_settings . +The valid frequencies that are allowed by this CPU and their step values. +.It dev.est.0.freq_settings: 2201/45000 2200/45000 2000/39581 1900/37387 +1800/34806 1700/32703 1600/30227 1500/28212 1400/25828 1300/23900 1200/21613 +1100/19775 1000/17582 900/15437 800/13723 +.Pp +.El .Sh DIAGNOSTICS .Bl -diag .It "est%d: on cpu%d" From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 3 16:06:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D681F41; Sat, 3 Nov 2012 16:06:15 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F3C68FC08; Sat, 3 Nov 2012 16:06:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA3G6FYI096612; Sat, 3 Nov 2012 16:06:15 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA3G6Ftx096610; Sat, 3 Nov 2012 16:06:15 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201211031606.qA3G6Ftx096610@svn.freebsd.org> From: Davide Italiano Date: Sat, 3 Nov 2012 16:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242516 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2012 16:06:15 -0000 Author: davide Date: Sat Nov 3 16:06:14 2012 New Revision: 242516 URL: http://svn.freebsd.org/changeset/base/242516 Log: MFC r242202: The fields of struct timespec32 should be int32_t and not uint32_t. Make this change. Modified: stable/9/sys/kern/kern_umtx.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_umtx.c ============================================================================== --- stable/9/sys/kern/kern_umtx.c Sat Nov 3 15:57:37 2012 (r242515) +++ stable/9/sys/kern/kern_umtx.c Sat Nov 3 16:06:14 2012 (r242516) @@ -3364,8 +3364,8 @@ freebsd32_umtx_unlock(struct thread *td, } struct timespec32 { - uint32_t tv_sec; - uint32_t tv_nsec; + int32_t tv_sec; + int32_t tv_nsec; }; static inline int