]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoNext FILEDESC_LOCK properly around FILE_LOCK
phk [Mon, 15 Nov 2004 21:26:13 +0000 (21:26 +0000)]
Next FILEDESC_LOCK properly around FILE_LOCK

19 years agoFix an off by one error. MAXPATHLEN already has +1.
imp [Mon, 15 Nov 2004 20:51:32 +0000 (20:51 +0000)]
Fix an off by one error.  MAXPATHLEN already has +1.

19 years agoRemove more debugging
imp [Mon, 15 Nov 2004 20:08:44 +0000 (20:08 +0000)]
Remove more debugging

19 years agoAdd acpi_sony to the list of drivers that are built.
imp [Mon, 15 Nov 2004 19:46:22 +0000 (19:46 +0000)]
Add acpi_sony to the list of drivers that are built.

19 years agofix the missing lock in sk_jfree (verified w/ an assert)
jmg [Mon, 15 Nov 2004 19:37:21 +0000 (19:37 +0000)]
fix the missing lock in sk_jfree (verified w/ an assert)
also fix up handling and proding of the tx, _OACTIVE is now handled
better...

Submitted by: Peter Edwards (sk_jfree)
Obtained from: OpenBSD and/or NetBSD (tx prod)

19 years agoBUGS should stay below SEE ALSO.
yar [Mon, 15 Nov 2004 16:38:37 +0000 (16:38 +0000)]
BUGS should stay below SEE ALSO.

Pointed out by: ru (wearing the mdoc(7) police hat on his head)

19 years agoPut _ray back, as appropriate.
imp [Mon, 15 Nov 2004 16:33:18 +0000 (16:33 +0000)]
Put _ray back, as appropriate.

19 years agoMake FILE_LOCK and FILEDESC_LOCK nest properly by postponing the the
phk [Mon, 15 Nov 2004 16:10:55 +0000 (16:10 +0000)]
Make FILE_LOCK and FILEDESC_LOCK nest properly by postponing the the
release of FILEDESC_LOCK a few more lines.

19 years agoAdd file ops to fifofs so that we can bypass vnodes (and Giant) for the
phk [Mon, 15 Nov 2004 14:51:44 +0000 (14:51 +0000)]
Add file ops to fifofs so that we can bypass vnodes (and Giant) for the
heavy-duty operations (read, write, poll/select, kqueue).

Disabled for now, enable with "vfs.fifofs.fops=1" in loader.conf.

19 years agoMention in the BUGS section that EVFILT_NETDEV events
yar [Mon, 15 Nov 2004 14:33:17 +0000 (14:33 +0000)]
Mention in the BUGS section that EVFILT_NETDEV events
on vlan(4) will be noticed only if the parent uses miibus(4).

Pointed out by: John-Mark Gurney <gurney_j -at- resnet.uoregon.edu>

19 years agoDocument more fields of struct stat.
yar [Mon, 15 Nov 2004 14:16:31 +0000 (14:16 +0000)]
Document more fields of struct stat.
Note to mdoc(7) police:
The document date has already been touched today.

19 years agoUse .Vt "struct stat" consistently.
yar [Mon, 15 Nov 2004 13:58:52 +0000 (13:58 +0000)]
Use .Vt "struct stat" consistently.

19 years agoNitpicking on grammar.
yar [Mon, 15 Nov 2004 13:55:33 +0000 (13:55 +0000)]
Nitpicking on grammar.

19 years agoImprove mdoc(7) markup of the page: add several missing macros,
yar [Mon, 15 Nov 2004 13:45:13 +0000 (13:45 +0000)]
Improve mdoc(7) markup of the page: add several missing macros,
use .Va instead of .Li for struct stat fields.

19 years agoDocument the S_IS*(mode) macros used to test for file types.
yar [Mon, 15 Nov 2004 13:37:56 +0000 (13:37 +0000)]
Document the S_IS*(mode) macros used to test for file types.
Bump the document date accordingly.

