Re: svn commit: r214817 - head/sys/teken

2010-11-05 Thread Andriy Gapon
on 05/11/2010 03:21 Alexander Best said the following:
 On Fri Nov  5 10, Ed Schouten wrote:
 Author: ed
 Date: Fri Nov  5 00:56:21 2010
 New Revision: 214817
 URL: http://svn.freebsd.org/changeset/base/214817

 Log:
   Partially implement the mysterious cons25 \e[x escape sequence.
   
   It seems the terminfo library on some systems (OS X, Linux) may emit the
   sequence \e[x to reset to default attributes. Apart from using the
   zero-command, this escape sequence allows many more operations, such as
   setting ANSI colors. I don't see this used anywhere, so this should be
   sufficient for now.
   
   This deficiency was spotted by the Debian GNU/kFreeBSD. They have their
   own patch, which is slightly flawed in my opinion. I don't know why they
   never reported this issue to us.
 
 maybe, because nearly all PRs (most of them including patches) they have
 submitted via GNATS in the past remain unnoticed and thus they've gotten tired
 of reporting issues and submitting patches if nobody seems to care? ;)

Pity that they haven't discovered the mailing lists.

-- 
Andriy Gapon
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r214817 - head/sys/teken

2010-11-05 Thread Mark Linimon
On Fri, Nov 05, 2010 at 01:21:03AM +, Alexander Best wrote:
 maybe, because nearly all PRs (most of them including patches) they
 have submitted via GNATS in the past remain unnoticed and thus they've
 gotten tired of reporting issues and submitting patches if nobody
 seems to care? ;)

We actually do better these days w/rt userland bugs (and some src
bugs) than we were a few years ago.  I'm always looking for suggestions
on how we can get more committers interested in PRs (especially those
with patches).

mcl
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214830 - head/sys/dev/usb

2010-11-05 Thread Nick Hibma
Author: n_hibma
Date: Fri Nov  5 08:30:16 2010
New Revision: 214830
URL: http://svn.freebsd.org/changeset/base/214830

