Commit Graph

184320 Commits

Author SHA1 Message Date
gonzo
0875ed61b8 Fix build on ARM (and probably other platforms) 2012-12-28 06:52:53 +00:00
gonzo
1231ad9b21 Add makeshift implementation for framebuffer console's cursor
Basically it's replica of VersatilePB code which is replica of XBox FB
code. All of them are linear framebuffers and should have common bits
moved to reusable framework.
2012-12-28 03:18:05 +00:00
davidxu
b7760e9ec4 Use strlcpy to NULL-terminate error message even if user provided a short
buffer.
2012-12-28 02:43:33 +00:00
gonzo
bda4c885f5 Fix event timer on Raspberry Pi
- Disable interrupt when updating compare value in order to
   make this operation atomical

- Increase minimum period for event timer. Systimer on BCM2835
    is compare timer, so if minimum period is too small it might
    be less then fraction of time between "read current value" and
    "set compare timer" operations. It means that when timer is armed
    actual counter value is more then compare value and it will take
    whole cycle (~32sec for 1MHz timer) to fire interrupt.

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
2012-12-28 01:38:43 +00:00
delphij
ab5f5cd77f Add derived versions for common Simplified Chinese encodings.
MFC after:	2 weeks
2012-12-28 01:23:12 +00:00
delphij
b179cbf13b Add zh_CN.UTF-8 catalog.
Reviewed by:	alphachi <alphachi mediaspirit.org>
MFC after:	2 weeks
2012-12-28 01:09:30 +00:00
gonzo
6274b9f3de Add custom renderer for poor man's cursor support for framebuffer console 2012-12-28 00:55:43 +00:00
ae
f89408c03e Add an ability to set net.link.stf.permit_rfc1918 from the loader.
MFC after:	2 weeks
2012-12-27 21:26:08 +00:00
ae
6064718574 Add net.link.stf.permit_rfc1918 sysctl variable. It can be used to allow
the use of private IPv4 addresses with stf(4).

MFC after:	2 weeks
2012-12-27 20:59:22 +00:00
bapt
9708a96be5 avoid arithmetic on uintptr_t
Submitted by:	pjd
Reviewed by:	jilles
2012-12-27 20:47:34 +00:00
bapt
85f7f7664e cast to uintptr_t to properly calculate offset
Reported by:	mdf
Submitted by:	db
2012-12-27 20:31:12 +00:00
bapt
85a7bc8863 Add O_CLOEXEC to flopen
Requested by:	jilles
2012-12-27 20:24:44 +00:00
bapt
cdddb6f42a Simplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil. 2012-12-27 19:43:29 +00:00
bapt
2f0af9e7e5 gr_dup: simplify duplication of group
Submitted by:	db
2012-12-27 19:33:43 +00:00
bapt
247c2a4086 - Clean up previous gr_add use malloc instead of calloc
- Fix tinderbox error

Submitted by:	db
2012-12-27 16:51:29 +00:00
bapt
a7f43aa146 Fix a regression in "pw group show" introduced r242349:
print a newline after printing each group line.

PR:		bin/174731
Submitted by:	Jan Beich <jbeich@tormail.org>
2012-12-27 14:44:13 +00:00
bapt
e5fca3f7cb Simplify the code by using the new gr_add function 2012-12-27 14:35:06 +00:00
bapt
b63557c001 New gr_add function to provide a clean and safe method to append a new member
into an existing group.

Submitted by:	db
2012-12-27 14:30:19 +00:00
bapt
925e83c0bd Use flopen(3) instead of open(2) + flock(2) 2012-12-27 14:09:50 +00:00
jilles
e2e297c506 test(1): Document == alias for =.
Reviewed by:	gjb
Requested by:	gjb
MFC after:	1 week
2012-12-27 13:21:37 +00:00
attilio
6570808ee2 Remove an unused var.
Sponsored by:	EMC / Isilon storage division
MFC after:	3 days
2012-12-27 12:53:46 +00:00
attilio
623f494155 br_prod_tail and br_cons_tail members are used as barrier to
signal bug_ring ownership. However, instructions can be reordered
around members write leading to stale values for ie. br_prod_bufs.

Use correct memory barriers to ensure proper ordering of the
ownership tokens updates.

Sponsored by:	EMC / Isilon storage division
MFC after:	2 weeks
2012-12-27 12:36:58 +00:00
luigi
eb65fddc45 use nanosecond resolution, make sure gettimeofday
is called at most every 100 packets.
2012-12-27 09:15:21 +00:00
tuexen
c79f406296 Some cleanups.
MFC after: 3 days
2012-12-27 08:10:58 +00:00
tuexen
9b6fdf83a8 Minor cleanups of debug messages.
MFC after: 3 days
2012-12-27 08:06:58 +00:00
tuexen
86859ae7b8 Fix a copy and paste error.
MFC after: 3 days
2012-12-27 08:02:58 +00:00
dteske
29c6e27591 Comments and fit to 80-columns. 2012-12-27 07:52:50 +00:00
bapt
219a9acfae Simplify copying of group members by using memcpy
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2012-12-26 23:16:24 +00:00
bapt
bc1ecc20ad Fix off-by-one error in memory allocation: j entries, one new and a null
terminator is j + 2.

Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2012-12-26 23:14:33 +00:00
markj
6b14b2464d Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they
typically do not handle the SYNCHRONIZE_CACHE command - they either
return an error or the firmware enters a reset loop.

Reviewed by:	hselasky
Approved by:	rstone (co-mentor)
MFC after:	2 weeks
2012-12-26 22:21:27 +00:00
pjd
a86b6e7ae5 Reset provider-specific fields when resending I/O request in low memory
conditions. This fixes assertion which checks those fields when kernel is
compiled with DIAGNOSTIC.