19 years agoPC98 does not have ACPI.
nyan [Mon, 15 Nov 2004 13:28:03 +0000 (13:28 +0000)]
PC98 does not have ACPI.

19 years agoAlways set current thread when activating thread debugger,
davidxu [Mon, 15 Nov 2004 13:06:01 +0000 (13:06 +0000)]
Always set current thread when activating thread debugger,
the current thread may already be added by fbsd_find_new_threads,
this can result that current thread is not set correctly.

19 years agoMove RAID5 offset calculation into a separate function to avoid
le [Mon, 15 Nov 2004 13:04:55 +0000 (13:04 +0000)]
Move RAID5 offset calculation into a separate function to avoid
code duplication.

19 years agoDon't invent ways of capitalization orthogonal to the English grammar.
yar [Mon, 15 Nov 2004 12:47:44 +0000 (12:47 +0000)]
Don't invent ways of capitalization orthogonal to the English grammar.

19 years agoRFC 959 states that the following codes should be used
yar [Mon, 15 Nov 2004 12:41:56 +0000 (12:41 +0000)]
RFC 959 states that the following codes should be used
for status replies on file system objects:

 212 Directory status.
 213 File status.

Reported by: Oleg Koreshkov <okor -at- zone.salut.ru>
MFC after: 1 week

19 years agoShare gv_roughlength() between kernel and userland, as we will need it
le [Mon, 15 Nov 2004 12:30:59 +0000 (12:30 +0000)]
Share gv_roughlength() between kernel and userland, as we will need it
there later.

19 years agoMake VOP_BMAP return a struct bufobj for the underlying storage device
phk [Mon, 15 Nov 2004 09:18:27 +0000 (09:18 +0000)]
Make VOP_BMAP return a struct bufobj for the underlying storage device
instead of a vnode for it.

The vnode_pager does not and should not have any interest in what
the filesystem uses for backend.

