Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts

2011-12-03 Thread Joel Dahl
On 02-12-2011  8:30, Ken Smith wrote:
 On Fri, 2011-12-02 at 14:18 +0100, Erik Cederstrand wrote:
  Den 02/12/2011 kl. 10.44 skrev Joel Dahl:
  
   On 02-12-2011  0:38, Ken Smith wrote:
   Author: kensmith
   Date: Fri Dec  2 00:38:47 2011
   New Revision: 228192
   URL: http://svn.freebsd.org/changeset/base/228192
   
   Log:
Add a screen that asks if the user would like to enable crash dumps,
giving them a very brief description of the trade-offs.  Whether the
user opts in or out add an entry to what will become /etc/rc.conf
explaining what dumpdev is and how to turn on/off crash dumps.  The 
   folks
who handle interacting with users submitting PRs have asked for this.
   
   Hmm. Two things I'd like to bring up:
   
   * Not specifically aimed at this commit, but my recommendation
would be that we keep bsdinstall as simple as possible: installing 
   FreeBSD
should require a minimum amount of keystrokes. I realise this is just one
more screen, but I hope we don't turn bsdinstall into a configuration
utility where you can disable/enable just about anything in rc.conf.
   
   * Mentioning future system crashes during installation feels awkward. Is 
   that
really what we want? I understand the problem and how this helps us with
debugging, but this is like saying to users that what they are installing
is unstable and that it'll eventuelly crash and die. I know we discussed
ways of making crash dumps smarter in order to not fill up /var, which in
turn would allow us to always have it on. Maybe that is the right path?
  
  Maybe do away with the dialog, and then unconditionally enable textdump in
  rc.conf, adding the magic so textdump_enable=YES sets up textdump with
  sane defaults.
  
  Thanks,
  Erik
  
 
 This just implements what we seemed to settle on during the latest round
 of several discussions we've had about this issue.  It comes up each
 I've turned off dumpdev as part of converting head into a stable branch,
 which is a step that got started way before I started being the one to
 do it.  I'll be happy to see what I just added go away but the
 pre-condition for that is infrastructure that prevents crash dumps
 (of any form, including textdumps) from filling up /var if the user
 turns out to be clueless about them and doesn't realize they should
 pay attention to them.

Thanks for the explanation Ken. I'm fine with this being in the release
but I was curious about the discussion resulting in this change (because I
obviously didn't see it). It sounds like we've got another project to hack
on before 10.0. :-)

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


Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts

2011-12-03 Thread Joel Dahl
On 02-12-2011 18:46, Bruce Cran wrote:
 On 02/12/2011 09:44, Joel Dahl wrote:
  * Not specifically aimed at this commit, but my recommendation
 would be that we keep bsdinstall as simple as possible: installing 
  FreeBSD
 should require a minimum amount of keystrokes. I realise this is just one
 more screen, but I hope we don't turn bsdinstall into a configuration
 utility where you can disable/enable just about anything in rc.conf.
 
 This is an argument I see again and again.

Yes, and now we've got bsdinstall instead of sysinstall. Much better. Some 
(most?)
people want the installer to just install the OS and then get out of the way, as
quickly as possible.

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


Re: svn commit: r228207 - head/sys/kern