Reported by:	kib, pho
MFC after:	1 week
2012-12-26 20:07:47 +00:00
rakuco
5f0225e4d6 Use DEVMETHOD_END, as suggested by hselasky@.
Approved by:	glebius
2012-12-26 19:14:21 +00:00
rakuco
bb2a206235 Use the correct USB interface macros instead of USB_IF_CSI.
As pointed out by hselasky@, USB_IF_CSI is the wrong macro here since we want
to declare the device's interface class, subclass and protocol, not class,
subclass and driver info.

Follow-up to r244704.

PR:		kern/174707
Approved by:	glebius
MFC after:	1 week
2012-12-26 19:12:31 +00:00
bapt
13dabd466a In case of the deletion of a user those whole database has to be regenerated,
otherwise the user planned to be deleted remain in the pwd.db while removed from
the plain text password file.
2012-12-26 18:28:17 +00:00
bapt
d1e0080a5e Fix creating a user and adding it to a group
Reported by:	"Sam Fourman Jr." <sfourman@gmail.com>, dim
2012-12-26 18:14:45 +00:00
attilio
27fa8d59ff Fixup r244240: mp_ncpus will be 1 also in the !SMP and smp_disabled=1
case. There is no point in optimizing further the code and use a TRUE
litteral for a path that does heavyweight stuff anyway (like lock acq),
at the price of obfuscated code.

Use the appropriate check where necessary and remove a macro.

Sponsored by:	EMC / Isilon storage division
MFC after:	3 days
2012-12-26 15:20:32 +00:00
glebius
552f8bf56d Add vendor IDs for Broadcom USB dongles (BCM20702).
PR:		kern/174707
Submitted by:	rakuco
2012-12-26 15:10:20 +00:00
davidxu
242aa47263 Always initialize pattern_buf pointers to NULL, otherwise AMD64 machine
panics with:
   free: address xxx(yyy) has not been allocated.
it can be triggered by hald.
2012-12-26 13:07:17 +00:00
pluknet
55e18ebdf3 Fix libproc test case to work with clang premature optimization
observed with -O2 (used by default).
Avoid function inlining for t1_bkpt_t on which we set a breakpoint.
Otherwise the address of the function is never called thus the
breakpoint never triggers.

Reported by:	zont
Reviewed by:	rpaulo
2012-12-26 05:11:48 +00:00
rmacklem
9b46c215ce Attempt to clarify that for ZFS, all file systems under
the NFSv4 root must be exported. This is because ZFS
checks exports itself.
This is a content change.

MFC after:	2 weeks
2012-12-25 22:47:49 +00:00
rmacklem
c9aa765acd Attempt to clarify that for ZFS, all file systems under
the NFSv4 root must be exported. This is because ZFS
checks exports itself.
This is a content change.

MFC after:	2 weeks
2012-12-25 22:34:43 +00:00
antoine
155ea9795f Use correct size in snprintf.
Remove unused buffer.

PR:		174631
Submitted by:	Henning Petersen
MFC after:	1 month
2012-12-25 17:06:05 +00:00
glebius
ddd09f2a26 Garbage collect carp_cksum(). 2012-12-25 14:29:38 +00:00
jilles
da771ef7de sh: Prefer strsignal() to accessing sys_siglist directly.
Accessing sys_siglist directly requires rtld to copy it from libc to the sh
executable's BSS. Also, strsignal() will put in the signal number for
unknown signals (FreeBSD-specific) so we need not do that ourselves.

Unfortunately, there is no function for sys_signame.
2012-12-25 14:17:09 +00:00
glebius
7ccc77532c Change net.inet.carp.demotion sysctl to add the supplied value
to the current demotion factor instead of assigning it.

  This allows external scripts to control demotion factor together
with kernel in a raceless manner.
2012-12-25 14:08:13 +00:00
glebius
2b889e1407 Fix sysctl_handle_int() usage. Either arg1 or arg2 should be supplied,
and arg2 doesn't pass size of arg1.
2012-12-25 13:55:21 +00:00
zont
1c06919638 - Update manual pages accordingly to r244384 and r244385.
Approved by:	kib (mentor)
MFC after:	1 week
2012-12-25 13:43:01 +00:00
glebius
9f622a1b38 The SIOCSIFFLAGS ioctl handler runs if_up()/if_down() that notify
all interested parties in case if interface flag IFF_UP has changed.

  However, not only SIOCSIFFLAGS can raise the flag, but SIOCAIFADDR
and SIOCAIFADDR_IN6 can, too. The actual |= is done not in the protocol
code, but in code of interface drivers. To fix this historical layering
violation, we will check whether ifp->if_ioctl(SIOCSIFADDR) raised the
IFF_UP flag, and if it did, run the if_up() handler.

  This fixes configuring an address under CARP control on an interface
that was initially !IFF_UP.

P.S. I intentionally omitted handling the IFF_SMART flag. This flag was
never ever used in any driver since it was introduced, and since it
means another layering violation, it should be garbage collected instead
of pretended to be supported.
2012-12-25 13:01:58 +00:00
dteske
aa703b25c0 Add more debugging to help with diagnosis of program-flow when needed. 2012-12-25 10:47:45 +00:00
dteske
2646f7c5d8 Remove unnecessary duplicate initialization of the dialog(1) API (automatically
bootstrapped on-include unless DIALOG_SELF_INITIALIZE is set to NO before-hand)
2012-12-25 09:30:25 +00:00