(vfs_cluster doesn't use the backing store argument.)

19 years agoAdd pbgetbo()/pbrelbo() lighter weight versions of pbgetvp()/pbrelvp().
phk [Mon, 15 Nov 2004 08:47:18 +0000 (08:47 +0000)]
Add pbgetbo()/pbrelbo() lighter weight versions of pbgetvp()/pbrelvp().

19 years agoDon't manually set b_bufobj, pbgetvp() does this for us.
phk [Mon, 15 Nov 2004 08:38:50 +0000 (08:38 +0000)]
Don't manually set b_bufobj, pbgetvp() does this for us.

19 years agoMore kasserts.
phk [Mon, 15 Nov 2004 08:33:09 +0000 (08:33 +0000)]
More kasserts.

19 years agostyle polishing.
phk [Mon, 15 Nov 2004 08:22:38 +0000 (08:22 +0000)]
style polishing.

19 years agoMove pbgetvp() and pbrelvp() to vm_pager.c with the rest of the pbuf stuff.
phk [Mon, 15 Nov 2004 08:12:50 +0000 (08:12 +0000)]
Move pbgetvp() and pbrelvp() to vm_pager.c with the rest of the pbuf stuff.

19 years agoexpect the caller to have called pbrelvp() if necessary.
phk [Mon, 15 Nov 2004 08:07:26 +0000 (08:07 +0000)]
expect the caller to have called pbrelvp() if necessary.

19 years agoExplicitly call pbrelvp()
phk [Mon, 15 Nov 2004 08:06:05 +0000 (08:06 +0000)]
Explicitly call pbrelvp()

19 years agoOrder of arguments after "optional" is not without significance:
phk [Mon, 15 Nov 2004 07:48:22 +0000 (07:48 +0000)]
Order of arguments after "optional" is not without significance:
the first field must be the name of the enabling device/option,
otherwise config doesn't know there is an option/device of that
name.

19 years agoOops, all my test boxes have NO_KERBEROS set, so I didn't hit the kerberos5
peter [Mon, 15 Nov 2004 05:59:10 +0000 (05:59 +0000)]
Oops, all my test boxes have NO_KERBEROS set, so I didn't hit the kerberos5
build tools problem.  I'd missed the kerberos5/tools stuff entirely.  Add
the missing bits.

19 years agoAfter discussions with Nate, repo copy the acpi assist drivers from
imp [Mon, 15 Nov 2004 05:54:15 +0000 (05:54 +0000)]
After discussions with Nate, repo copy the acpi assist drivers from
i386 to dev/acpi_support.  In theory, these devices could be found
other than in i386 machines only as amd64 becomes more popular.  These
drivers don't appear to do anything i386 specific, so move them to
dev/acpi_support.  Move config lines to files so that those
architectures that don't support kernel modules can build them into
the kernel.  At the same time, rename acpi_snc to acpi_sony to follow
the lead of all the other specialty devices.

19 years agoMerge 1.3 from acpi_snc.c: don't use return_VALUE() macro
imp [Mon, 15 Nov 2004 05:12:17 +0000 (05:12 +0000)]
Merge 1.3 from acpi_snc.c: don't use return_VALUE() macro
Improve style(9) compliance.

19 years agoAdd comment about why amd64 and ia64 don't build acpi modules.
imp [Mon, 15 Nov 2004 04:49:20 +0000 (04:49 +0000)]
Add comment about why amd64 and ia64 don't build acpi modules.

19 years agoApply a bandaid to avoid hangs on Ultra 2 machines. The second Z8530
marcel [Mon, 15 Nov 2004 02:47:37 +0000 (02:47 +0000)]
Apply a bandaid to avoid hangs on Ultra 2 machines. The second Z8530
connects to the keyboard and mouse and needs some special treatment.
Until this is fully understood, implemented and tested, simply avoid
probing the second Z8530. This is also what the zs(4) driver does.

19 years agoSince I'm not using the public API for writing
kientzle [Mon, 15 Nov 2004 01:46:33 +0000 (01:46 +0000)]
Since I'm not using the public API for writing
the the pax attributes, I shouldn't try using the public
API for finishing out the attribute entry, either.

This also removes some old dubious state manipulations.

19 years agoPax extended headers were always failing
kientzle [Mon, 15 Nov 2004 01:24:39 +0000 (01:24 +0000)]
Pax extended headers were always failing
because the code was using the external API
(archive_write_data) and assuming internal
error-return conventions.  Use the internal
API for writing data.

Thanks to: Joe Marcus Clarke

19 years agoBe slightly more paranoid about using the divisor in a division and
marcel [Mon, 15 Nov 2004 00:00:24 +0000 (00:00 +0000)]
Be slightly more paranoid about using the divisor in a division and
the calculated baudrate. Neither should be 0.

19 years agoRemove the BR tag. When the machine doesn't have the DIG64 HCDP
marcel [Sun, 14 Nov 2004 23:42:48 +0000 (23:42 +0000)]
Remove the BR tag. When the machine doesn't have the DIG64 HCDP
table with console settings, we now only need to know at which
address the UART lives. Leaving the baudrate unspecified results
in us using the baudrate at which the UART operates. This removes
one parameter that can interfere with a successful installation
out of the box.

19 years agoImplement UART_IOCTL_BAUD. Consequently, when the baudrate was unset
marcel [Sun, 14 Nov 2004 23:31:19 +0000 (23:31 +0000)]
Implement UART_IOCTL_BAUD. Consequently, when the baudrate was unset
for the console, we emit the actual baudrate during bus enumeration.

19 years agoAdd UART_IOCTL_BAUD to allow us to query the hardware about the
marcel [Sun, 14 Nov 2004 23:12:14 +0000 (23:12 +0000)]
Add UART_IOCTL_BAUD to allow us to query the hardware about the
current baudrate setting. Use this ioctl() when we don't know the
baudrate of the sysdev (as represented by a 0 value). When the
ioctl() fails, e.g. when the backend hasn't implemented it or the
hardware doesn't provide the means to determine its current baudrate
setting, we invalidate the baudrate setting by setting it to -1.
None of the backends currently implement the new ioctl().

19 years agoSo do it like we do in usr.bin/tip/tip/Makefile. ;)
ru [Sun, 14 Nov 2004 22:18:31 +0000 (22:18 +0000)]
So do it like we do in usr.bin/tip/tip/Makefile.  ;)

