in sysctl_jail_list(). Because of this, jls(8) could enter into
an endless loop. The strange thing is, that we can call jls(8) while
the other one is in loop and it will succeed - SYSCTL_OUT() will
not return ENOMEM there.
Maybe SYSCTL_OUT() returns first ENOMEM, because there is no memory,
but is marking some memory range as wired even on failure and another
SYSCTL_OUT() calls are not going to succeed, because process exceeds
limit of wired memory? ENOVMCLUE.
Anyway. Fix jls(8) to ignore ENOMEM and retry only 4 times.
Submitted by: Niklas Saers
PR: kern/79245
MFC after: 3 days
missing from ${WORKDIR}/files/.
This bug was caused by the astonishing interaction of "return" and
pipelines; in the following code, the "return" does not exit the
function, but instead exits the subshell which was spawned for the last
element of the pipeline; consequently, the output produced is "foo".
foo() {
echo bar | while read baz; do
if [ ${baz} = "bar" ]; then
return 1
fi
done
echo foo
}
Reported by: simon
"portsnap fetch update" or "portsnap -I cron update". They will be
executed in the order that they appear, and duplicates are not removed
(so "portsnap fetch fetch fetch fetch" is meaningful, albeit rather
silly).
Requested by: Roman Divacky
change the permissions. Failures are still recorded.
This allows mtree to do a generally better job of things when uid != 0.
Sponsored by: ActiveState/Sophos
Partially submitted by: neilw at ActiveState dot com
Reviewed by: neilw at ActiveState dot com
MFC after: 3 weeks
from the port number (if any exists). This unbreaks
env HTTP_PROXY="http://localhost:3128/" portsnap fetch
While I'm here, list both the host and the port in the error message
output if getaddrinfo() fails, since either of them could be responsible
for the failure.
than what we already have" message. [1]
When operating with the undocumented --debug option, replace "xargs
phttpget" with "xargs -t phttpget", since that might conceivably help
debugging.
Noticed by: simon [1]
fast, lightweight, and generally good way for users to keep their
ports trees up to date.
This is version 0.9.4 from the ports tree (sysutils/portsnap) with
the following changes:
1. The experimental pipelined http code is enabled. No seatbelts
in -CURRENT. (^_^)
2. The working directory has moved from /usr/local/portsnap to
/var/db/portsnap (as discussed on -arch two days ago).
3. Portsnap now fetches a list of mirrors (distributed as DNS SRV
records) and selects one randomly. This should help to avoid the
uneven loading which plagues the cvsup mirror network.
4. The license is now 2-clause BSD instead of 3-clause BSD.
5. Various incidental changes to make portsnap fit into the base
system's build mechanics.
X-MFC-After: 6.0-RELEASE
X-MFC-Before: 5.5-RELEASE
X-MFC-To: RELENG_6, RELENG_5, ports
discussed on: -arch and several other places
"yes please" from: simon, remko, flz, Diane Bruce
thinks this is a great idea: bsdimp
Hopes he didn't forget any files: cperciva
it is running during installations. The vsystem() function does get
used after this happens (e.g. if you manually configure the network
interface and ask it to enable the interface) so it needs to be a
little smarter about whether it uses /stand/sh or /bin/sh.
MFC after: 3 days
a card is ejected). wpa_supplicant requires that internal events
for interfaces coming+going include a name but after an interface
is removed you cannot use if_indextoname to map the interface index
in the RTM_IFINFO (or RTM_IFANNOUNCE) msg to an interface name.
Instead record the interface index in the driver-private data area
and use that to filter msgs from the routing socket. This insures
that when we have a message to process we know the interface name.
The end result is that we can now dispatch an "interface removed"
event that is understood when notified than an interface went away
(where previously the event dispatched was ignored because the
interface name was unrecognized).
This change also insures we only process events for our interface.
The only downside is that we can no longer wait for an interface
to arrive as we need to map the interface name to an index at
startup. This is not important as wpa_supplicant should be launched
by devd and not include a separate mechanism for doing interface
discovery.
MFC after: 3 days
Rate units are mA/mW, not mAh/mWh. Get full battery status and time
remaining from ACPIIO_BATT_GET_BATTINFO instead of BST.
PR: bin/83672
MFC after: 2 days
-o Show the origin recorded on package generation instead of the
package name.
-O Only list packages whose registered origin is origin.
Based on PR: bin/78640
Submitted by: Marcus Grando <marcus at corp dot grupos.com.br>, flz
on -current by Ben Kaduk <minimarmot@gmail.com>.
Add a hack of my own to allow the user to supply the paths to the INF and
SYS files on the command line.
- file(1) does not recognize UTF-16 encoded .INF file:
netbc564.inf: MPEG ADTS, layer I, v1, 96 kBits, 32 kHz, Stereo
Use egrep(1) to match two strings, i. e., `Signature' and `Class=Net'.
- Fix linking failure. Generate a temporary Makefile to emluate
official kernel module build process.
- Some minor typo/style fixes.
Reviewed by: obrien
section on "make world". The old link still works fine, but all the
hyperlinks of the referenced document are broken; the same links
work find if /doc/en_US.ISO8859-1 is used instead of plain /doc to
reach the online Handbook copy.
vertical virtual scrolling. This also respects -U for the distance.
PR: bin/82762
Submitted by: Eric Kjeldergaard <kjelderg -at- gmail.com>
MFC after: 1 month
o Slightly change KBADDKBD and KBRELKBD ioctl() interface. Instead of passing
keyboard index pass keyboard_info_t structure with populated 'kb_unit' and
'kb_name' fields. Keyboard index is not very user-friendly and is not very
easy to obtain. Keyboard driver name and unit, on the other hand, is much
more user friendly and known almost all the time;
o Move definition of keyboard_info_t structure up;
o Teach kbdcontrol(1) how to attach/detach keyboards to/from the keyboard
multiplexor;
o Update kbdcontrol(1) man page and document new functionality.
To attach/detach keyboard to/from keyboard multiplexor one needs to use
keyboard device name (i.e. ukbd0).
MFC after: 1 week
it about the lease file location and not invoking it with the (non-existant)
'-r' option. Releasing leases works vastly different now, so this isn't
needed.
Submitted by: sam
Approved by: re
o use proper api for setting/deleting keys instead of depending
on key indices
o check mac address to decide whether a key is unicast or group/global
o check set_tx on key set to decide whether a group/global key should
also be marked as default
o explicitly set IEEE80211_KEY_GROUP flag for group keys instead of
depending on kernel auto-add kludge
With the above changes static wep key handling works.
Reviewed by: avatar
Approved by: re (scottl)
of USB2 "duplicate" psuedo busses, it is not at all uncommon for machines
to have more than 4 USB busses nowadays.
PR: bin/81533
Submitted by: Darren Pilgrim dmp at bitfreak dot org
Approved by: re (scottl)
MFC after: 1 week
how to convert these to gprof(1) flat profiles. Augment description
for the '-g' option.
Remove superfluous quotes around a macro argument, bump document date [1].
Reminded by: ru [1]
Approved by: re (blanket hwpmc)
- pmcstat(8) gprof output mode fixes:
lib/libpmc/pmclog.{c,h}, sys/sys/pmclog.h:
+ Add a 'is_usermode' field to the PMCLOG_PCSAMPLE event
+ Add an 'entryaddr' field to the PMCLOG_PROCEXEC event,
so that pmcstat(8) can determine where the runtime loader
/libexec/ld-elf.so.1 is getting loaded.
sys/kern/kern_exec.c:
+ Use a local struct to group the entry address of the image being
exec()'ed and the process credential changed flag to the exec
handling hook inside hwpmc(4).
usr.sbin/pmcstat/*:
+ Support "-k kernelpath", "-D sampledir".
+ Implement the ELF bits of 'gmon.out' profile generation in a new
file "pmcstat_log.c". Move all log related functions to this
file.
+ Move local definitions and prototypes to "pmcstat.h"
- Other bug fixes:
+ lib/libpmc/pmclog.c: correctly handle EOF in pmclog_read().
+ sys/dev/hwpmc_mod.c: unconditionally log a PROCEXIT event to all
attached PMCs when a process exits.
+ sys/sys/pmc.h: correct a function prototype.
+ Improve usage checks in pmcstat(8).
Approved by: re (blanket hwpmc)
- Remove mention of an unimplemented option.
- Clarify the behavior of pmcstat when logging PMCs are
requested, but no log output file is specified.
- Add a cross-reference to pmclog(3).
- Bump document date.
Reviewed by: ru
Submitted by: ru [1]
Approved by: re (blanket hwpmc)
avoid the confusing error message about the line being too long). This
change uses fgetln to detect the right conditions, but the fixed-width
line buffer is kept because too many other places in the program make
assumptions about its maximum width.
Approved by: re (scottl)
function as @comment has. But will be valid only for files and not
for md5 sums, rcsid's and comments in the future.
Submitted by: flz
Approved by: re@ (scottl)
method of executing commands remotely. There are no rexec clients in
the FreeBSD tree, and the client function rexec(3) is present only in
libcompat. It has been documented as "obsolete" since 4.3BSD, and its
use has been discouraged in the man page for over 10 years.
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.
Other changes of note:
- Struct arpcom is no longer referenced in normal interface code.
Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
To enforce this ac_enaddr has been renamed to _ac_enaddr.
- The second argument to ether_ifattach is now always the mac address
from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
- Implement sampling modes and logging support in hwpmc(4).
- Separate MI and MD parts of hwpmc(4) and allow sharing of
PMC implementations across different architectures.
Add support for P4 (EMT64) style PMCs to the amd64 code.
- New pmcstat(8) options: -E (exit time counts) -W (counts
every context switch), -R (print log file).
- pmc(3) API changes, improve our ability to keep ABI compatibility
in the future. Add more 'alias' names for commonly used events.
- bug fixes & documentation.
of NTP hosts, if ntpdate_hosts is unset or empty.
PR: conf/79712
Submitted by: Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
mdoc text by: Matteo Riondato <rionda@gufi.org>
o reorg driver to consolidate state setup in the associate method
o add set_auth_alg method
o cleanup interface state on deinit
o change associate to use revised MLME ioctl api so we can support
ap_scan=2 methodology
o cleanup associate to support WEP and no cipher cases
o s/__FUNCTION__/__func__/
from the locally installed package. When this modifier is specified
pkg_create(8) will also create package files for all packages on
which that locally installed package depends.
MFC after: 5 days
24, and 32 bit modes. To use that, syscons(4) must be built with
the compile time option 'options SC_PIXEL_MODE', and VESA support (a.k.a.
vesa.ko) must be either loaded, or be compiled into the kernel.
Do not return EINVAL when the mouse state is changed to what it already is,
which seems to cause problems when you have two mice attached, and
applications are not likely obtain useful information through the EINVAL
caused by showing the mouse pointer twice.
Teach vidcontrol(8) about mode names like MODE_<NUMBER>, where <NUMBER> is
the video mode number from the vidcontrol -i mode output. Also, revert the
video mode if something fails.
Obtained from: DragonFlyBSD
Discussed at: current@ with patch attached [1]
PR: kern/71142 [2]
Submitted by: Xuefeng DENG <dsnofe at msn com> [1],
Cyrille Lefevre <cyrille dot lefevre at laposte dot net> [2]
additional argument that allows us to specify a timeout, like we do for
the subsequent clnt_call() calls.
Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
MFC after: 3 weeks
- Remove keyword 'continue' for more indepth error reporting
on each line
- WARNS 6 Clean
Submitted by: Liam J. Foy <liamfoy@dragonflybsd.org>
MFC after: 1 week
docs. Last I heard, Harlan Stenn was considering using FreeBSD's
pages as a starting point for the ISC NTP distribution's own pages.
If that happens, everyone wins and these can go away, to be replaced
by imported versions in contrib/ntp.
-I Use only the index file for determining if a package is out of
date. This is much faster than using the version number from a
port's Makefile, at the expense of potentially giving an incor-
rect result if the index file is out of date.
Without this option, the index file is only consulted if "make -V PKGNAME"
cannot be used.
Approved by: portmgr (krion)
catch all transient errors. This fixes situations where transient
error conditions such as network interfaces losing carrier signals
or the system running out of mbufs would result in the permanent
removal of forwarding syslog messages.
MFC after: 1 week
connections to Bluetooth HID device. As soon as Bluetooth HID device
is powered off (or goes out of RF range) the stack will terminate both
connections. File descriptors for both connections will become active
on next select(2) call. Because bthidd(8) processes file descriptors
in order, it will detect descriptor for one of the closed connections
first and kill the session. However, there is still a second (active)
descriptor that used to point to the same session. bthidd(8) used to
assert() if it cant find session by file descriptor, which was wrong.
While I'm here fix a couple of typos in parser.y
Reported by: Eric Anderson anderson AT centtech DOT com
MFC after: 3 days
the same time.
Fix if_ndis_pccard.c so that it sets sc->ndis_dobj and sc->ndis_regvals.
Correct IMPORT_SFUNC() macros for the READ_PORT_BUFFER_xxx() routines,
which take 3 arguments, not 2.
This fixes it so that the Windows driver for my Cisco Aironet 340 PCMCIA
card works again. (Yes, I know the an(4) driver supports this card natively,
but it's the only PCMCIA device I have with a Windows XP driver.)
Have pmcstat(8) and pmccontrol(8) use these APIs.
Return PMC class-related constants (PMC widths and capabilities)
with the OP GETCPUINFO call leaving OP PMCINFO to return only the
dynamic information associated with a PMC (i.e., whether enabled,
owner pid, reload count etc.).
Allow pmc_read() (i.e., OPS PMCRW) on active self-attached PMCs to
get upto-date values from hardware since we can guarantee that the
hardware is running the correct PMC at the time of the call.
Bug fixes:
- (x86 class processors) Fix a bug that prevented an RDPMC
instruction from being recognized as permitted till after the
attached process had context switched out and back in again after
a pmc_start() call.
Tighten the rules for using RDPMC class instructions: a GETMSR
OP is now allowed only after an OP ATTACH has been done by the
PMC's owner to itself. OP GETMSR is not allowed for PMCs that
track descendants, for PMCs attached to processes other than
their owner processes.
- (P4/HTT processors only) Fix a bug that caused the MI and MD
layers to get out of sync. Add a new MD operation 'get_config()'
as part of this fix.
- Allow multiple system-mode PMCs at the same row-index but on
different CPUs to be allocated.
- Reject allocation of an administratively disabled PMC.
Misc. code cleanups and refactoring. Improve a few comments.
the NTP server list.
The servers are by Internet Multifeed Co., and connected to their
IX service JPNAP. It would be a good NTP server for machines in Japan.
See also http://www.jst.mfeed.ad.jp/ for more details (Japanese only).
Reviewed by: nork
When adding users from a preformatted file, do not exit
silently when empty lines or lines starting with a '#'
are encountered - ignore them instead.
- Fix a spelling error in a comment.
PR: bin/80058
here on in, if_ndis.ko will be pre-built as a module, and can be built
into a static kernel (though it's not part of GENERIC). Drivers are
created using the new ndisgen(8) script, which uses ndiscvt(8) under
the covers, along with a few other tools. The result is a driver module
that can be kldloaded into the kernel.
A driver with foo.inf and foo.sys files will be converted into
foo_sys.ko (and foo_sys.o, for those who want/need to make static
kernels). This module contains all of the necessary info from the
.INF file and the driver binary image, converted into an ELF module.
You can kldload this module (or add it to /boot/loader.conf) to have
it loaded automatically. Any required firmware files can be bundled
into the module as well (or converted/loaded separately).
Also, add a workaround for a problem in NdisMSleep(). During system
bootstrap (cold == 1), msleep() always returns 0 without actually
sleeping. The Intel 2200BG driver uses NdisMSleep() to wait for
the NIC's firmware to come to life, and fails to load if NdisMSleep()
doesn't actually delay. As a workaround, if msleep() (and hence
ndis_thsuspend()) returns 0, use a hard DELAY() to sleep instead).
This is not really the right thing to do, but we can't really do much
else. At the very least, this makes the Intel driver happy.
There are probably other drivers that fail in this way during bootstrap.
Unfortunately, the only workaround for those is to avoid pre-loading
them and kldload them once the system is running instead.
attempt to clear its pending jobs list, as this could trigger another
signal, and cause an infinite recursion. What yppush_exit() tests
in order to determine whether to flush pending jobs is the
yppush_joblist chained list, so this is what needs to be cleared
in that case (not the yppush_jobs counter).
Reviewed by: audit@ (no objection)
MFC after: 2 weeks
allows us to specify the machine_arch as well as machine. If
specified then a second link will be made, similar to machine, from
$MACHINE_ARCH to $S/$MACHINE_ARCH/include.
This is for ports where MACHINE != MACHINE_ARCH (pc98 today, others in
the future?).
Reviewed by: arch@, nyan@