Log:
  Bugfix: Move the 'at location string' to the beginning of the attach
  notification. devd would stop evaluating at 'at' (not 'k=v') and
  hence prevent 'port=X' (and 'bus=on string) from making it into the
  environment for the devd action.
  
  Reviewed by:  hselasky
  MFC after:2 weeks

Modified:
  head/sys/dev/usb/usb_device.c

Modified: head/sys/dev/usb/usb_device.c
==
--- head/sys/dev/usb/usb_device.c   Fri Nov  5 07:49:47 2010
(r214829)
+++ head/sys/dev/usb/usb_device.c   Fri Nov  5 08:30:16 2010
(r214830)
@@ -2426,14 +2426,13 @@ usb_notify_addq_compat(const char *type,
 #if USB_HAVE_UGEN
%s 
 #endif
+   at port=%u 
vendor=0x%04x 
product=0x%04x 
devclass=0x%02x 
devsubclass=0x%02x 
sernum=\%s\ 
release=0x%04x 
-   at 
-   port=%u 
 #if USB_HAVE_UGEN
on %s\n
 #endif
@@ -2442,13 +2441,13 @@ usb_notify_addq_compat(const char *type,
 #if USB_HAVE_UGEN
udev-ugen_name,
 #endif
+   udev-port_no,
UGETW(udev-ddesc.idVendor),
UGETW(udev-ddesc.idProduct),
udev-ddesc.bDeviceClass,
udev-ddesc.bDeviceSubClass,
usb_get_serial(udev),
-   UGETW(udev-ddesc.bcdDevice),
-   udev-port_no
+   UGETW(udev-ddesc.bcdDevice)
 #if USB_HAVE_UGEN
, udev-parent_hub != NULL ?
udev-parent_hub-ugen_name :
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r214817 - head/sys/teken

2010-11-05 Thread Garrett Cooper
On Fri, Nov 5, 2010 at 12:25 AM, Mark Linimon lini...@lonesome.com wrote:
 On Fri, Nov 05, 2010 at 01:21:03AM +, Alexander Best wrote:
 maybe, because nearly all PRs (most of them including patches) they
 have submitted via GNATS in the past remain unnoticed and thus they've
 gotten tired of reporting issues and submitting patches if nobody
 seems to care? ;)

 We actually do better these days w/rt userland bugs (and some src
 bugs) than we were a few years ago.  I'm always looking for suggestions
 on how we can get more committers interested in PRs (especially those
 with patches).

[As is probably well known already among FreeBSD developers] it's
better for junior committers (and otherwise newbie committers) to get
into the whole userland commit arena. Most of what I see in committer
status seems to evolve from userland (optional) to kernel due to the
sexiness of kernel work vs userland work.
-Garrett
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214831 - head/sys/dev/usb/serial

2010-11-05 Thread Nick Hibma
Author: n_hibma
Date: Fri Nov  5 09:06:23 2010
New Revision: 214831
URL: http://svn.freebsd.org/changeset/base/214831

Log:
  - Remove an unused entry from the softc (only used in a debugging printf).
  - Fix the loop count on detach (causing a panic on detaching a serial
dongle).
  - Increase a buffer in case some driver want extra long tty device names
(postfixing the purpose of the tty for example, e.g. u3g.ppp).

Modified:
  head/sys/dev/usb/serial/usb_serial.c
  head/sys/dev/usb/serial/usb_serial.h

Modified: head/sys/dev/usb/serial/usb_serial.c
==
--- head/sys/dev/usb/serial/usb_serial.cFri Nov  5 08:30:16 2010
(r214830)
+++ head/sys/dev/usb/serial/usb_serial.cFri Nov  5 09:06:23 2010
(r214831)
@@ -255,7 +255,7 @@ ucom_attach(struct ucom_super_softc *ssc
}
ssc-sc_subunits = subunits;
 
-   for (subunit = 0; subunit != ssc-sc_subunits; subunit++) {
+   for (subunit = 0; subunit  ssc-sc_subunits; subunit++) {
sc[subunit].sc_subunit = subunit;
sc[subunit].sc_super = ssc;
sc[subunit].sc_mtx = mtx;
@@ -270,8 +270,8 @@ ucom_attach(struct ucom_super_softc *ssc
sc[subunit].sc_flag |= UCOM_FLAG_ATTACHED;
}
 
-   DPRINTF(tp = %p, unit = %d, subunits = %d, device name subunit 0 = 
%s\n,
-   sc-sc_tty, ssc-sc_unit, ssc-sc_subunits, sc[0].sc_devname);
+   DPRINTF(tp = %p, unit = %d, subunits = %d\n,
+   sc-sc_tty, ssc-sc_unit, ssc-sc_subunits);
 
return (0);
 }
@@ -287,7 +287,7 @@ ucom_detach(struct ucom_super_softc *ssc
 
usb_proc_drain(ssc-sc_tq);
 
-   for (subunit = 0; subunit = ssc-sc_subunits; subunit++) {
+   for (subunit = 0; subunit  ssc-sc_subunits; subunit++) {
if (sc[subunit].sc_flag  UCOM_FLAG_ATTACHED) {
 
ucom_detach_tty(sc[subunit]);
@@ -304,7 +304,7 @@ static int
 ucom_attach_tty(struct ucom_super_softc *ssc, struct ucom_softc *sc)
 {
struct tty *tp;
-   char buf[10];   /* temporary TTY device name buffer */
+   char buf[32];   /* temporary TTY device name buffer */
 
tp = tty_alloc_mutex(ucom_class, sc, sc-sc_mtx);
if (tp == NULL)

Modified: head/sys/dev/usb/serial/usb_serial.h
==
--- head/sys/dev/usb/serial/usb_serial.hFri Nov  5 08:30:16 2010
(r214830)
+++ head/sys/dev/usb/serial/usb_serial.hFri Nov  5 09:06:23 2010
(r214831)
@@ -160,7 +160,6 @@ struct ucom_softc {
const struct ucom_callback *sc_callback;
struct ucom_super_softc *sc_super;
struct tty *sc_tty;
-   char sc_devname[10];
struct mtx *sc_mtx;
void   *sc_parent;
uint32_t sc_subunit;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r214817 - head/sys/teken

2010-11-05 Thread Alexander Best
On Fri Nov  5 10, Mark Linimon wrote:
 On Fri, Nov 05, 2010 at 01:21:03AM +, Alexander Best wrote:
  maybe, because nearly all PRs (most of them including patches) they
  have submitted via GNATS in the past remain unnoticed and thus they've
  gotten tired of reporting issues and submitting patches if nobody
  seems to care? ;)
 
 We actually do better these days w/rt userland bugs (and some src
 bugs) than we were a few years ago.  I'm always looking for suggestions
 on how we can get more committers interested in PRs (especially those
 with patches).

unfortunately this might come too late. in 2006 and 2007 apple e.g. submitted
quite some patches and tried contributing some work back to the freebsd
project. since most of their PR didn't trigger any attention at all, they
seem to have completely stopped sending in patches.
even if a higher response rate in connection with GNATS can be achieved, these
parties (GNU/kFreeBSD, apple, ...) and their manpower are probably lost
forever for the freebsd project. since their patches didn't trigger any
interest, it is very likely that they have no intentions anymore to contribute
any work back: reasonably.

expecially in the apple case that's a huge loss. personally i think any
contributions by such companies like apple need to have high priority. maybe
having a single committer who will interact with apple or other major
companies might even be a good idea. this doesn't mean that user contributions
aren't as valuable as contributions by companies, but the fact that certain
companies have quite a massive manpower, the impact of ignoring their patches
is far more severe.

if a company wished to have their work pushed back into the freebsd tree this
seems to be quite a complex process. maybe 2 or 3 years ago nvidia requested
some VM changes for their closed source driver to work on freebsd amd64. they
decided to skip the PR databse and directly interacted with developers (i think
mostly alc@). so that kinda prooves that the PR databse is not suited very well
to get patches committed to freebsd; instead contacting with developers
directly seems to be far more successful.

but again (as mark pointed out many times) freebsd doesn't have a culture of
bug busting.

cheers.
alex

 
 mcl

-- 
a13x
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214834 - head/sbin/pflogd

2010-11-05 Thread Rui Paulo
Author: rpaulo
Date: Fri Nov  5 11:31:39 2010
New Revision: 214834
URL: http://svn.freebsd.org/changeset/base/214834

Log:
  Append to CFLAGS, don't clobber it.
  
  Submitted by: loos

Modified:
  head/sbin/pflogd/Makefile

Modified: head/sbin/pflogd/Makefile
==
--- head/sbin/pflogd/Makefile   Fri Nov  5 09:32:32 2010(r214833)
+++ head/sbin/pflogd/Makefile   Fri Nov  5 11:31:39 2010(r214834)
@@ -6,7 +6,7 @@ PROG=   pflogd
 SRCS=  pflogd.c pidfile.c privsep.c privsep_fdpass.c
 MAN=   pflogd.8
 
-CFLAGS=-include ${.CURDIR}/../../lib/libpcap/config.h
+CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h
 
 LDADD= -lpcap -lutil
 DPADD= ${LIBPCAP} ${LIBUTIL}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r214817 - head/sys/teken

2010-11-05 Thread Skip Ford
Mark Linimon wrote:
 I'm always looking for suggestions on how we can get more committers
 interested in PRs (especially those with patches).

For PRs with patches that apply to code with a listed MAINTAINER, that
maintainer should have to address the PR within 3 days or their own
commits should get blocked until they do.  

Maintainers will then either handle PRs, or stop listing themselves as
maintainers, which would open their code up to other committers to
commit without maintainer review.  It's a win either way, IMO, as far as
handling PRs goes.

-- 
Skip
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r214817 - head/sys/teken

2010-11-05 Thread Alexander Best
On Fri Nov  5 10, Skip Ford wrote:
 Mark Linimon wrote:
  I'm always looking for suggestions on how we can get more committers
  interested in PRs (especially those with patches).
 
 For PRs with patches that apply to code with a listed MAINTAINER, that
 maintainer should have to address the PR within 3 days or their own
 commits should get blocked until they do.  
 
 Maintainers will then either handle PRs, or stop listing themselves as
 maintainers, which would open their code up to other committers to
 commit without maintainer review.  It's a win either way, IMO, as far as
 handling PRs goes.

*lol* that would be like polititians agreeing to have their salaries cut in
half: NOT GOING TO HAPPEN!

 
 -- 
 Skip

-- 
a13x
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r214817 - head/sys/teken

2010-11-05 Thread Ed Maste
On Fri, Nov 05, 2010 at 12:56:21AM +, Ed Schouten wrote:

 Author: ed
 Date: Fri Nov  5 00:56:21 2010
 New Revision: 214817
 URL: http://svn.freebsd.org/changeset/base/214817
 
 Log:
   Partially implement the mysterious cons25 \e[x escape sequence.
   
   It seems the terminfo library on some systems (OS X, Linux) may emit the
   sequence \e[x to reset to default attributes. Apart from using the
   zero-command, this escape sequence allows many more operations, such as
   setting ANSI colors. I don't see this used anywhere, so this should be
   sufficient for now.
   
   This deficiency was spotted by the Debian GNU/kFreeBSD. They have their
   own patch, which is slightly flawed in my opinion. I don't know why they
   never reported this issue to us.

I'm not sure what happened with this specific patch, but as a general
plan they wish to push patches upstream, although it seems we've rejected
several of their diffs so far.  The full set of their patches are in their
svn repository at

http://svn.debian.org/wsvn/glibc-bsd/trunk/kfreebsd-8/debian/patches/

and are divided into three categories - changes that are already in our
tree now but were not in 8.1, patches they intend to send our way, and
patches that are not appropriate for FreeBSD or that we've rejected.

I'll see if I can find one of the GNU/kFreeBSD people willing to write
up a short summary for each of the patches they apply (and take the
thread to freebsd-hackers, if so).

-Ed
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214835 - in head/sys: amd64/amd64 arm/arm i386/i386 ia64/ia64 mips/mips pc98/pc98 powerpc/aim powerpc/booke sparc64/sparc64 sun4v/sun4v

2010-11-05 Thread John Baldwin
Author: jhb
Date: Fri Nov  5 13:42:58 2010
New Revision: 214835
URL: http://svn.freebsd.org/changeset/base/214835

Log:
  Adjust the order of operations in spinlock_enter() and spinlock_exit() to
  work properly with single-stepping in a kernel debugger.  Specifically,
  these routines have always disabled interrupts before increasing the nesting
  count and restored the prior state of interrupts after decreasing the nesting
  count to avoid problems with a nested interrupt not disabling interrupts
  when acquiring a spin lock.  However, trap interrupts for single-stepping
  can still occur even when interrupts are disabled.  Now the saved state of
  interrupts is not saved in the thread until after interrupts have been
  disabled and the nesting count has been increased.  Similarly, the saved
  state from the thread cannot be read once the nesting count has been
  decreased to zero.  To fix this, use temporary variables to store interrupt
  state and shuffle it between the thread's MD area and the appropriate
  registers.
  
  In cooperation with:  bde
  MFC after: 1 month

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/arm/arm/machdep.c
  head/sys/i386/i386/machdep.c
  head/sys/ia64/ia64/machdep.c
  head/sys/mips/mips/machdep.c
  head/sys/pc98/pc98/machdep.c
  head/sys/powerpc/aim/machdep.c
  head/sys/powerpc/booke/machdep.c
  head/sys/sparc64/sparc64/machdep.c
  head/sys/sun4v/sun4v/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Fri Nov  5 11:31:39 2010
(r214834)
+++ head/sys/amd64/amd64/machdep.c  Fri Nov  5 13:42:58 2010
(r214835)
@@ -1762,11 +1762,15 @@ void
 spinlock_enter(void)
 {
struct thread *td;
+   register_t flags;
 
td = curthread;
-   if (td-td_md.md_spinlock_count == 0)
-   td-td_md.md_saved_flags = intr_disable();
-   td-td_md.md_spinlock_count++;
+   if (td-td_md.md_spinlock_count == 0) {
+   flags = intr_disable();
+   td-td_md.md_spinlock_count = 1;
+   td-td_md.md_saved_flags = flags;
+   } else
+   td-td_md.md_spinlock_count++;
critical_enter();
 }
 
@@ -1774,12 +1778,14 @@ void
 spinlock_exit(void)
 {
struct thread *td;
+   register_t flags;
 
td = curthread;
critical_exit();
+   flags = td-td_md.md_saved_flags;
td-td_md.md_spinlock_count--;
if (td-td_md.md_spinlock_count == 0)
-   intr_restore(td-td_md.md_saved_flags);
+   intr_restore(flags);
 }
 
 /*

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Fri Nov  5 11:31:39 2010(r214834)
+++ head/sys/arm/arm/machdep.c  Fri Nov  5 13:42:58 2010(r214835)
@@ -493,11 +493,15 @@ void
 spinlock_enter(void)
 {
struct thread *td;
+   register_t cspr;
 
td = curthread;
-   if (td-td_md.md_spinlock_count == 0)
-   td-td_md.md_saved_cspr = disable_interrupts(I32_bit | F32_bit);
-   td-td_md.md_spinlock_count++;
+   if (td-td_md.md_spinlock_count == 0) {
+   cspr = disable_interrupts(I32_bit | F32_bit);
+   td-td_md.md_spinlock_count = 1;
+   td-td_md.md_saved_cspr = cspr;
+   } else
+   td-td_md.md_spinlock_count++;
critical_enter();
 }
 
@@ -505,12 +509,14 @@ void
 spinlock_exit(void)
 {
struct thread *td;
+   register_t cspr;
 
td = curthread;
critical_exit();
+   cspr = td-td_md.md_saved_cspr;
td-td_md.md_spinlock_count--;
if (td-td_md.md_spinlock_count == 0)
-   restore_interrupts(td-td_md.md_saved_cspr);
+   restore_interrupts(cspr);
 }
 
 /*

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cFri Nov  5 11:31:39 2010
(r214834)
+++ head/sys/i386/i386/machdep.cFri Nov  5 13:42:58 2010
(r214835)
@@ -2997,11 +2997,15 @@ void
 spinlock_enter(void)
 {
struct thread *td;
+   register_t flags;
 
td = curthread;
-   if (td-td_md.md_spinlock_count == 0)
-   td-td_md.md_saved_flags = intr_disable();
-   td-td_md.md_spinlock_count++;
+   if (td-td_md.md_spinlock_count == 0) {
+   flags = intr_disable();
+   td-td_md.md_spinlock_count = 1;
+   td-td_md.md_saved_flags = flags;
+   } else
+   td-td_md.md_spinlock_count++;
critical_enter();
 }
 
@@ -3009,12 +3013,14 @@ void
 spinlock_exit(void)
 {
struct thread *td;
+   register_t flags;
 
td = curthread;
critical_exit();
+   flags = td-td_md.md_saved_flags;
td-td_md.md_spinlock_count--;
if 

svn commit: r214836 - stable/8/share/man/man9

2010-11-05 Thread John Baldwin
Author: jhb
Date: Fri Nov  5 13:45:13 2010
New Revision: 214836
URL: http://svn.freebsd.org/changeset/base/214836

Log:
  MFC 214673: Fix a few typos and style nits in the example code.

Modified:
  stable/8/share/man/man9/sysctl_ctx_init.9
Directory Properties:
  stable/8/share/man/man9/   (props changed)

Modified: stable/8/share/man/man9/sysctl_ctx_init.9
==
--- stable/8/share/man/man9/sysctl_ctx_init.9   Fri Nov  5 13:42:58 2010
(r214835)
+++ stable/8/share/man/man9/sysctl_ctx_init.9   Fri Nov  5 13:45:13 2010
(r214836)
@@ -188,27 +188,27 @@ This example uses contexts to keep track
 struct sysctl_ctx_list clist;
 struct sysctl_oid *oidp;
 int a_int;
-char *string = dynamic sysctl;
+const char *string = dynamic sysctl;
  ...
 
 sysctl_ctx_init(clist);
-oidp = SYSCTL_ADD_NODE( clist, SYSCTL_STATIC_CHILDREN(/* tree top */),
-   OID_AUTO, newtree, CTFLAG_RW, 0, new top level tree);
-oidp = SYSCTL_ADD_INT( clist, SYSCTL_CHILDREN(oidp),
+oidp = SYSCTL_ADD_NODE(clist, SYSCTL_STATIC_CHILDREN(/* tree top */),
+   OID_AUTO, newtree, CTLFLAG_RW, 0, new top level tree);
+oidp = SYSCTL_ADD_INT(clist, SYSCTL_CHILDREN(oidp),
OID_AUTO, newint, CTLFLAG_RW, a_int, 0, new int leaf);
  ...
-oidp = SYSCTL_ADD_NODE( clist, SYSCTL_STATIC_CHILDREN(_debug),
-   OID_AUTO, newtree, CTFLAG_RW, 0, new tree under debug);
-oidp = SYSCTL_ADD_STRING( clist, SYSCTL_CHILDREN(oidp),
-   OID_AUTO, newstring, CTLFLAG_R, string, 0, new string leaf);
+oidp = SYSCTL_ADD_NODE(clist, SYSCTL_STATIC_CHILDREN(_debug),
+   OID_AUTO, newtree, CTLFLAG_RW, 0, new tree under debug);
+oidp = SYSCTL_ADD_STRING(clist, SYSCTL_CHILDREN(oidp),
+   OID_AUTO, newstring, CTLFLAG_RD, string, 0, new string leaf);
  ...
 /* Now we can free up the oids */
-if(sysctl_ctx_free(clist)) {
+if (sysctl_ctx_free(clist)) {
printf(can't free this context - other oids depend on it);
-   return(ENOTEMPTY);
+   return (ENOTEMPTY);
 } else {
-   printf(Success!\\n):
-   return(0);
+   printf(Success!\\n);
+   return (0);
 }
 .Ed
 .Pp
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214837 - stable/7/share/man/man9

2010-11-05 Thread John Baldwin
Author: jhb
Date: Fri Nov  5 13:45:26 2010
New Revision: 214837
URL: http://svn.freebsd.org/changeset/base/214837

Log:
  MFC 214673: Fix a few typos and style nits in the example code.

Modified:
  stable/7/share/man/man9/sysctl_ctx_init.9
Directory Properties:
  stable/7/share/man/man9/   (props changed)

Modified: stable/7/share/man/man9/sysctl_ctx_init.9
==
--- stable/7/share/man/man9/sysctl_ctx_init.9   Fri Nov  5 13:45:13 2010
(r214836)
+++ stable/7/share/man/man9/sysctl_ctx_init.9   Fri Nov  5 13:45:26 2010
(r214837)
@@ -188,27 +188,27 @@ This example uses contexts to keep track
 struct sysctl_ctx_list clist;
 struct sysctl_oid *oidp;
 int a_int;
-char *string = dynamic sysctl;
+const char *string = dynamic sysctl;
  ...
 
 sysctl_ctx_init(clist);
-oidp = SYSCTL_ADD_NODE( clist, SYSCTL_STATIC_CHILDREN(/* tree top */),
-   OID_AUTO, newtree, CTFLAG_RW, 0, new top level tree);
-oidp = SYSCTL_ADD_INT( clist, SYSCTL_CHILDREN(oidp),
+oidp = SYSCTL_ADD_NODE(clist, SYSCTL_STATIC_CHILDREN(/* tree top */),
+   OID_AUTO, newtree, CTLFLAG_RW, 0, new top level tree);
+oidp = SYSCTL_ADD_INT(clist, SYSCTL_CHILDREN(oidp),
OID_AUTO, newint, CTLFLAG_RW, a_int, 0, new int leaf);
  ...
-oidp = SYSCTL_ADD_NODE( clist, SYSCTL_STATIC_CHILDREN(_debug),
-   OID_AUTO, newtree, CTFLAG_RW, 0, new tree under debug);
-oidp = SYSCTL_ADD_STRING( clist, SYSCTL_CHILDREN(oidp),
-   OID_AUTO, newstring, CTLFLAG_R, string, 0, new string leaf);
+oidp = SYSCTL_ADD_NODE(clist, SYSCTL_STATIC_CHILDREN(_debug),
+   OID_AUTO, newtree, CTLFLAG_RW, 0, new tree under debug);
+oidp = SYSCTL_ADD_STRING(clist, SYSCTL_CHILDREN(oidp),
+   OID_AUTO, newstring, CTLFLAG_RD, string, 0, new string leaf);
  ...
 /* Now we can free up the oids */
-if(sysctl_ctx_free(clist)) {
+if (sysctl_ctx_free(clist)) {
printf(can't free this context - other oids depend on it);
-   return(ENOTEMPTY);
+   return (ENOTEMPTY);
 } else {
-   printf(Success!\\n):
-   return(0);
+   printf(Success!\\n);
+   return (0);
 }
 .Ed
 .Pp
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r214817 - head/sys/teken

2010-11-05 Thread Bruce Evans

On Fri, 5 Nov 2010, Ed Schouten wrote:


Log:
 Partially implement the mysterious cons25 \e[x escape sequence.


CSI x is not mysterious.  It is from pccons in 386BSD (probably from
Net/2, since pccons is also in 4.4BSD).  I think it came from pc3
originally.  It is still in pccons in NetBSD, at least in 2005.

NetBSD pccons only supports CSI [0-3];*x, even in 2005.  I added CSI
[5-7];*x (set reverse video colors) to pccons in FreeBSD-1.  syscons
supported all these until recently.  Syscons also had the aliases
CSI =F/G/H/I, where F/G set normal video colors and H/I set reverse
video colors.  Now it only has F/G, and has lost its support for
setting reverse video colors.

I use CSI x in ~/.profile since it was more portable that CSI =F/G/H/I.
This broke when I downgraded to -current, so I now use the partial
workaround of setting reverse video colors in $TERMCAP:

%%%
case $TERM in
cons25)
# Broken in -current:
printf '\033[x\033[2;6x\033[1;0x\033[6;7x\033[5;4x'
# CSI 0x reset to defaults
# CSI 2;6x   set ansi foreground cyan
#default to ansi background black
# CSI 6;7x   set ansi reverse foreground white
# CSI 5;4x   set ansi reverse background blue
# Part that still works in -current:
printf '\033[=3F\033[=0G'
# CSI =3Fset ansi foreground cyan (not different color numbers)
# CSI =0Gset ansi background black
;;
linux)
# I don't remember what this does.  Probably less.
printf '\033[36;40m\033[1;4]\033[8]'
;;
esac
case $TERM in
cons25)
# Workaround for -current brokenness: set colors in termcap, and use better
# colors too.  This loses mainly the simple restore of defaults by CSI m,
# and by expanding the size of the escape sequences.

TERMCAP=$TERM:md=\E[1;37m:so=\E[37;44m:se=\E[39;49m:us=\E[1;33;44m:ue=\E[22;39;49m:tc=$TERM:
;;
esac
%%%

The reasons for this fiddling like this with colors are:

(1) Reverse video that just reverses the colors tends to give a horrible
combination of colors, since the best choices for foreground/background
tend to be the worst choices when they are reversed.  Thus reverse
video should normally be configured to not just reverse the colors,
and there should be a way to control this.  The CSI [6-7]*x sequences
and the CSI =*H/I provided a good way to do this.

(2) The colors selected for reverse video should not be undone by other
color selections or by almost any escape sequence.  the CSI x
sequences and CSI =F/G/H/I sequences work right for this.  They are
not affected by the ANSI color escapes.  Of course, an ANSI color
escape will change colors set by CSI x, but then on the next CSI m
to normal or reverse (etc.) mode, the colors selected by CSI x will
be restored.  Only a hard terminal reset should lose the settings
of CSI x.  Hardware terminals are now rare, but ESC c is considered
to be a hard reset and does undo CSI x.  You have to be careful not
to use it.  cons25 may also have a soft reset but I don't remember
what it is.  IIRC, ESC c is from vt100, and vt220 or vt320 had escape
sequences for several levels of softer resets, some involving keeping
color settings and others not.  Termcaps for vt100 mostly don't use
ESC c since it really is a hard reset so it resets too much for most
purposes.

(3) The ANSI color sequences (put in TERMCAP as above) don't work so well
for this.  First you have to put them in TERMCAP and propagate this
to many machines, instead of just writing a single setup sequence on
the machine emulating a terminal.  Then they have to be written on
ever change to/from reverse video/standout/underline.  I've noticed
a couple of bugs involving the normal mode not being restored.
Simpler CSI m sequences tend to restore the normal mode (if there
is one) more reliably.

(4) To be complete, there would be a separate reverse color pair for
every normal color pair (256 combinations even for only 8 colors),
but configuring this would be too painful, and fixing 1 normal
color pair and its corresponding reverse color pair works OK in
practice.  Note that normal reverse video gives a different reverse
pair for every normal pair, and this feature is lost by fixing the
reverse pair.

(5) To be complete, standout, underline and blinking (all 2**N
combinations of these) would be handled similarly, with a CSI x
sequence to select the default colors used in all these modes.
x86 displays have various deficiencies in being able to display
all combinations of attributes simultaneously or at all, and syscons
has too many hard-coded color choices for combinations that are
not directly representable.  But configuring the general case would
be too painful.  In the above, my TERMCAP color choices don't worry
about this, so standout followed by underline would give the colors
for just one of standout or underline depending on which order 

svn commit: r214839 - stable/8/usr.sbin/freebsd-update

2010-11-05 Thread Jaakko Heinonen
Author: jh
Date: Fri Nov  5 16:04:10 2010
New Revision: 214839
URL: http://svn.freebsd.org/changeset/base/214839

Log:
  MFC r212505:
  
  In backup_kernel(), support backing up subdirectories and handle files
  with spaces correctly.

Modified:
  stable/8/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/8/usr.sbin/freebsd-update/   (props changed)

Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/8/usr.sbin/freebsd-update/freebsd-update.sh  Fri Nov  5 13:46:58 
2010(r214838)
+++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh  Fri Nov  5 16:04:10 
2010(r214839)
@@ -2619,11 +2619,13 @@ backup_kernel () {
# not ours, backup_kernel_finddir would have exited, so
# deleting the directory content is as safe as we can make it.
if [ -d $BACKUPKERNELDIR ]; then
-   rm -f $BACKUPKERNELDIR/*
+   rm -fr $BACKUPKERNELDIR
fi
 
-   # Create directory for backup if it doesn't exist.
+   # Create directories for backup.
mkdir -p $BACKUPKERNELDIR
+   mtree -cdn -p ${KERNELDIR} | \
+   mtree -Ue -p ${BACKUPKERNELDIR}  /dev/null
 
# Mark the directory as having been created by freebsd-update.
touch $BACKUPKERNELDIR/.freebsd-update
@@ -2644,9 +2646,8 @@ backup_kernel () {
fi
 
# Backup all the kernel files using hardlinks.
-   find $KERNELDIR -type f $FINDFILTER | \
-   sed -Ee s,($KERNELDIR)/?(.*),\1/\2 ${BACKUPKERNELDIR}/\2, | \
-   xargs -n 2 cp -pl
+   (cd $KERNELDIR  find . -type f $FINDFILTER -exec \
+   cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;)
 
# Re-enable patchname expansion.
set +f
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214840 - head/sys/dev/re

2010-11-05 Thread Pyun YongHyeon
Author: yongari
Date: Fri Nov  5 18:19:54 2010
New Revision: 214840
URL: http://svn.freebsd.org/changeset/base/214840

Log:
  Enable 64bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe
  controllers. Some old PCI controllers may work with DAC but it was
  known to be buggy so 64bit DMA addressing is used only on PCIe
  controllers.

Modified:
  head/sys/dev/re/if_re.c

Modified: head/sys/dev/re/if_re.c
==
--- head/sys/dev/re/if_re.c Fri Nov  5 16:04:10 2010(r214839)
+++ head/sys/dev/re/if_re.c Fri Nov  5 18:19:54 2010(r214840)
@@ -934,6 +934,7 @@ re_dma_map_addr(void *arg, bus_dma_segme
 static int
 re_allocmem(device_t dev, struct rl_softc *sc)
 {
+   bus_addr_t  lowaddr;
bus_size_t  rx_list_size, tx_list_size;
int error;
int i;
@@ -947,10 +948,13 @@ re_allocmem(device_t dev, struct rl_soft
 * register should be set. However some RealTek chips are known
 * to be buggy on DAC handling, therefore disable DAC by limiting
 * DMA address space to 32bit. PCIe variants of RealTek chips
-* may not have the limitation but I took safer path.
+* may not have the limitation.
 */
+   lowaddr = BUS_SPACE_MAXADDR;
+   if ((sc-rl_flags  RL_FLAG_PCIE) == 0)
+   lowaddr = BUS_SPACE_MAXADDR_32BIT;
error = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0,
-   BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+   lowaddr, BUS_SPACE_MAXADDR, NULL, NULL,
BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0,
NULL, NULL, sc-rl_parent_tag);
if (error) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214841 - head/sys/dev/re

2010-11-05 Thread Pyun YongHyeon
Author: yongari
Date: Fri Nov  5 18:23:43 2010
New Revision: 214841
URL: http://svn.freebsd.org/changeset/base/214841

Log:
  Remove extra white spaces.

Modified:
  head/sys/dev/re/if_re.c

Modified: head/sys/dev/re/if_re.c
==
--- head/sys/dev/re/if_re.c Fri Nov  5 18:19:54 2010(r214840)
+++ head/sys/dev/re/if_re.c Fri Nov  5 18:23:43 2010(r214841)
@@ -880,7 +880,7 @@ re_probe(device_t dev)
uint16_tdevid, vendor;
uint16_trevid, sdevid;
int i;
-   
+
vendor = pci_get_vendor(dev);
devid = pci_get_device(dev);
revid = pci_get_revid(dev);
@@ -1121,7 +1121,7 @@ re_attach(device_t dev)
/*
 * Prefer memory space register mapping over IO space.
 * Because RTL8169SC does not seem to work when memory mapping
-* is used always activate io mapping. 
+* is used always activate io mapping.
 */
if (devid == RT_DEVICEID_8169SC)
prefer_iomap = 1;
@@ -2111,7 +2111,7 @@ re_tick(void *xsc)
 * Reclaim transmitted frames here. Technically it is not
 * necessary to do here but it ensures periodic reclamation
 * regardless of Tx completion interrupt which seems to be
-* lost on PCIe based controllers under certain situations. 
+* lost on PCIe based controllers under certain situations.
 */
re_txeof(sc);
re_watchdog(sc);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214842 - head/sys/dev/re

2010-11-05 Thread Pyun YongHyeon
Author: yongari
Date: Fri Nov  5 18:24:50 2010
New Revision: 214842
URL: http://svn.freebsd.org/changeset/base/214842

Log:
  style(9).

Modified:
  head/sys/dev/re/if_re.c

Modified: head/sys/dev/re/if_re.c
==
--- head/sys/dev/re/if_re.c Fri Nov  5 18:23:43 2010(r214841)
+++ head/sys/dev/re/if_re.c Fri Nov  5 18:24:50 2010(r214842)
@@ -2020,9 +2020,9 @@ re_rxeof(struct rl_softc *sc, int *rx_np
if (rx_npktsp != NULL)
*rx_npktsp = rx_npkts;
if (maxpkt)
-   return(EAGAIN);
+   return (EAGAIN);
 
-   return(0);
+   return (0);
 }
 
 static void
@@ -2839,7 +2839,7 @@ re_ioctl(struct ifnet *ifp, u_long comma
if (ifr-ifr_reqcap  IFCAP_POLLING) {
error = ether_poll_register(re_poll, ifp);
if (error)
-   return(error);
+   return (error);
RL_LOCK(sc);
/* Disable interrupts */
CSR_WRITE_2(sc, RL_IMR, 0x);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214843 - in head/sys/dev/usb: net serial

2010-11-05 Thread Nick Hibma
Author: n_hibma
Date: Fri Nov  5 19:12:48 2010
New Revision: 214843
URL: http://svn.freebsd.org/changeset/base/214843

Log:
  Implement ucom_set_pnpinfo_usb() providing ttyname and port number
  information through devd. My E220 now produces the notification (1 line):
  
+u3g0 at bus=1 hubaddr=1 port=0 devaddr=2 interface=0 \
vendor=0x12d1 product=0x1003 devclass=0x00 devsubclass=0x00 \
sernum= release=0x intclass=0xff intsubclass=0xff \
ttyname=U0 ttyports=2 on uhub0
  
  Note: serial/ufoma and net/uhso still provide port number and tty name
  (uhso only) information through sysctls, which should now be removed.
  
  Reviewed by:  hpselasky

Modified:
  head/sys/dev/usb/net/uhso.c
  head/sys/dev/usb/serial/u3g.c
  head/sys/dev/usb/serial/uark.c
  head/sys/dev/usb/serial/ubsa.c
  head/sys/dev/usb/serial/ubser.c
  head/sys/dev/usb/serial/uchcom.c
  head/sys/dev/usb/serial/ucycom.c
  head/sys/dev/usb/serial/ufoma.c
  head/sys/dev/usb/serial/uftdi.c
  head/sys/dev/usb/serial/ugensa.c
  head/sys/dev/usb/serial/uipaq.c
  head/sys/dev/usb/serial/umct.c
  head/sys/dev/usb/serial/umodem.c
  head/sys/dev/usb/serial/umoscom.c
  head/sys/dev/usb/serial/uplcom.c
  head/sys/dev/usb/serial/usb_serial.c
  head/sys/dev/usb/serial/usb_serial.h
  head/sys/dev/usb/serial/uslcom.c
  head/sys/dev/usb/serial/uvisor.c
  head/sys/dev/usb/serial/uvscom.c

Modified: head/sys/dev/usb/net/uhso.c
==
--- head/sys/dev/usb/net/uhso.c Fri Nov  5 18:24:50 2010(r214842)
+++ head/sys/dev/usb/net/uhso.c Fri Nov  5 19:12:48 2010(r214843)
@@ -902,6 +902,7 @@ uhso_probe_iface(struct uhso_softc *sc, 
device_printf(sc-sc_dev, ucom_attach 
failed\n);
return (ENXIO);
}
+   ucom_set_pnpinfo_usb(sc-sc_super_ucom, sc-sc_dev);
 
mtx_lock(sc-sc_mtx);
usbd_transfer_start(sc-sc_xfer[UHSO_MUX_ENDPT_INTR]);
@@ -920,6 +921,7 @@ uhso_probe_iface(struct uhso_softc *sc, 
device_printf(sc-sc_dev, ucom_attach failed\n);
return (ENXIO);
}
+   ucom_set_pnpinfo_usb(sc-sc_super_ucom, sc-sc_dev);
}
else {
UHSO_DPRINTF(0, Unknown type %x\n, type);

Modified: head/sys/dev/usb/serial/u3g.c
==
--- head/sys/dev/usb/serial/u3g.c   Fri Nov  5 18:24:50 2010
(r214842)
+++ head/sys/dev/usb/serial/u3g.c   Fri Nov  5 19:12:48 2010
(r214843)
@@ -818,8 +818,10 @@ u3g_attach(device_t dev)
DPRINTF(ucom_attach failed\n);
goto detach;
}
+   ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev);
device_printf(dev, Found %u port%s.\n, sc-sc_numports,
sc-sc_numports  1 ? s:);
+
return (0);
 
 detach:

Modified: head/sys/dev/usb/serial/uark.c
==
--- head/sys/dev/usb/serial/uark.c  Fri Nov  5 18:24:50 2010
(r214842)
+++ head/sys/dev/usb/serial/uark.c  Fri Nov  5 19:12:48 2010
(r214843)
@@ -227,6 +227,8 @@ uark_attach(device_t dev)
DPRINTF(ucom_attach failed\n);
goto detach;
}
+   ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev);
+
return (0); /* success */
 
 detach:

Modified: head/sys/dev/usb/serial/ubsa.c
==
--- head/sys/dev/usb/serial/ubsa.c  Fri Nov  5 18:24:50 2010
(r214842)
+++ head/sys/dev/usb/serial/ubsa.c  Fri Nov  5 19:12:48 2010
(r214843)
@@ -331,6 +331,8 @@ ubsa_attach(device_t dev)
DPRINTF(ucom_attach failed\n);
goto detach;
}
+   ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev);
+
return (0);
 
 detach:

Modified: head/sys/dev/usb/serial/ubser.c
==
--- head/sys/dev/usb/serial/ubser.c Fri Nov  5 18:24:50 2010
(r214842)
+++ head/sys/dev/usb/serial/ubser.c Fri Nov  5 19:12:48 2010
(r214843)
@@ -296,6 +296,7 @@ ubser_attach(device_t dev)
if (error) {
goto detach;
}
+   ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev);
 
mtx_lock(sc-sc_mtx);
usbd_xfer_set_stall(sc-sc_xfer[UBSER_BULK_DT_WR]);

Modified: head/sys/dev/usb/serial/uchcom.c
==
--- head/sys/dev/usb/serial/uchcom.cFri Nov  5 18:24:50 2010
(r214842)
+++ head/sys/dev/usb/serial/uchcom.cFri Nov  5 19:12:48 2010
(r214843)
@@ -354,6 +354,8 @@ uchcom_attach(device_t dev)
if (error) {
goto detach;
}
+

Re: svn commit: r214843 - in head/sys/dev/usb: net serial

2010-11-05 Thread Nick Hibma
Forgot to mention:

MFC:2 weeks

On 5 Nov 2010, at 20:12, Nick Hibma wrote:

 Author: n_hibma
 Date: Fri Nov  5 19:12:48 2010
 New Revision: 214843
 URL: http://svn.freebsd.org/changeset/base/214843
 
 Log:
  Implement ucom_set_pnpinfo_usb() providing ttyname and port number
  information through devd. My E220 now produces the notification (1 line):
 
   +u3g0 at bus=1 hubaddr=1 port=0 devaddr=2 interface=0 \
   vendor=0x12d1 product=0x1003 devclass=0x00 devsubclass=0x00 \
   sernum= release=0x intclass=0xff intsubclass=0xff \
   ttyname=U0 ttyports=2 on uhub0
 
  Note: serial/ufoma and net/uhso still provide port number and tty name
  (uhso only) information through sysctls, which should now be removed.
 
  Reviewed by: hpselasky
 
 Modified:
  head/sys/dev/usb/net/uhso.c
  head/sys/dev/usb/serial/u3g.c
  head/sys/dev/usb/serial/uark.c
  head/sys/dev/usb/serial/ubsa.c
  head/sys/dev/usb/serial/ubser.c
  head/sys/dev/usb/serial/uchcom.c
  head/sys/dev/usb/serial/ucycom.c
  head/sys/dev/usb/serial/ufoma.c
  head/sys/dev/usb/serial/uftdi.c
  head/sys/dev/usb/serial/ugensa.c
  head/sys/dev/usb/serial/uipaq.c
  head/sys/dev/usb/serial/umct.c
  head/sys/dev/usb/serial/umodem.c
  head/sys/dev/usb/serial/umoscom.c
  head/sys/dev/usb/serial/uplcom.c
  head/sys/dev/usb/serial/usb_serial.c
  head/sys/dev/usb/serial/usb_serial.h
  head/sys/dev/usb/serial/uslcom.c
  head/sys/dev/usb/serial/uvisor.c
  head/sys/dev/usb/serial/uvscom.c
 
 Modified: head/sys/dev/usb/net/uhso.c
 ==
 --- head/sys/dev/usb/net/uhso.c   Fri Nov  5 18:24:50 2010
 (r214842)
 +++ head/sys/dev/usb/net/uhso.c   Fri Nov  5 19:12:48 2010
 (r214843)
 @@ -902,6 +902,7 @@ uhso_probe_iface(struct uhso_softc *sc, 
   device_printf(sc-sc_dev, ucom_attach 
 failed\n);
   return (ENXIO);
   }
 + ucom_set_pnpinfo_usb(sc-sc_super_ucom, sc-sc_dev);
 
   mtx_lock(sc-sc_mtx);
   usbd_transfer_start(sc-sc_xfer[UHSO_MUX_ENDPT_INTR]);
 @@ -920,6 +921,7 @@ uhso_probe_iface(struct uhso_softc *sc, 
   device_printf(sc-sc_dev, ucom_attach failed\n);
   return (ENXIO);
   }
 + ucom_set_pnpinfo_usb(sc-sc_super_ucom, sc-sc_dev);
   }
   else {
   UHSO_DPRINTF(0, Unknown type %x\n, type);
 
 Modified: head/sys/dev/usb/serial/u3g.c
 ==
 --- head/sys/dev/usb/serial/u3g.c Fri Nov  5 18:24:50 2010
 (r214842)
 +++ head/sys/dev/usb/serial/u3g.c Fri Nov  5 19:12:48 2010
 (r214843)
 @@ -818,8 +818,10 @@ u3g_attach(device_t dev)
   DPRINTF(ucom_attach failed\n);
   goto detach;
   }
 + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev);
   device_printf(dev, Found %u port%s.\n, sc-sc_numports,
   sc-sc_numports  1 ? s:);
 +
   return (0);
 
 detach:
 
 Modified: head/sys/dev/usb/serial/uark.c
 ==
 --- head/sys/dev/usb/serial/uark.cFri Nov  5 18:24:50 2010
 (r214842)
 +++ head/sys/dev/usb/serial/uark.cFri Nov  5 19:12:48 2010
 (r214843)
 @@ -227,6 +227,8 @@ uark_attach(device_t dev)
   DPRINTF(ucom_attach failed\n);
   goto detach;
   }
 + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev);
 +
   return (0); /* success */
 
 detach:
 
 Modified: head/sys/dev/usb/serial/ubsa.c
 ==
 --- head/sys/dev/usb/serial/ubsa.cFri Nov  5 18:24:50 2010
 (r214842)
 +++ head/sys/dev/usb/serial/ubsa.cFri Nov  5 19:12:48 2010
 (r214843)
 @@ -331,6 +331,8 @@ ubsa_attach(device_t dev)
   DPRINTF(ucom_attach failed\n);
   goto detach;
   }
 + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev);
 +
   return (0);
 
 detach:
 
 Modified: head/sys/dev/usb/serial/ubser.c
 ==
 --- head/sys/dev/usb/serial/ubser.c   Fri Nov  5 18:24:50 2010
 (r214842)
 +++ head/sys/dev/usb/serial/ubser.c   Fri Nov  5 19:12:48 2010
 (r214843)
 @@ -296,6 +296,7 @@ ubser_attach(device_t dev)
   if (error) {
   goto detach;
   }
 + ucom_set_pnpinfo_usb(sc-sc_super_ucom, dev);
 
   mtx_lock(sc-sc_mtx);
   usbd_xfer_set_stall(sc-sc_xfer[UBSER_BULK_DT_WR]);
 
 Modified: head/sys/dev/usb/serial/uchcom.c
 ==
 --- head/sys/dev/usb/serial/uchcom.c  Fri Nov  5 18:24:50 2010
 (r214842)
 +++ head/sys/dev/usb/serial/uchcom.c  Fri Nov  5 19:12:48 2010
 (r214843)
 @@ -354,6 +354,8 @@ 

svn commit: r214844 - in head/sys: dev/re pci

2010-11-05 Thread Pyun YongHyeon
Author: yongari
Date: Fri Nov  5 19:28:00 2010
New Revision: 214844
URL: http://svn.freebsd.org/changeset/base/214844

Log:
  Add simple MAC statistics counter reading support. Unfortunately
  useful counters like rl_missed_pkts is 16 bits quantity which is
  too small to hold meaningful information happened in a second. This
  means driver should frequently read these counters in order not to
  lose accuracy and that approach is too inefficient in driver's
  view. Moreover it seems there is no way to trigger an interrupt to
  detect counter near-full or wraparound event as well as lacking
  clearing the MAC counters. Another limitation of reading the
  counters from RealTek controllers is lack of interrupt firing at
  the end of DMA cycle of MAC counter read request such that driver
  have to poll the end of the DMA which is a time consuming process
  as well as inefficient. The more severe issue of the MAC counter
  read request is it takes too long to complete the DMA. All these
  limitation made maintaining MAC counters in driver impractical. For
  now, just provide simple sysctl interface to trigger reading the
  MAC counters. These counters could be used to track down driver
  issues. Users can read MAC counters maintained in controller with
  the following command.
  #sysctl dev.re.0.stats=1
  
  While I'm here add check for validity of dma map and allocated
  memory before unloading/freeing them.
  
  Tested by:rmacklem

Modified:
  head/sys/dev/re/if_re.c
  head/sys/pci/if_rlreg.h

Modified: head/sys/dev/re/if_re.c
==
--- head/sys/dev/re/if_re.c Fri Nov  5 19:12:48 2010(r214843)
+++ head/sys/dev/re/if_re.c Fri Nov  5 19:28:00 2010(r214844)
@@ -123,6 +123,7 @@ __FBSDID($FreeBSD$);
 #include sys/socket.h
 #include sys/lock.h
 #include sys/mutex.h
+#include sys/sysctl.h
 #include sys/taskqueue.h
 
 #include net/if.h
@@ -281,6 +282,9 @@ static void re_clrwol   (struct rl_softc 
 static int re_diag (struct rl_softc *);
 #endif
 
+static void re_add_sysctls (struct rl_softc *);
+static int re_sysctl_stats (SYSCTL_HANDLER_ARGS);
+
 static device_method_t re_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, re_probe),
@@ -1084,6 +1088,35 @@ re_allocmem(device_t dev, struct rl_soft
}
}
 
+   /* Create DMA map for statistics. */
+   error = bus_dma_tag_create(sc-rl_parent_tag, RL_DUMP_ALIGN, 0,
+   BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL,
+   sizeof(struct rl_stats), 1, sizeof(struct rl_stats), 0, NULL, NULL,
+   sc-rl_ldata.rl_stag);
+   if (error) {
+   device_printf(dev, could not create statistics DMA tag\n);
+   return (error);
+   }
+   /* Allocate DMA'able memory for statistics. */
+   error = bus_dmamem_alloc(sc-rl_ldata.rl_stag,
+   (void **)sc-rl_ldata.rl_stats,
+   BUS_DMA_WAITOK | BUS_DMA_COHERENT | BUS_DMA_ZERO,
+   sc-rl_ldata.rl_smap);
+   if (error) {
+   device_printf(dev,
+   could not allocate statistics DMA memory\n);
+   return (error);
+   }
+   /* Load the map for statistics. */
+   sc-rl_ldata.rl_stats_addr = 0;
+   error = bus_dmamap_load(sc-rl_ldata.rl_stag, sc-rl_ldata.rl_smap,
+   sc-rl_ldata.rl_stats, sizeof(struct rl_stats), re_dma_map_addr,
+sc-rl_ldata.rl_stats_addr, BUS_DMA_NOWAIT);
+   if (error != 0 || sc-rl_ldata.rl_stats_addr == 0) {
+   device_printf(dev, could not load statistics DMA memory\n);
+   return (ENOMEM);
+   }
+
return (0);
 }
 
@@ -1374,6 +1407,7 @@ re_attach(device_t dev)
error = re_allocmem(dev, sc);
if (error)
goto fail;
+   re_add_sysctls(sc);
 
ifp = sc-rl_ifp = if_alloc(IFT_ETHER);
if (ifp == NULL) {
@@ -1603,22 +1637,26 @@ re_detach(device_t dev)
/* Unload and free the RX DMA ring memory and map */
 
if (sc-rl_ldata.rl_rx_list_tag) {
-   bus_dmamap_unload(sc-rl_ldata.rl_rx_list_tag,
-   sc-rl_ldata.rl_rx_list_map);
-   bus_dmamem_free(sc-rl_ldata.rl_rx_list_tag,
-   sc-rl_ldata.rl_rx_list,
-   sc-rl_ldata.rl_rx_list_map);
+   if (sc-rl_ldata.rl_rx_list_map)
+   bus_dmamap_unload(sc-rl_ldata.rl_rx_list_tag,
+   sc-rl_ldata.rl_rx_list_map);
+   if (sc-rl_ldata.rl_rx_list_map  sc-rl_ldata.rl_rx_list)
+   bus_dmamem_free(sc-rl_ldata.rl_rx_list_tag,
+   sc-rl_ldata.rl_rx_list,
+   sc-rl_ldata.rl_rx_list_map);
bus_dma_tag_destroy(sc-rl_ldata.rl_rx_list_tag);
}
 
/* Unload and free the TX DMA ring memory and map */
 
if 

svn commit: r214846 - head/sys/dev/xl

2010-11-05 Thread Marius Strobl
Author: marius
Date: Fri Nov  5 19:38:28 2010
New Revision: 214846
URL: http://svn.freebsd.org/changeset/base/214846

Log:
  Correct an inverted check in r213893.

Modified:
  head/sys/dev/xl/if_xl.c

Modified: head/sys/dev/xl/if_xl.c
==
--- head/sys/dev/xl/if_xl.c Fri Nov  5 19:30:30 2010(r214845)
+++ head/sys/dev/xl/if_xl.c Fri Nov  5 19:38:28 2010(r214846)
@@ -1461,7 +1461,7 @@ xl_attach(device_t dev)
 * control registers at all MII addresses.
 */
phy = MII_PHY_ANY;
-   if ((sc-xl_flags  XL_FLAG_PHYOK) != 0)
+   if ((sc-xl_flags  XL_FLAG_PHYOK) == 0)
phy = 24;
error = mii_attach(dev, sc-xl_miibus, ifp, xl_ifmedia_upd,
xl_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214849 - head/sys/dev/acpica

2010-11-05 Thread Jung-uk Kim
Author: jkim
Date: Fri Nov  5 20:24:26 2010
New Revision: 214849
URL: http://svn.freebsd.org/changeset/base/214849

Log:
  Add a forgotten change from the previous commit.

Modified:
  head/sys/dev/acpica/acpi_pci_link.c

Modified: head/sys/dev/acpica/acpi_pci_link.c
==
--- head/sys/dev/acpica/acpi_pci_link.c Fri Nov  5 19:50:09 2010
(r214848)
+++ head/sys/dev/acpica/acpi_pci_link.c Fri Nov  5 20:24:26 2010
(r214849)
@@ -798,7 +798,7 @@ acpi_pci_link_srs_from_links(struct acpi
 
/* Add a new IRQ resource from each link. */
link = sc-pl_links[i];
-   if (newres.Type == ACPI_RESOURCE_TYPE_IRQ) {
+   if (link-l_prs_template.Type == ACPI_RESOURCE_TYPE_IRQ) {
 
/* Build an IRQ resource. */
bcopy(link-l_prs_template, newres,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214851 - head/sys/nfsserver

2010-11-05 Thread Konstantin Belousov
Author: kib
Date: Fri Nov  5 21:13:16 2010
New Revision: 214851
URL: http://svn.freebsd.org/changeset/base/214851

Log:
  Fix a bug in r214049. The nvp == vp case shall be handled specially
  only for !usevget case. If VFS_VGET is working, the vnode shared lock
  is obtained recursively and vput() shall be done, not vunref().
  
  Submitted by: rmacklem
  Tested by:Josh Carroll josh.carroll gmail com
  MFC after:3 days

Modified:
  head/sys/nfsserver/nfs_serv.c

Modified: head/sys/nfsserver/nfs_serv.c
==
--- head/sys/nfsserver/nfs_serv.c   Fri Nov  5 20:58:18 2010
(r214850)
+++ head/sys/nfsserver/nfs_serv.c   Fri Nov  5 21:13:16 2010
(r214851)
@@ -3252,7 +3252,7 @@ again:
nfhp-fh_fsid = nvp-v_mount-mnt_stat.f_fsid;
if ((error1 = VOP_VPTOFH(nvp, nfhp-fh_fid)) == 0)
error1 = VOP_GETATTR(nvp, vap, cred);
-   if (vp == nvp)
+   if (!usevget  vp == nvp)
vunref(nvp);
else
vput(nvp);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214852 - in head/sys/dev/usb: . serial

2010-11-05 Thread Nick Hibma
Author: n_hibma
Date: Fri Nov  5 21:17:55 2010
New Revision: 214852
URL: http://svn.freebsd.org/changeset/base/214852

Log:
  Bugfix: In rev 213509 Alexander committed a duplicate ID for ZTE STOR
  based devices (QUALCOMMINC 0x2000). He made it use SCSI eject instead of
  ZTE STOR eject. This prevented my ZTE MF626 dongle from switching.
  
  - Apply both eject methods for ZTE STOR based devices. Works on my as
well as mav's device.
  - Remove the duplicate.
  - Sort the usbdevs entries for Qualcomm so this won't happen again.
  - Add bootverbose message displaying the fact that we are ejecting (and
how).
  
  Reviewed by:  mav
  MFC after:2 weeks

Modified:
  head/sys/dev/usb/serial/u3g.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/serial/u3g.c
==
--- head/sys/dev/usb/serial/u3g.c   Fri Nov  5 21:13:16 2010
(r214851)
+++ head/sys/dev/usb/serial/u3g.c   Fri Nov  5 21:17:55 2010
(r214852)
@@ -411,7 +411,6 @@ static const struct usb_device_id u3g_de
U3G_DEV(QUALCOMMINC, E0078, 0),
U3G_DEV(QUALCOMMINC, E0082, 0),
U3G_DEV(QUALCOMMINC, E0086, 0),
-   U3G_DEV(QUALCOMMINC, E2000, U3GINIT_SCSIEJECT),
U3G_DEV(QUALCOMMINC, E2002, 0),
U3G_DEV(QUALCOMMINC, E2003, 0),
U3G_DEV(QUALCOMMINC, MF626, 0),
@@ -655,6 +654,12 @@ u3g_test_autoinst(void *arg, struct usb_
if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa))
return; /* no device match */
 
+   if (bootverbose) {
+   printf(Ejecting 0x%04x:0x%04x using method %ld\n,
+  uaa-info.idVendor, uaa-info.idProduct,
+  USB_GET_DRIVER_INFO(uaa));
+   }
+
switch (USB_GET_DRIVER_INFO(uaa)) {
case U3GINIT_HUAWEI:
error = u3g_huawei_init(udev);
@@ -669,7 +674,8 @@ u3g_test_autoinst(void *arg, struct usb_
error = usb_msc_eject(udev, 0, MSC_EJECT_REZERO);
break;
case U3GINIT_ZTESTOR:
-   error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR);
+   error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT);
+   error |= usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR);
break;
case U3GINIT_CMOTECH:
error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH);

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsFri Nov  5 21:13:16 2010(r214851)
+++ head/sys/dev/usb/usbdevsFri Nov  5 21:17:55 2010(r214852)
@@ -2612,15 +2612,11 @@ product QISDA H20_2 0x4519  3G modem
 
 /* Qualcomm products */
 product QUALCOMM CDMA_MSM  0x6000  CDMA Technologies MSM phone
+product QUALCOMM2 MF3300x6613  MF330
 product QUALCOMM2 RWT_FCT  0x3100  RWT FCT-CDMA 2000 1xRTT modem
 product QUALCOMM2 CDMA_MSM 0x3196  CDMA Technologies MSM modem
 product QUALCOMM2 AC8700   0x6000  AC8700
-product QUALCOMM2 MF3300x6613  MF330
 product QUALCOMMINC CDMA_MSM   0x0001  CDMA Technologies MSM modem
-product QUALCOMMINC ZTE_STOR   0x2000  USB ZTE Storage
-product QUALCOMMINC AC8710 0xfff1  3G modem
-product QUALCOMMINC AC2726 0xfff5  3G modem
-product QUALCOMMINC AC8700 0xfffe  CDMA 1xEVDO USB modem
 product QUALCOMMINC E0002  0x0002  3G modem
 product QUALCOMMINC E0003  0x0003  3G modem
 product QUALCOMMINC E0004  0x0004  3G modem
@@ -2686,9 +2682,12 @@ product QUALCOMMINC E00760x0076  3G mode
 product QUALCOMMINC E0078  0x0078  3G modem
 product QUALCOMMINC E0082  0x0082  3G modem
 product QUALCOMMINC E0086  0x0086  3G modem
-product QUALCOMMINC E2000  0x2000  3G modem
+product QUALCOMMINC ZTE_STOR   0x2000  USB ZTE Storage
 product QUALCOMMINC E2002  0x2002  3G modem
 product QUALCOMMINC E2003  0x2003  3G modem
+product QUALCOMMINC AC8710 0xfff1  3G modem
+product QUALCOMMINC AC2726 0xfff5  3G modem
+product QUALCOMMINC AC8700 0xfffe  CDMA 1xEVDO USB modem
 
 /* Quanta products */
 product QUANTA RW6815_10x00ce  HP iPAQ rw6815
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214853 - head/tools/regression/bin/sh/builtins

2010-11-05 Thread Jilles Tjoelker
Author: jilles
Date: Fri Nov  5 21:47:58 2010
New Revision: 214853
URL: http://svn.freebsd.org/changeset/base/214853

Log:
  sh: Add simple tests for printf.
  
  These are not meant as a replacement for tools/regression/usr.bin/printf/*
  but to detect errors specific to making it a shell builtin.

Added:
  head/tools/regression/bin/sh/builtins/printf1.0   (contents, props changed)
  head/tools/regression/bin/sh/builtins/printf2.0   (contents, props changed)

Added: head/tools/regression/bin/sh/builtins/printf1.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/printf1.0 Fri Nov  5 21:47:58 
2010(r214853)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+[ $(printf '%c\0%s%d' x '\' 010 | tr '\0' Z) = 'xZ\8' ]

Added: head/tools/regression/bin/sh/builtins/printf2.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/printf2.0 Fri Nov  5 21:47:58 
2010(r214853)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+[ $(printf '%cZ%s%d' x '\' 010) = 'xZ\8' ]
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214854 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2010-11-05 Thread Xin LI
Author: delphij
Date: Fri Nov  5 22:18:09 2010
New Revision: 214854
URL: http://svn.freebsd.org/changeset/base/214854

Log:
  Validate whether the zfs_cmd_t submitted from userland is not smaller than
  what we have.  Without the check the kernel could accessing memory that
  does not belong to the request struct.
  
  Note that we do not test if the struct equals in size at this time, which
  may faciliate forward compatibility with newer binaries.
  
  Reviewed by:  pjd at MeetBSD CA '2010
  MFC after:1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Nov 
 5 21:47:58 2010(r214853)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Nov 
 5 22:18:09 2010(r214854)
@@ -3627,6 +3627,14 @@ zfsdev_ioctl(struct cdev *dev, u_long cm
uint_t vec;
int error;
 
+   /*
+* Check if we have sufficient kernel memory allocated
+* for the zfs_cmd_t request.  Bail out if not so we
+* will not access undefined memory region.
+*/
+   if (IOCPARM_LEN(cmd)  sizeof(zfs_cmd_t))
+   return (EINVAL);
+
vec = ZFS_IOC(cmd);
 
if (vec = sizeof (zfs_ioc_vec) / sizeof (zfs_ioc_vec[0]))
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214856 - stable/8/sys/arm/mv

2010-11-05 Thread Marius Strobl
Author: marius
Date: Sat Nov  6 01:09:00 2010
New Revision: 214856
URL: http://svn.freebsd.org/changeset/base/214856

Log:
  Fix an instance missed in r212892:
  
  MFC r212413: bus_add_child: change type of order parameter to u_int

Modified:
  stable/8/sys/arm/mv/obio.c

Modified: stable/8/sys/arm/mv/obio.c
==
--- stable/8/sys/arm/mv/obio.c  Sat Nov  6 00:53:54 2010(r214855)
+++ stable/8/sys/arm/mv/obio.c  Sat Nov  6 01:09:00 2010(r214856)
@@ -324,7 +324,7 @@ mbus_activate_resource(device_t dev, dev
 }
 
 static device_t
-mbus_add_child(device_t bus, int order, const char *name, int unit)
+mbus_add_child(device_t bus, u_int order, const char *name, int unit)
 {
struct obio_device *od;
device_t child;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214857 - head/contrib/top

2010-11-05 Thread Xin LI
Author: delphij
Date: Sat Nov  6 03:59:21 2010
New Revision: 214857
URL: http://svn.freebsd.org/changeset/base/214857

Log:
  Inverse display of top(1)'s table header when running in inactive mode.
  
  MFC after:2 weeks

Modified:
  head/contrib/top/display.c
  head/contrib/top/top.h

Modified: head/contrib/top/display.c
==
--- head/contrib/top/display.c  Sat Nov  6 01:09:00 2010(r214856)
+++ head/contrib/top/display.c  Sat Nov  6 03:59:21 2010(r214857)
@@ -694,7 +694,7 @@ char *text;
int width;
 
s = NULL;
-   width = display_width;
+   width = screen_width;
header_length = strlen(text);
if (header_length = width) {
s = malloc((width + 1) * sizeof(char));
@@ -702,6 +702,14 @@ char *text;
return (NULL);
strncpy(s, text, width);
s[width] = '\0';
+   } else {
+   s = malloc((width + 1) * sizeof(char));
+   if (s == NULL)
+   return (NULL);
+   strncpy(s, text, width);
+   while (screen_width  header_length)
+   s[header_length++] = ' ';
+   s[width] = '\0';
}
return (s);
 }
@@ -726,7 +734,7 @@ char *text;
 if (header_status == ON)
 {
putchar('\n');
-   fputs(text, stdout);
+   standout(text, stdout);
lastline++;
 }
 else if (header_status == ERASE)

Modified: head/contrib/top/top.h
==
--- head/contrib/top/top.h  Sat Nov  6 01:09:00 2010(r214856)
+++ head/contrib/top/top.h  Sat Nov  6 03:59:21 2010(r214857)
@@ -14,7 +14,7 @@
 extern int Header_lines;   /* 7 */
 
 /* Maximum number of columns allowed for display */
-#define MAX_COLS   128
+#define MAX_COLS   512
 
 /* Log base 2 of 1024 is 10 (2^10 == 1024) */
 #define LOG102410
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r211553 - head/sys/cddl/compat/opensolaris/kern

2010-11-05 Thread Martin Matuska
I agree with Pawel, we should use FreeBSD.
Is this (+ the dtrace test) going to be changed + set for MFC?

Dňa 28.08.2010 19:27, Pawel Jakub Dawidek  wrote / napísal(a):
 On Sat, Aug 21, 2010 at 11:41:32AM +, Rui Paulo wrote:
 Author: rpaulo
 Date: Sat Aug 21 11:41:32 2010
 New Revision: 211553
 URL: http://svn.freebsd.org/changeset/base/211553

 Log:
   Add sysname to struct opensolaris_utsname. This is needed by one DTrace
   test.
   
   Sponsored by:  The FreeBSD Foundation

 Modified:
   head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c

 Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
 ==
 --- head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c Sat Aug 21 
 11:33:49 2010(r211552)
 +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c Sat Aug 21 
 11:41:32 2010(r211553)
 @@ -38,7 +38,8 @@ __FBSDID($FreeBSD$);
  char hw_serial[11] = 0;
  
  struct opensolaris_utsname utsname = {
 -.nodename = unset
 +.nodename = unset,
 +.sysname  = SunOS
 
 This collides with the changes I have in perforce. Could you take a look at:
 
   //depot/user/pjd/zfs/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
   //depot/user/pjd/zfs/sys/cddl/compat/opensolaris/sys/misc.h
 
 I'd prefer sysname to say FreeBSD on FreeBSD, rather than SunOS.
 I see it is being used in one DTrace test. Changing 'tst.str.d.out' to
 expect FreeBSD instead of SunOS is ok?
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org