19 years agoMake sure the baudrate specified with the BR tag is somewhat sane.
marcel [Sun, 14 Nov 2004 21:38:22 +0000 (21:38 +0000)]
Make sure the baudrate specified with the BR tag is somewhat sane.
A baudrate we consider insane is silently replaced with 0. When the
baudrate is 0, we will not try to program the hardware. Instead we
leave the communication speed unaltered, maximizing the chance to
have a working console. Obviously this means we allow specifying a
0 baudrate for exactly that purpose.

19 years agoRevert previous commit. As ru explains:
schweikh [Sun, 14 Nov 2004 21:14:06 +0000 (21:14 +0000)]
Revert previous commit. As ru explains:

 In the old world (as the surrounding comment in makefile says), there
 was the /usr/libexec/ld-elf.so.1 binary which is now a symlink to
 /libexec/ld-elf.so.1. To symlink, we need to make sure that the
 _target_ (and the target is /usr/libexec/ld-elf.so.1) doesn't have
 "schg" flag set. A real solution is to protect the chflags call only if
 target exists, like we do in usr.bin/tip/tip/Makefile.

Requested by: ru

19 years agoMake it clear that the acpi modules can only be compiled on i386.
scottl [Sun, 14 Nov 2004 20:53:17 +0000 (20:53 +0000)]
Make it clear that the acpi modules can only be compiled on i386.

19 years agos/return_VALUE/return / to fix build breakage when ACPI_DEBUG is
truckman [Sun, 14 Nov 2004 20:37:41 +0000 (20:37 +0000)]
s/return_VALUE/return / to fix build breakage when ACPI_DEBUG is
defined.

19 years agoFurther refine the if_em vlan fix in if_em.c:1.53:
rwatson [Sun, 14 Nov 2004 20:20:28 +0000 (20:20 +0000)]
Further refine the if_em vlan fix in if_em.c:1.53:

- Because em_encap() can now fail in a way that leaves us without an
  mbuf chain, potentially set *m_headp to NULL if that happens, so that
  the caller can do the right thing.  This case can occur when we try
  to prepend the vlan header mbuf but can't allocate additional memory.

- Modify the caller of em_encap() to detect a NULL m_head and not try
  to queue the mbuf if that happens.

- When em_encap() fails, make sure to call bus_dmamap_destroy() to
  clean up.

19 years agoCommit more debugging output. This is a little bit of using a large hammer,
obrien [Sun, 14 Nov 2004 20:17:01 +0000 (20:17 +0000)]
Commit more debugging output.  This is a little bit of using a large hammer,
but sk(4) is so prevalent on AMD64 motherboards we need to reduce the number
of round trips in the mailing lists trying to get sufficient information to
make sure we've got a handle on all the problems and are working towards
making sk(4) solid.

Submitted by: bz

19 years agoUnify the ci/co variables now that the the tty drivers now use the same
obrien [Sun, 14 Nov 2004 19:51:34 +0000 (19:51 +0000)]
Unify the ci/co variables now that the the tty drivers now use the same
character for both.

19 years agoCatch up with PHK's sio(4) rework [sys/dev/sio/sio.c rev. 1.456].
obrien [Sun, 14 Nov 2004 19:42:13 +0000 (19:42 +0000)]
Catch up with PHK's sio(4) rework [sys/dev/sio/sio.c rev. 1.456].

19 years agoCurrently if the user specifies -e and procfs is not mounted on /proc,
csjp [Sun, 14 Nov 2004 19:30:02 +0000 (19:30 +0000)]
Currently if the user specifies -e and procfs is not mounted on /proc,
printing of the process environment will fail silently.