2011-12-03 Thread Ivan Klymenko
В Fri, 2 Dec 2011 19:59:46 + (UTC)
John Baldwin j...@freebsd.org пишет:

 Author: jhb
 Date: Fri Dec  2 19:59:46 2011
 New Revision: 228207
 URL: http://svn.freebsd.org/changeset/base/228207
 
 Log:
   When changing the user priority of a thread, change the real
 priority in addition to the user priority for threads whose current
 real priority is equal to the previous user priority or if the new
 priority is a real-time priority.  This allows priority changes of
 other threads to have an immediate effect.
   
   MFC after:  2 weeks
 
 Modified:
   head/sys/kern/kern_resource.c
 
 Modified: head/sys/kern/kern_resource.c
 ==
 --- head/sys/kern/kern_resource.c Fri Dec  2 19:56:46
 2011  (r228206) +++ head/sys/kern/kern_resource.c Fri
 Dec  2 19:59:46 2011  (r228207) @@ -488,8 +488,9 @@
 rtp_to_pri(struct rtprio *rtp, struct th sched_class(td,
 rtp-type);   /* XXX fix */ oldpri = td-td_user_pri;
   sched_user_prio(td, newpri);
 - if (curthread == td)
 - sched_prio(curthread, td-td_user_pri); /* XXX
 dubious */
 + if (td-td_user_pri != oldpri  (td == curthread ||
 + td-td_priority == oldpri || td-td_user_pri =
 PRI_MAX_REALTIME))
 + sched_prio(td, td-td_user_pri);
   if (TD_ON_UPILOCK(td)  oldpri != newpri) {
   critical_enter();
   thread_unlock(td);
 ___
 svn-src-...@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
 
 

Thank you!
It's a little corrected the situation with interactivity with using ULE
scheduler...
But quite a bit... :)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228218 - head/sys/kern

2011-12-03 Thread Peter Holm
Author: pho
Date: Sat Dec  3 12:28:33 2011
New Revision: 228218
URL: http://svn.freebsd.org/changeset/base/228218

Log:
  Rename copyin_timeout32 to umtx_copyin_timeout32 and move parameter
  check here. Include check for negative seconds value.
  
  In collaboration with:kib
  MFC after:1 week

Modified:
  head/sys/kern/kern_umtx.c

Modified: head/sys/kern/kern_umtx.c
==
--- head/sys/kern/kern_umtx.c   Sat Dec  3 02:27:26 2011(r228217)
+++ head/sys/kern/kern_umtx.c   Sat Dec  3 12:28:33 2011(r228218)
@@ -3267,15 +3267,21 @@ struct timespec32 {
 };
 
 static inline int
-copyin_timeout32(void *addr, struct timespec *tsp)
+umtx_copyin_timeout32(void *addr, struct timespec *tsp)
 {
struct timespec32 ts32;
int error;
 
error = copyin(addr, ts32, sizeof(struct timespec32));
if (error == 0) {
-   tsp-tv_sec = ts32.tv_sec;
-   tsp-tv_nsec = ts32.tv_nsec;
+   if (ts32.tv_sec  0 ||
+   ts32.tv_nsec = 10 ||
+   ts32.tv_nsec  0)
+   error = EINVAL;
+   else {
+   tsp-tv_sec = ts32.tv_sec;
+   tsp-tv_nsec = ts32.tv_nsec;
+   }
}
return (error);
 }
@@ -3290,13 +3296,9 @@ __umtx_op_lock_umtx_compat32(struct thre
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin_timeout32(uap-uaddr2, timeout);
+   error = umtx_copyin_timeout32(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0) {
-   return (EINVAL);
-   }
ts = timeout;
}
return (do_lock_umtx32(td, uap-obj, uap-val, ts));
@@ -3317,12 +3319,9 @@ __umtx_op_wait_compat32(struct thread *t
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin_timeout32(uap-uaddr2, timeout);
+   error = umtx_copyin_timeout32(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0)
-   return (EINVAL);
ts = timeout;
}
return do_wait(td, uap-obj, uap-val, ts, 1, 0);
@@ -3338,12 +3337,9 @@ __umtx_op_lock_umutex_compat32(struct th
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin_timeout32(uap-uaddr2, timeout);
+   error = umtx_copyin_timeout32(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0)
-   return (EINVAL);
ts = timeout;
}
return do_lock_umutex(td, uap-obj, ts, 0);
@@ -3359,12 +3355,9 @@ __umtx_op_wait_umutex_compat32(struct th
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin_timeout32(uap-uaddr2, timeout);
+   error = umtx_copyin_timeout32(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0)
-   return (EINVAL);
ts = timeout;
}
return do_lock_umutex(td, uap-obj, ts, _UMUTEX_WAIT);
@@ -3380,12 +3373,9 @@ __umtx_op_cv_wait_compat32(struct thread
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin_timeout32(uap-uaddr2, timeout);
+   error = umtx_copyin_timeout32(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0)
-   return (EINVAL);
ts = timeout;
}
return (do_cv_wait(td, uap-obj, uap-uaddr1, ts, uap-val));
@@ -3401,13 +3391,9 @@ __umtx_op_rw_rdlock_compat32(struct thre
if (uap-uaddr2 == NULL) {
error = do_rw_rdlock(td, uap-obj, uap-val, 0);
} else {
-   error = copyin_timeout32(uap-uaddr2, timeout);
+   error = umtx_copyin_timeout32(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0) {
-   return (EINVAL);
-   }
error = do_rw_rdlock2(td, uap-obj, uap-val, timeout);
}
return (error);
@@ -3423,13 +3409,9 @@ __umtx_op_rw_wrlock_compat32(struct thre
if (uap-uaddr2 == NULL) {
  

svn commit: r228219 - head/sys/kern

2011-12-03 Thread Peter Holm
Author: pho
Date: Sat Dec  3 12:30:58 2011
New Revision: 228219
URL: http://svn.freebsd.org/changeset/base/228219

Log:
  Add umtx_copyin_timeout() and move parameter checks here.
  
  In collaboration with:kib
  MFC after:1 week

Modified:
  head/sys/kern/kern_umtx.c

Modified: head/sys/kern/kern_umtx.c
==
--- head/sys/kern/kern_umtx.c   Sat Dec  3 12:28:33 2011(r228218)
+++ head/sys/kern/kern_umtx.c   Sat Dec  3 12:30:58 2011(r228219)
@@ -2898,6 +2898,21 @@ sys__umtx_unlock(struct thread *td, stru
return do_unlock_umtx(td, uap-umtx, td-td_tid);
 }
 
+inline int
+umtx_copyin_timeout(const void *addr, struct timespec *tsp)
+{
+   int error;
+
+   error = copyin(addr, tsp, sizeof(struct timespec));
+   if (error == 0) {
+   if (tsp-tv_sec  0 ||
+   tsp-tv_nsec = 10 ||
+   tsp-tv_nsec  0)
+   error = EINVAL;
+   }
+   return (error);
+}
+
 static int
 __umtx_op_lock_umtx(struct thread *td, struct _umtx_op_args *uap)
 {
@@ -2908,13 +2923,9 @@ __umtx_op_lock_umtx(struct thread *td, s
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin(uap-uaddr2, timeout, sizeof(timeout));
+   error = umtx_copyin_timeout(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0) {
-   return (EINVAL);
-   }
ts = timeout;
}
return (do_lock_umtx(td, uap-obj, uap-val, ts));
@@ -2935,12 +2946,9 @@ __umtx_op_wait(struct thread *td, struct
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin(uap-uaddr2, timeout, sizeof(timeout));
+   error = umtx_copyin_timeout(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0)
-   return (EINVAL);
ts = timeout;
}
return do_wait(td, uap-obj, uap-val, ts, 0, 0);
@@ -2955,12 +2963,9 @@ __umtx_op_wait_uint(struct thread *td, s
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin(uap-uaddr2, timeout, sizeof(timeout));
+   error = umtx_copyin_timeout(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0)
-   return (EINVAL);
ts = timeout;
}
return do_wait(td, uap-obj, uap-val, ts, 1, 0);
@@ -2975,12 +2980,9 @@ __umtx_op_wait_uint_private(struct threa
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin(uap-uaddr2, timeout, sizeof(timeout));
+   error = umtx_copyin_timeout(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0)
-   return (EINVAL);
ts = timeout;
}
return do_wait(td, uap-obj, uap-val, ts, 1, 1);
@@ -3034,14 +3036,9 @@ __umtx_op_lock_umutex(struct thread *td,
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin(uap-uaddr2, timeout,
-   sizeof(timeout));
+   error = umtx_copyin_timeout(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0) {
-   return (EINVAL);
-   }
ts = timeout;
}
return do_lock_umutex(td, uap-obj, ts, 0);
@@ -3063,14 +3060,9 @@ __umtx_op_wait_umutex(struct thread *td,
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin(uap-uaddr2, timeout,
-   sizeof(timeout));
+   error = umtx_copyin_timeout(uap-uaddr2, timeout);
if (error != 0)
return (error);
-   if (timeout.tv_nsec = 10 ||
-   timeout.tv_nsec  0) {
-   return (EINVAL);
-   }
ts = timeout;
}
return do_lock_umutex(td, uap-obj, ts, _UMUTEX_WAIT);
@@ -3104,14 +3096,9 @@ __umtx_op_cv_wait(struct thread *td, str
if (uap-uaddr2 == NULL)
ts = NULL;
else {
-   error = copyin(uap-uaddr2, timeout,
-   sizeof(timeout));
+   error = umtx_copyin_timeout(uap-uaddr2, timeout);

svn commit: r228220 - head/sys/sys

2011-12-03 Thread Peter Holm
Author: pho
Date: Sat Dec  3 12:33:17 2011
New Revision: 228220
URL: http://svn.freebsd.org/changeset/base/228220

Log:
  Add declaration of umtx_copyin_timeout()
  
  In collaboration with:kib
  MFC after:1 week

Modified:
  head/sys/sys/umtx.h

Modified: head/sys/sys/umtx.h
==
--- head/sys/sys/umtx.h Sat Dec  3 12:30:58 2011(r228219)
+++ head/sys/sys/umtx.h Sat Dec  3 12:33:17 2011(r228220)
@@ -223,6 +223,7 @@ umtx_key_match(const struct umtx_key *k1
k1-info.both.b == k2-info.both.b);
 }
 
+int umtx_copyin_timeout(const void *, struct timespec *);
 int umtx_key_get(void *, int, int, struct umtx_key *);
 void umtx_key_release(struct umtx_key *);
 struct umtx_q *umtxq_alloc(void);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228225 - head/share/misc

2011-12-03 Thread Justin Hibbits
Author: jhibbits
Date: Sat Dec  3 14:03:53 2011
New Revision: 228225
URL: http://svn.freebsd.org/changeset/base/228225

Log:
  Add myself to the relevant doc files.
  
  Approved by:  nwhitehorn (mentor)

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Sat Dec  3 14:02:25 2011
(r228224)
+++ head/share/misc/committers-src.dot  Sat Dec  3 14:03:53 2011
(r228225)
@@ -159,6 +159,7 @@ jchandra [label=Jayachandran C.\njchand
 jeff [label=Jeff Roberson\nj...@freebsd.org\n2002/02/21]
 jh [label=Jaakko Heinonen\n...@freebsd.org\n2009/10/02]
 jhb [label=John Baldwin\n...@freebsd.org\n1999/08/23]
+jhibbits [label=Justin Hibbits\njhibb...@freebsd.org\n2011/11/30]
 jilles [label=Jilles Tjoelker\njil...@freebsd.org\n2009/05/22]
 jinmei [label=JINMEI Tatuya\njin...@freebsd.org\n2007/03/17]
 jkim [label=Jung-uk Kim\nj...@freebsd.org\n2005/07/06]
@@ -497,6 +498,7 @@ njl - rpaulo
 njl - sepotvin
 
 nwhitehorn - andreast
+nwhitehorn - jhibbits
 
 obrien - benno
 obrien - groudier
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


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

2011-12-03 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Dec  3 14:54:44 2011
New Revision: 228232
URL: http://svn.freebsd.org/changeset/base/228232

Log:
  Fix a compile warning with clang.
  
  Reported by:  arundel @
  MFC after:3 days

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

Modified: head/sys/dev/usb/usb_msctest.c
==
--- head/sys/dev/usb/usb_msctest.c  Sat Dec  3 14:44:34 2011
(r228231)
+++ head/sys/dev/usb/usb_msctest.c  Sat Dec  3 14:54:44 2011
(r228232)
@@ -477,7 +477,7 @@ bbb_command_start(struct bbb_transfer *s
sc-cmd_len = cmd_len;
memset(sc-cbw.CBWCDB, 0, sizeof(sc-cbw.CBWCDB));
memcpy(sc-cbw.CBWCDB, cmd_ptr, cmd_len);
-   DPRINTFN(1, SCSI cmd = %*D\n, (int)cmd_len, sc-cbw.CBWCDB, :);
+   DPRINTFN(1, SCSI cmd = %*D\n, (int)cmd_len, (char *)sc-cbw.CBWCDB, 
:);
 
mtx_lock(sc-mtx);
usbd_transfer_start(sc-xfer[sc-state]);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228233 - head/sys/kern

2011-12-03 Thread Eitan Adler
Author: eadler (ports committer)
Date: Sat Dec  3 15:41:37 2011
New Revision: 228233
URL: http://svn.freebsd.org/changeset/base/228233

Log:
  - Fix typos s/(more|less) then|\1 than/
  
  Submitted by: Davide Italiano davide.itali...@gmail.com
  Approved by:  brucec
  MFC after:3 days

Modified:
  head/sys/kern/subr_blist.c

Modified: head/sys/kern/subr_blist.c
==
--- head/sys/kern/subr_blist.c  Sat Dec  3 14:54:44 2011(r228232)
+++ head/sys/kern/subr_blist.c  Sat Dec  3 15:41:37 2011(r228233)
@@ -29,7 +29,7 @@
  *
  * This module implements a general bitmap allocator/deallocator.  The
  * allocator eats around 2 bits per 'block'.  The module does not 
- * try to interpret the meaning of a 'block' other then to return 
+ * try to interpret the meaning of a 'block' other than to return 
  * SWAPBLK_NONE on an allocation failure.
  *
  * A radix tree is used to maintain the bitmap.  Two radix constants are
@@ -57,7 +57,7 @@
  * the memory subsystem.  In contrast, the rlist code may allocate memory 
  * on an rlist_free() call.  The non-blocking features of the blist code
  * are used to great advantage in the swap code (vm/nswap_pager.c).  The
- * rlist code uses a little less overall memory then the blist code (but
+ * rlist code uses a little less overall memory than the blist code (but
  * due to swap interleaving not all that much less), but the blist code 
  * scales much, much better.
  *
@@ -72,7 +72,7 @@
  * to cover the number of blocks requested at creation time even if it
  * must be encompassed in larger root-node radix.
  *
- * NOTE: the allocator cannot currently allocate more then 
+ * NOTE: the allocator cannot currently allocate more than 
  * BLIST_BMAP_RADIX blocks per call.  It will panic with 'allocation too 
  * large' if you try.  This is an area that could use improvement.  The 
  * radix is large enough that this restriction does not effect the swap 
@@ -152,7 +152,7 @@ static MALLOC_DEFINE(M_SWAP, SWAP, Sw
  * blist_create() - create a blist capable of handling up to the specified
  * number of blocks
  *
- * blocks - must be greater then 0
+ * blocks - must be greater than 0
  * flags  - malloc flags
  *
  * The smallest blist consists of a single leaf node capable of 
@@ -841,7 +841,7 @@ blst_meta_fill(
  *
  * Initialize our meta structures and bitmaps and calculate the exact
  * amount of space required to manage 'count' blocks - this space may
- * be considerably less then the calculated radix due to the large
+ * be considerably less than the calculated radix due to the large
  * RADIX values we use.
  */
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228196 - in head: share/mk tools/build/options

2011-12-03 Thread Max Khon
Bruce,

On Fri, Dec 2, 2011 at 9:41 PM, Bruce Evans b...@optusnet.com.au wrote:

 Log:
  Revert to conservative defaults. WITH_PROFILE is a default now.

  NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact
  so that the reversal to the WITHOUT_PROFILE will be easier in future.


 Thanks.  Not building profiled libraries might have been best in 1993
 when makeworld took hours (4-10?).  When I optimized makeworld in 1998,
 it still took more than 1 hour but I removing profiling from it was
 intentionally left out (except for bootstrapping).  It would have saved
 only a few minutes.  Now, a whole makeworld should take a few minutes
 and the few extra seconds for profiling libraries doesn't matter.

The real goal was to have reasonable defaults. The definition of
reasonable differs. The definition for some of us is: if I use it it
should be the default. My definition is: the system needs minimum
tweaks for the majority of users.

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


svn commit: r228234 - head/sys/kern

2011-12-03 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Dec  3 15:51:15 2011
New Revision: 228234
URL: http://svn.freebsd.org/changeset/base/228234

Log:
  Make sure the description of pause() is
  equivalent to its implementation.
  No code change.
  
  Suggested by: Bruce Evans
  MFC after:3 days

Modified:
  head/sys/kern/kern_synch.c

Modified: head/sys/kern/kern_synch.c
==
--- head/sys/kern/kern_synch.c  Sat Dec  3 15:41:37 2011(r228233)
+++ head/sys/kern/kern_synch.c  Sat Dec  3 15:51:15 2011(r228234)
@@ -328,7 +328,8 @@ msleep_spin(void *ident, struct mtx *mtx
  * pause() delays the calling thread by the given number of system ticks.
  * During cold bootup, pause() uses the DELAY() function instead of
  * the tsleep() function to do the waiting. The timo argument must be
- * greater than zero.
+ * greater than or equal to zero. A timo value of zero is equivalent
+ * to a timo value of one.
  */
 int
 pause(const char *wmesg, int timo)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228235 - head/lib/libusb

2011-12-03 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Dec  3 16:19:07 2011
New Revision: 228235
URL: http://svn.freebsd.org/changeset/base/228235

Log:
  libusb_open() sets the given device handle to NULL if it
  fails, so there is no need to do it again after returning.
  
  Submitted by: Christoph Mallon
  MFC after:3 days

Modified:
  head/lib/libusb/libusb10.c

Modified: head/lib/libusb/libusb10.c
==
--- head/lib/libusb/libusb10.c  Sat Dec  3 15:51:15 2011(r228234)
+++ head/lib/libusb/libusb10.c  Sat Dec  3 16:19:07 2011(r228235)
@@ -427,8 +427,7 @@ libusb_open_device_with_vid_pid(libusb_c
 */
if (pdesc-idVendor == vendor_id 
pdesc-idProduct == product_id) {
-   if (libusb_open(devs[j], pdev)  0)
-   pdev = NULL;
+   libusb_open(devs[j], pdev);
break;
}
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228236 - head/lib/libusb

2011-12-03 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Dec  3 16:30:47 2011
New Revision: 228236
URL: http://svn.freebsd.org/changeset/base/228236

Log:
  Simplify libusb_open_device_with_vid_pid(): Only set
  pdev to non-NULL on success instead of unconditonally
  setting it and maybe resetting it later.
  
  Submitted by: Christoph Mallon
  MFC after:3 days

Modified:
  head/lib/libusb/libusb10.c

Modified: head/lib/libusb/libusb10.c
==
--- head/lib/libusb/libusb10.c  Sat Dec  3 16:19:07 2011(r228235)
+++ head/lib/libusb/libusb10.c  Sat Dec  3 16:30:47 2011(r228236)
@@ -417,9 +417,12 @@ libusb_open_device_with_vid_pid(libusb_c
if ((i = libusb_get_device_list(ctx, devs))  0)
return (NULL);
 
+   pdev = NULL;
for (j = 0; j  i; j++) {
-   pdev = devs[j]-os_priv;
-   pdesc = libusb20_dev_get_device_desc(pdev);
+   struct libusb20_device *tdev;
+
+   tdev = devs[j]-os_priv;
+   pdesc = libusb20_dev_get_device_desc(tdev);
/*
 * NOTE: The USB library will automatically swap the
 * fields in the device descriptor to be of host
@@ -431,8 +434,6 @@ libusb_open_device_with_vid_pid(libusb_c
break;
}
}
-   if (j == i)
-   pdev = NULL;
 
libusb_free_device_list(devs, 1);
DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, libusb_open_device_width_vid_pid 
leave);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r228243 - in head/sys/dev/usb: . quirk

2011-12-03 Thread Ed Maste
Author: emaste
Date: Sat Dec  3 19:56:52 2011
New Revision: 228243
URL: http://svn.freebsd.org/changeset/base/228243

Log:
  Add quirk for Micron RealSSD eUSB failing on unsupported SCSI command
  
  It appears this device fails if sent a SYNCHRONIZE_CACHE command, so add
  quirk to avoid sending it.
  
  I will follow up with Micron on this issue, and will adjust the quirk if
  necessary based on their feedback.
  
  Reviewed by:  hselasky@

Modified:
  head/sys/dev/usb/quirk/usb_quirk.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==
--- head/sys/dev/usb/quirk/usb_quirk.c  Sat Dec  3 17:29:38 2011
(r228242)
+++ head/sys/dev/usb/quirk/usb_quirk.c  Sat Dec  3 19:56:52 2011
(r228243)
@@ -248,6 +248,7 @@ static struct usb_quirk_entry usb_quirks
USB_QUIRK(MICROTECH, DPCM, 0x, 0x, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY,
UQ_MSC_NO_START_STOP),
+   USB_QUIRK(MICRON, REALSSD, 0x, 0x, UQ_MSC_NO_SYNC_CACHE),
USB_QUIRK(MICROTECH, SCSIDB25, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
USB_QUIRK(MICROTECH, SCSIHD50, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB,

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsSat Dec  3 17:29:38 2011(r228242)
+++ head/sys/dev/usb/usbdevsSat Dec  3 19:56:52 2011(r228243)
@@ -317,6 +317,7 @@ vendor ACTLABS  0x061c  Act Labs
 vendor ALARIS  0x0620  Alaris
 vendor APEX0x0624  Apex
 vendor CREATIVE3   0x062a  Creative Labs
+vendor MICRON  0x0634  Micron Technology
 vendor VIVITAR 0x0636  Vivitar
 vendor GUNZE   0x0637  Gunze Electronics USA
 vendor AVISION 0x0638  Avision
@@ -2226,6 +2227,9 @@ product MSI RT3070_7  0x899a  RT3070
 product MSI RT2573_3   0xa861  RT2573
 product MSI RT2573_4   0xa874  RT2573
 
+/* Micron products */
+product MICRON REALSSD 0x0655  Real SSD eUSB
+
 /* Microsoft products */
 product MICROSOFT SIDEPREC 0x0008  SideWinder Precision Pro
 product MICROSOFT INTELLIMOUSE 0x0009  IntelliMouse
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r227956 - head/usr.bin/procstat

2011-12-03 Thread Mikolaj Golub

On Mon, 28 Nov 2011 13:30:11 -0500 John Baldwin wrote:

 JB On Thursday, November 24, 2011 3:54:06 pm Mikolaj Golub wrote:
  Author: trociny
  Date: Thu Nov 24 20:54:06 2011
  New Revision: 227956
  URL: http://svn.freebsd.org/changeset/base/227956
  
  Log:
usr.bin/procstat

Add -l flag to display resource limits.

PR:bin/161257
Reviewed by:kib
MFC after:2 weeks

 JB Thanks for doing this!  Did you consider making the procstat -l output use
 JB pretty output similar to the output of /usr/bin/limits?  For example,
 JB using infinity instead of -1 and using humanize_number() for finite 
limits
 JB that are in units of bytes?

I tried several variants, from one where for rlimit names rlimit_ident
constants from sys/resource.h are used and units are printed as suffixes:

  PID COMM RLIMIT SOFT   HARD
46150 zsh  cpu 10S   infinity
46150 zsh  fsize  infinity   infinity
46150 zsh  data   524288kB   524288kB
46150 zsh  stack   65536kB65536kB
46150 zsh  core  9765625kB  9765625kB
46150 zsh  rssinfinity   infinity
46150 zsh  memlockinfinity   infinity
46150 zsh  nproc  5547   5547
46150 zsh  nofile11095  11095
46150 zsh  sbsize infinity   infinity
46150 zsh  vmem   infinity   infinity
46150 zsh  npts   infinity   infinity
46150 zsh  swap   infinity   infinity

to one where rlimit names are the same as in limits(1) and units are printed
in separate column:

  PID COMM RLIMIT SOFT   HARD   UNIT  
48885 zsh  cputime  10   infinity   secs  
48885 zsh  filesize   infinity   infinity   bytes 
48885 zsh  datasize524288k524288k   bytes 
48885 zsh  stacksize65536k 65536k   bytes 
48885 zsh  coredumpsize 95367M 95367M   bytes 
48885 zsh  memoryuse  infinity   infinity   bytes 
48885 zsh  memorylocked   infinity   infinity   bytes 
48885 zsh  maxprocesses   5547   5547 
48885 zsh  openfiles 11095  11095 
48885 zsh  sbsize infinity   infinity   bytes 
48885 zsh  vmemoryuse infinity   infinity   bytes 
48885 zsh  pseudo-terminals   infinity   infinity 
48885 zsh  swapuseinfinity   infinity   bytes 

Personally I like the first variant as the most compact and the easiest to
maintain but would be glad to learn what other think about this or may be have
other suggestions.

A couple other variations:

  PID COMM RLIMIT SOFT   HARD   UNIT
47062 zsh  cpu  10   infinity   secs
47062 zsh  fsize  infinity   infinity   bytes   
47062 zsh  data524288k524288k   bytes   
47062 zsh  stack  67108864   67108864   bytes   
47062 zsh  core   9765625k   9765625k   bytes   
47062 zsh  rssinfinity   infinity   bytes   
47062 zsh  memlockinfinity   infinity   bytes   
47062 zsh  nproc  5547   5547   
47062 zsh  nofile11095  11095   
47062 zsh  sbsize infinity   infinity   bytes   
47062 zsh  vmem   infinity   infinity   bytes   
47062 zsh  npts   infinity   infinity   
47062 zsh  swap   infinity   infinity   bytes   

  PID COMM   RLIMIT   SOFT   HARD   UNIT  
48798 zsh   cputime 10   infinity   secs  
48798 zsh  filesize   infinity   infinity   bytes 
48798 zsh  datasize524288k524288k   bytes 
48798 zsh stacksize 65536k 65536k   bytes 
48798 zsh  coredumpsize 95367M 95367M   bytes 
48798 zsh memoryuse   infinity   infinity   bytes 
48798 zsh  memorylocked   infinity   infinity   bytes 
48798 zsh  maxprocesses   5547   5547 
48798 zsh openfiles  11095  11095 
48798 zshsbsize   infinity   infinity   bytes 
48798 zshvmemoryuse   infinity   infinity   bytes 
48798 zsh  pseudo-terminals   infinity   infinity 
48798 zsh   swapuse   infinity   infinity   bytes 

-- 
Mikolaj Golub
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to