-define a function which will check to see if procfs is mounted on /proc
-Implement this test if the user specified -e
-If procfs is not mounted on /proc and -e was specified, print a warning.
 informing the user that procfs(5) is required.

Reviewed by: wes, rwatson

19 years agoFix a reference from pool(9) -> zone(9), but keep on talking about "memory
mlaier [Sun, 14 Nov 2004 17:05:54 +0000 (17:05 +0000)]
Fix a reference from pool(9) -> zone(9), but keep on talking about "memory
pools" as that is what UMA provides.

Submitted by: Jay <jay NO meangrape SPAM com>

19 years agoMove the bit of the syncer which deals with vnodes into a separate
phk [Sun, 14 Nov 2004 15:24:38 +0000 (15:24 +0000)]
Move the bit of the syncer which deals with vnodes into a separate
function.

19 years agoRearrange memory management for ioctl arguments to use stronger checks
phk [Sun, 14 Nov 2004 14:34:12 +0000 (14:34 +0000)]
Rearrange memory management for ioctl arguments to use stronger checks
for illegal values and don't store them on the stack any more.

19 years agoAvoid an (ignored) error by invoking chflags on the link target, not the
schweikh [Sun, 14 Nov 2004 12:47:20 +0000 (12:47 +0000)]
Avoid an (ignored) error by invoking chflags on the link target, not the
symlink.

PR: kern/73016
Submitted by: John E. Hein <jhein@timing.com>
MFC after: 1 week

19 years agostyle polish.
phk [Sun, 14 Nov 2004 12:04:34 +0000 (12:04 +0000)]
style polish.

19 years agoMove #define up.
phk [Sun, 14 Nov 2004 09:21:01 +0000 (09:21 +0000)]
Move #define up.

19 years agotr(1) attempts to convert \n[n][n] sequences into octal digits, but doesn't
jkh [Sun, 14 Nov 2004 05:15:25 +0000 (05:15 +0000)]
tr(1) attempts to convert \n[n][n] sequences into octal digits, but doesn't
check to see that a given digit is actually an octal digit.  This leads to
unusual consequences if passed in values like \9.

Reported by: Joseph Davison (OpenDarwin project)
MFC after: 1 week

19 years agoUse PORTSDIR, falling back to /usr/ports
imp [Sun, 14 Nov 2004 00:22:18 +0000 (00:22 +0000)]
Use PORTSDIR, falling back to /usr/ports

19 years agoRemove stub libxpg4. All functionality was merged into libc a long time ago.
tjr [Sat, 13 Nov 2004 23:54:30 +0000 (23:54 +0000)]
Remove stub libxpg4. All functionality was merged into libc a long time ago.

19 years agoKill ACPI_FUNCTION_TRACE. It is killing the tinderbox build, and it
imp [Sat, 13 Nov 2004 23:39:56 +0000 (23:39 +0000)]
Kill ACPI_FUNCTION_TRACE.  It is killing the tinderbox build, and it
isn't worth adding to the modules lists that we have to hard code for
this to work.  Since we print PID right away, we have a trace point
already.

Minor knf while I'm here.

19 years agoEliminate vop_revoke() function now that devfs_revoke() does the entire job.
phk [Sat, 13 Nov 2004 23:38:13 +0000 (23:38 +0000)]
Eliminate vop_revoke() function now that devfs_revoke() does the entire job.

19 years agoIntegrate most of vop_revoke() into devfs_revoke() where it belongs.
phk [Sat, 13 Nov 2004 23:37:29 +0000 (23:37 +0000)]
Integrate most of vop_revoke() into devfs_revoke() where it belongs.

19 years agoAdd the devfs_fp_check() function which helps us get from a struct file
phk [Sat, 13 Nov 2004 23:21:54 +0000 (23:21 +0000)]
Add the devfs_fp_check() function which helps us get from a struct file
to a cdev and a devsw, doing all the relevant checks along the way.

Add the check to see if fp->f_vnode->v_rdev differs from our cached
fp->f_data copy of our cdev.  If it does the device was revoked and
we return ENXIO.

19 years agoThe default VOP_REVOKE() should be vop_panic() as we should never
phk [Sat, 13 Nov 2004 22:59:52 +0000 (22:59 +0000)]
The default VOP_REVOKE() should be vop_panic() as we should never
get here in the first place.

19 years agoVOP_REVOKE() is only ever for VCHR vnodes, so unionfs does not
phk [Sat, 13 Nov 2004 22:56:26 +0000 (22:56 +0000)]
VOP_REVOKE() is only ever for VCHR vnodes, so unionfs does not
need a vop_revoke() method.

19 years agoAdd knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
bz [Sat, 13 Nov 2004 20:40:32 +0000 (20:40 +0000)]
Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Lost parts rediscovered by: Danny Braniss <danny at cs.huji.ac.il>
PR: bin/68303
No objections: des, gshapiro, nectar
Reviewed by: ru
Approved by: rwatson (mentor)
MFC after: 2 weeks

19 years agoSet ramsize depending on a value from eprom instead of using
bz [Sat, 13 Nov 2004 20:21:57 +0000 (20:21 +0000)]
Set ramsize depending on a value from eprom instead of using
hardcoded 128k for Yukon devices. 88E8001 only has 64k of on-chip RAM[1].

[1] http://www.marvell.com/products/pcconn/yukon/Yukon_88E8001_10_073103_final.pdf

Tested by: amd64, current
Approved by: rwatson (mentor)
MFC after: 1 week

19 years agofifos doesn't need a vop_lookup, the default will do fine.
phk [Sat, 13 Nov 2004 18:51:13 +0000 (18:51 +0000)]
fifos doesn't need a vop_lookup, the default will do fine.

19 years agoSync usage() and SYNOPSIS.
ru [Sat, 13 Nov 2004 17:26:54 +0000 (17:26 +0000)]
Sync usage() and SYNOPSIS.

19 years agoPolish two functions a bit so that it is easier to wrap them in
phk [Sat, 13 Nov 2004 17:21:26 +0000 (17:21 +0000)]
Polish two functions a bit so that it is easier to wrap them in
locks if/when we need that.

19 years agoRemoved bitrot.
ru [Sat, 13 Nov 2004 17:12:22 +0000 (17:12 +0000)]
Removed bitrot.

19 years agoSync usage() with manpage SYNOPSIS and code.
ru [Sat, 13 Nov 2004 17:08:52 +0000 (17:08 +0000)]
Sync usage() with manpage SYNOPSIS and code.

19 years agoMerge copyright notices.
mlaier [Sat, 13 Nov 2004 17:05:40 +0000 (17:05 +0000)]
Merge copyright notices.

Requested by: njl

19 years agoThere's no reason for "read" and "echo" commands to not
ru [Sat, 13 Nov 2004 17:04:55 +0000 (17:04 +0000)]
There's no reason for "read" and "echo" commands to not
appear in the online command list.

19 years agoSomehow I missed this last night, acpi_init() doesn't return an int.
philip [Sat, 13 Nov 2004 15:16:35 +0000 (15:16 +0000)]
Somehow I missed this last night, acpi_init() doesn't return an int.

Spotted by: Randy Bush <randy@psg.com>

19 years agoRemove debugging printf.
cognet [Sat, 13 Nov 2004 15:12:26 +0000 (15:12 +0000)]
Remove debugging printf.

19 years agoDon't forget to clear the PG_WRITEABLE flag when appropriate.
cognet [Sat, 13 Nov 2004 14:54:31 +0000 (14:54 +0000)]
Don't forget to clear the PG_WRITEABLE flag when appropriate.

19 years agoUse uma_prealloc() on the l2table_zone to prevent a LOR at startup.
cognet [Sat, 13 Nov 2004 14:41:27 +0000 (14:41 +0000)]
Use uma_prealloc() on the l2table_zone to prevent a LOR at startup.

19 years agoRemove un-needed call to close(2). The fd that close is being
csjp [Sat, 13 Nov 2004 14:30:34 +0000 (14:30 +0000)]
Remove un-needed call to close(2). The fd that close is being
called on is invalid and has no use.

Reviewed by: smkelly

19 years agoDocument the fact that kvm_getenvv(3) requires procfs to be mounted
csjp [Sat, 13 Nov 2004 14:26:13 +0000 (14:26 +0000)]
Document the fact that kvm_getenvv(3) requires procfs to be mounted
on /proc in order to operate correctly.

Reviewed by: simon@, wes@

19 years agoUsing off_t to pass a block size is obvious overkill.
yar [Sat, 13 Nov 2004 13:42:43 +0000 (13:42 +0000)]
Using off_t to pass a block size is obvious overkill.
The size_t type is better suited for that, particularly because
the "blksize" argument is to be passed to malloc() and read().
On 64-bit archs it's more to a style issue, but the good style
of coding in C is also important.

19 years agoKill ancient casts to integral types left from the K&R era.
yar [Sat, 13 Nov 2004 13:15:47 +0000 (13:15 +0000)]
Kill ancient casts to integral types left from the K&R era.
They're unneeded and sometimes erroneous now.

19 years agoBe prepared to accept NULL mountargs as part of root-mounting.
phk [Sat, 13 Nov 2004 13:04:31 +0000 (13:04 +0000)]
Be prepared to accept NULL mountargs as part of root-mounting.

19 years agoIntroduce an alias for FILEDESC_{UN}LOCK() with the suffix _FAST.
phk [Sat, 13 Nov 2004 11:53:02 +0000 (11:53 +0000)]
Introduce an alias for FILEDESC_{UN}LOCK() with the suffix _FAST.

Use this in all the places where sleeping with the lock held is not
an issue.

The distinction will become significant once we finalize the exact
lock-type to use for this kind of case.

19 years agoFix off-by-one errors and potential buffer overruns
yar [Sat, 13 Nov 2004 10:56:35 +0000 (10:56 +0000)]
Fix off-by-one errors and potential buffer overruns
WRT handling file and link names that reach the allowed
maximum for old tar and ustar archive formats.

PR: bin/40466
Submitted by: Cyrille Lefevre <email in the PR> (portions)
Reviewed by: freebsd-arch (silence)
MFC after: 1 month

19 years agoCorrect two incorrectly merged changes introduced in sysv_sem.c:1.71:
rwatson [Sat, 13 Nov 2004 08:06:40 +0000 (08:06 +0000)]
Correct two incorrectly merged changes introduced in sysv_sem.c:1.71:
return EINVAL rather than setting error, and don't free sops
unconditionally.  The first change was merged accidentally as part of
the larger set of changes to introduce MAC labels and access control,
and potentially lead to continued processing of a request even after
it was determined to be invalid.  The second change was due to changes
in the semaphore code since the original work was performed.

Pointed out by: truckman

19 years agoFor create and migrate, remove the `.Op Fl f' introduced in the
marcel [Sat, 13 Nov 2004 08:01:48 +0000 (08:01 +0000)]
For create and migrate, remove the `.Op Fl f' introduced in the
previous two commits and combine them with the existing flags
that were already there.

Pointed out by: ru@

19 years agoAdd an -f option (for force) to the migrate command. Normally an MBR
marcel [Sat, 13 Nov 2004 05:44:02 +0000 (05:44 +0000)]
Add an -f option (for force) to the migrate command. Normally an MBR
with unknown partitions is not migrated. By specifying the -f option
migration will happen and unknown partitions will be lost.

19 years agoAdd an -f option (for force) to the create command. The -f option
marcel [Sat, 13 Nov 2004 05:13:33 +0000 (05:13 +0000)]
Add an -f option (for force) to the create command. The -f option
allows the user to force the creation of a GPT even when there's a
MBR on the device. The MBR is simply wiped and any partitions
described by it are lost. Without the -f option one cannot create
a GPT when there's a MBR.

19 years agoFix the MDIOCDETACH ioctl() for md(4). Now that the md_file field in
marcel [Sat, 13 Nov 2004 05:00:12 +0000 (05:00 +0000)]
Fix the MDIOCDETACH ioctl() for md(4). Now that the md_file field in
the mdio structure is an array and not a pointer, we cannot test for
it to be NULL. It never is. Instead, test for md_file[0] to be '\0'.

19 years agoUNIX conformance: If -r -f on non-existent directory, don't emit error.
jkh [Sat, 13 Nov 2004 04:07:01 +0000 (04:07 +0000)]
UNIX conformance: If -r -f on non-existent directory, don't emit error.

19 years agoWith the addition of a proper prototype, this is now WARNS=6 clean.
philip [Sat, 13 Nov 2004 01:54:22 +0000 (01:54 +0000)]
With the addition of a proper prototype, this is now WARNS=6 clean.

19 years agoTwo uint32_t casts crept in where they shouldn't have.
philip [Sat, 13 Nov 2004 01:49:22 +0000 (01:49 +0000)]
Two uint32_t casts crept in where they shouldn't have.
ACPI_TYPE_INTEGER can be 64 bits wide in acpi v2.

19 years agoChange some formats and add some casts to make this
philip [Sat, 13 Nov 2004 01:34:51 +0000 (01:34 +0000)]
Change some formats and add some casts to make this
WARNS=2 clean, and mark it as such.

PR: 71672 (partly)
Reviewed by: njl

19 years agoReflect the cuaa->cuad namechange in documentation.
philip [Sat, 13 Nov 2004 00:09:19 +0000 (00:09 +0000)]
Reflect the cuaa->cuad namechange in documentation.

Might as well do them all while I'm at it :-)

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>

19 years agoUpdate moused(8) and mouse(4) to reflect the cuaa->cuad name change.
philip [Fri, 12 Nov 2004 23:59:24 +0000 (23:59 +0000)]
Update moused(8) and mouse(4) to reflect the cuaa->cuad name change.

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>

19 years ago o Change the strcmp() to a strncmp() to allow us to attach to 'E'
philip [Fri, 12 Nov 2004 23:21:19 +0000 (23:21 +0000)]
 o Change the strcmp() to a strncmp() to allow us to attach to 'E'
   models of laptops, which are essentially the same as the normal
   ones, as far as acpi_asus is concerned[1]

 o Use the above as an excuse to reshuffle the mess I made of the
   probe function when I originally wrote it.

Reported by:     Soeren Larsen <soeren@whiteswan.dk>

19 years agoMinor whitespace nitpicking to reduce my diffs of Real Changes[tm]
philip [Fri, 12 Nov 2004 23:06:13 +0000 (23:06 +0000)]
Minor whitespace nitpicking to reduce my diffs of Real Changes[tm]

19 years agoFix ng_ksocket(4) operation as a divert socket, which is pretty useful
glebius [Fri, 12 Nov 2004 22:17:42 +0000 (22:17 +0000)]
Fix ng_ksocket(4) operation as a divert socket, which is pretty useful
and has been broken twice:

- in the beginning of div_output() replace KASSERT with assignment, as
  it was in rev. 1.83. [1] [to be MFCed]
- refactor changes introduced in rev. 1.100: do not prepend a new tag
  unconditionally. Before doing this check whether we have one. [2]

A small note for all hacking in this area:
when divert socket is not a real userland, but ng_ksocket(4), we receive
_the same_ mbufs, that we transmitted to socket. These mbufs have rcvif,
the tags we've put on them. And we should treat them correctly.

Discussed with: mlaier [1]
Silence from: green [2]
Reviewed by: maxim
Approved by: julian (mentor)
MFC after: 1 week