Commit Graph

15127 Commits

Author SHA1 Message Date
wiz
d5982f0fd8 Sort errors. 2011-06-03 08:07:48 +00:00
jruoho
7a7aafd699 Note STANDARDS and use more markup. 2011-06-03 05:50:07 +00:00
yamt
63b82de8a6 compatibility note 2011-06-02 01:04:18 +00:00
manu
5255616730 Fix race conditions between write and getattr/setattr, which lead to
inconsitencies between kernel and filesystem idea of file size during
writes with IO_APPEND.

At mine, this resulted in a configure script producing config.status
with ": clr\n" lines stripped (not 100% reproductible, but always this
specific string. That is of little interest except for my own future
reference).

When a write is in progress, getattr/setattr get/set the maximum size
among kernel idea (grown by write) and filesystem idea (not yet grown).
2011-06-01 15:54:10 +00:00
manu
344a543c33 Remove outdated comment about a fixed bug 2011-06-01 07:57:24 +00:00
christos
88b197ec7f PR/38413: Takahiro Kambe: mt(1) print some junk output when using remote tape
Not all fields are valid in the ioctl to get tape info in the rmt protocol.
Zero out the struct so that we don't print junk.
While here, KNF.
2011-05-31 12:24:33 +00:00
christos
98715cd1ec PR/45007: rcmd_af(3) and thusly rsh(1) ignore requested address family
Pass in the address family to rshrcmd and DTRT.
While here KNF.
2011-05-31 06:49:26 +00:00
manu
26381d518d Use SOCK_SEQPACKET in perfuse if available. This fix file operations hangs
where the FUSE filesyste replied to an operation and got an ENOBUFS it did
not handle.

We now are also able to cleanly unmount
2011-05-30 14:50:08 +00:00
joerg
28050549eb Ignore warnings when building with clang for now. 2011-05-30 14:41:26 +00:00
haad
0c1ba949b7 Fix problem where DM_IOCTL_NAME was used in libdm_task_set_uuid except of
DM_IOCTL_UUID. This makes lvremove to work properly.

Thanks To hugo Silva and Toby Karyadi for reporting this issue.
2011-05-30 01:10:57 +00:00
drochner
53cdf0b54e make the "tags" target non-.PHONY because it reflects a real file,
and remove some nonsense in libc Makefile which caused that
a "tags" file was written in my source tree
2011-05-27 17:06:54 +00:00
joerg
a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
christos
178153b0c2 use _ALIGN consistently. 2011-05-25 02:11:16 +00:00
christos
bde00486af make this compile with DEBUG (_ALIGN was not defined). 2011-05-24 22:39:47 +00:00
ryo
52e6dde2a6 fix incorrect variable name 2011-05-24 02:31:11 +00:00
joerg
70b0796a0d Ensure that rumpuser_thread_exit doesn't return. 2011-05-23 20:49:08 +00:00
joerg
896c6d5b09 Save space, kill some () 2011-05-23 20:43:02 +00:00
joerg
afa03266a7 Remove pointless self-assignment 2011-05-23 15:16:27 +00:00
joerg
998c5d780f Make intermediate size variable size_t like the rest to avoid
unnecessary casting.
2011-05-23 14:53:46 +00:00
joerg
04d16b5c6d Use C99-style init in _CITRUS_PROP_HINT_END to avoid warnings for
uninitialised type field.
2011-05-23 14:52:32 +00:00
joerg
939ab48f97 Actually return something deterministic 2011-05-23 14:45:44 +00:00
joerg
608276435f Remove self-assignment of an argument that is later used. 2011-05-23 14:34:29 +00:00
joerg
b53ad3df44 Use a plain float constant, no need to deal with messy 0r prefix 2011-05-22 20:11:47 +00:00
dholland
d392ff6e7a Clarify paragraph about calling setprogname, requested by Tobias Ulmer on
freenode. Bump date.
2011-05-21 19:06:44 +00:00
nakayama
88e42b609b Add fenv support for sparc. Mostly copied from sparc64 and share with it. 2011-05-20 21:42:48 +00:00
dsl
67d513dd66 Remove __P() 2011-05-18 19:36:36 +00:00
manu
e0a6df40c2 - Proper permission checks when doing directory traversal. e.g.: run
rm dir/file while dir was never looked up since the mount. In that
situation, we get lookup with pcn_nameiop NAMEI_DELETE for dir before
we get it for file. But for dir we are just looking for PUFFS_VEXEC.
This is solved by honouring NAMEI_ISLASTCN, which is set for the last
element only

- do not send O_EXCL to FUSE as documentation forbids it.

- fix warning
2011-05-18 15:28:12 +00:00
manu
286587ad9c Set buffer size as big in nomal mode as we do in debug mode, when
perfused stays in foreground. The difference is a mistake and was not
intended.

There is still a bug ready to bite here, since SOCK_STREAM is not reliable.
We just hope that buffers are big enough to hold all packets, but if they
are overflown, we loose a packet and a file operation gets stuck.

We really nee SOCk_SEQPACKET here, but unfortunately it is very broken at
that time.
2011-05-18 15:25:19 +00:00
manu
e7a016f266 typos 2011-05-18 15:22:54 +00:00
christos
713ea1897d cleanup saving and restoring errno, and make it similar. 2011-05-18 01:59:39 +00:00
joerg
c98c805c05 Trailing white space 2011-05-17 07:10:39 +00:00
enami
bde048cc49 Use Pq or Po macro for better output rather than putting raw open paren
at the end of line.
2011-05-17 03:35:38 +00:00
drochner
ccdea5df98 -fix maximum length of salt (missing prefix, rounding error)
-clip number of rounds at 31 -- this is log2 of the real number,
 and anything larger would break exponentation
-catch possible atoi() error where log2(rounds) is parsed in the
 salt prefix
-zero crypto state on exit
from Open/FreeBSD
2011-05-16 10:45:56 +00:00
drochner
9c09925b41 fix ipad/opad buffer length (was one too much), just for sanity 2011-05-16 10:39:12 +00:00
christos
ec3000cfb2 PR/44959: Henning Petersen: glob forgets to closedir on out of space condition. 2011-05-14 22:44:06 +00:00
nonaka
9af4d11fa4 Use "_end" instead of "end" for consistency with other architectures. 2011-05-13 23:14:36 +00:00
christos
1ff5a5dfd6 don't let readlink trash errno.; 2011-05-13 23:11:00 +00:00
manu
6b36a33563 Mont FUSE filesystem with proprer source and fstype so that df and mount
display something that makes sense
2011-05-12 10:32:41 +00:00
jakllsch
32dec9bd40 Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE. 2011-05-11 14:52:48 +00:00
njoly
411ef8d5d2 Small typo in macro (Xd -> Xr). 2011-05-10 12:14:37 +00:00
jruoho
881e57fce3 Remove trailing '\'. 2011-05-10 09:07:51 +00:00
jruoho
31061e207a Split out the ilogb(3) family out of ieee(3) and properly document it. 2011-05-10 06:38:33 +00:00
drochner
e7c5804ca9 rearrange variable usage to kill __UNCONST
reviewed by sjg
2011-05-09 19:15:28 +00:00
jruoho
fa096afe20 Xref raise_default_signal(3). 2011-05-09 09:06:21 +00:00
manu
73963ae9de Enable the build of perfused and libperfuse 2011-05-09 08:51:08 +00:00
drochner
69de8de8f1 remove excess newlines in debug output 2011-05-06 17:22:09 +00:00
wiz
93cfe89ec0 Add missing preposition. 2011-05-05 07:36:44 +00:00
jruoho
19742b4964 Fix lead paragraph. 2011-05-05 05:58:14 +00:00
manu
38ecbcf429 Fixes for the advlock method. It can now sustain pkgsrc/devel/locktests
with glusterfs as backend
2011-05-03 13:19:50 +00:00
manu
7f87f63c56 Call advlock method if supplied 2011-05-03 13:16:47 +00:00
manu
f8934bcc9b Fix build (libperfuse is still not built by default, but time is coming) 2011-05-03 13:14:09 +00:00
wiz
daf04c06a3 Remove \*[q] -- not necessary, just use plain double quotes instead. 2011-05-03 09:36:24 +00:00
jruoho
5517207853 Xref bswap(3). Simplify STANDARDS. 2011-05-03 04:07:39 +00:00
jruoho
db3b8477d4 Clarify STANDARDS (i.e. cf. ualarm(3) is no longer in POSIX). 2011-05-02 17:34:05 +00:00
jruoho
a192422bb6 Note also that the interaction between setitimer(2) and alarm(3) or sleep(3)
is unspecified.
2011-05-02 17:14:20 +00:00
jruoho
04b57bd832 Remove NOTES as it is documented in itimerval(3). Remove #ifdefs from
SYNOPSIS (these are visible enough in the body of the text). Use a list for
the timers. Improve wording and markup.
2011-05-02 17:01:52 +00:00
christos
89d0622f3e Start eliminating "super-user" from the documentation. 2011-05-01 02:54:22 +00:00
christos
0a101028d4 nice should always return EPERM, not EACCES 2011-05-01 02:49:54 +00:00
martin
251de2dee0 Save a few global registers during set/longjmp - at least the application
registers and the only currently used system register (%g7).
Sparc now passes the setjmp tests (and should be able to build perl again).
2011-04-30 23:41:12 +00:00
martin
9881f8de04 Fix previous: the way we calculate, we need to test the size of sigjmp_buf 2011-04-30 23:39:08 +00:00
martin
c670087695 Add another compile time assert: catch overflows of jmp_buf 2011-04-30 23:30:27 +00:00
martin
b549c67469 Save/restore some global registers (sigsetjmp compatible). Does not realy
make a difference currently, but is a hard to spot blackhole if something
ever starts using the application registers.
2011-04-30 19:43:17 +00:00
martin
44283e6e19 Rearange jmp_buf content again: storing the sigsetjmp() save_mask midway
inside the environment is not a good idea, we may overwrite it when
fetching other details of the sigjmp environment.
Instead move it to the very end again.
Do not bother to save volatile (caller saved) global registers.
Fixes PR port-sparc64/44918.
2011-04-30 19:39:38 +00:00
alnsn
df45d61f55 Save/restore errno in error path in dupgood. Check that n>0 before
accessing banner[n-1].

Approved a while ago by pooka@
2011-04-30 12:25:05 +00:00
wiz
3ecc6ccf87 Mark up NULL. 2011-04-29 09:43:28 +00:00
matt
e148e1968d Use correct CALLFRAME_SIZ depending on ABI. 2011-04-29 08:05:22 +00:00
wiz
83e8266979 Sort sections and errors. 2011-04-28 16:34:01 +00:00
wiz
1536c249f7 Markup fixes. 2011-04-28 16:16:23 +00:00
wiz
0b0f158833 New sentence, new line. Use more markup. 2011-04-28 14:59:27 +00:00
wiz
29e0fd69e9 Sort sections. 2011-04-28 12:00:55 +00:00
wiz
3652074286 Sort ERRORS. 2011-04-28 11:58:50 +00:00
wiz
560b21b44e Fix a typo. 2011-04-28 11:56:26 +00:00
wiz
dbd13d8219 Spelling. 2011-04-28 11:22:44 +00:00
martin
d21307a5d2 Fix offsets used in the assembly code to save global registers into a
jmp_buf, add a compile time assert to catch this kind of divergence
in the C code.
Move the fixed "%npc = %pc + 4" computation to longjmp, this frees
the sigcontext sc_npc value. Use this space to save the savemask
for siglongjmp (we have run out of space behind the globals).
Fixes the tests/lib/libc/setjmp/t_threadjmp tests, and also hopefully
fixes PR port-sparc64/44902.
2011-04-27 21:08:48 +00:00
wiz
8973a7a700 Sort sections. 2011-04-25 23:14:33 +00:00
wiz
d489035474 Markup consistency, from YOMURA Masanori. Add serial comma. 2011-04-25 22:47:27 +00:00
wiz
3f4e964f9f Sort errors. 2011-04-25 22:38:34 +00:00
christos
736e11067f - make log_krb5 varyadic
- centralize error handling to one function
- check for NULL context
2011-04-25 22:22:25 +00:00
christos
def46fd94a fix pasto (of no consequence) 2011-04-25 22:03:20 +00:00
christos
4a04b195ef - make log_krb5 varyadic and merge the last error message.
- check for NULL context.
- print a more meaningful error when things go south
2011-04-25 22:01:04 +00:00
manu
c3c545a544 - Implement proper unprivilegied user permission verifications
Verification is now done in the lookup method, as it is the way to
go. Of course there are corner cases, such as the sticky bit which
need special handling in the remove method.

- Set full fsidx in vftstat method

- Do not pass O_APPEND to the filesystem. FUSE always sends the
write offset, so setting O_APPEND is useless. If the filesystem
uses it in an open(2) system call, it will even cause file
corruptions, since offsets given to pwrite(2) will be ignored.
This fix allows glusterfs to host a NetBSD ./build.sh -o build

- Do not use the FUSE access method, use getattr and check for
permission on our own. The problem is that a FUSE filesystem will
typically use the Linux-specific setfsuid() to perform access
control. If that is missing, any chack is likely to occur on
behalf of the user running the filesystem (typically root), causing
access method to return wrong information.

- When possible, avoid performing a getattr method call and use
cached value in puffs_node instead. We still retreive the latest
value by calling getattr when performing append write operation,
to minimize the chances that another writer appended since the
last time we did.

- Update puffs_node cached file size in write method

- Remove unused argument to perfuse_destroy_pn()
2011-04-25 04:54:53 +00:00
elric
8d159f43a8 We no longer need to -I/usr/include/krb5. 2011-04-24 19:00:56 +00:00
elric
6daa88e0a9 Stop using functions that are deprecated in Heimdal. 2011-04-24 19:00:31 +00:00
elric
0fce8776fa Stop using functions that are marked as deprecated in Heimdal. 2011-04-24 18:53:55 +00:00
elric
a9c7955034 Remove use of functions marked as deprecated in Heimdal. 2011-04-24 18:48:04 +00:00
christos
322a9e7966 fix freudian slip 2011-04-24 01:56:44 +00:00
joerg
5c2887509e Don't kill the read(2) stub, just the magic around it. 2011-04-22 14:18:34 +00:00
joerg
77abb554dc Disable Fortification for pthread and rump stubs. 2011-04-21 13:38:14 +00:00
martin
211a501951 Backout previous, it breaks lots of tests (tests/lib/librumphijack for
example).
2011-04-21 08:21:13 +00:00
martin
a128c5080b Backout previous, it causes lots of test failures (tests/fs/nfs for
example).
2011-04-21 08:17:00 +00:00
blymn
e0662f42c2 Fix deleting a key definition, it did not work. Also improve tracing
of key definition deletion.
2011-04-21 08:10:49 +00:00
enami
9aed075519 - Put empty line after the local variable definition in the sample code
to improve readability.
- Remove indirection operator to clarify error condition.
2011-04-20 23:37:51 +00:00
christos
57ddf70a57 sync with reality (prototype of open is varyadic) 2011-04-20 19:57:58 +00:00
manu
7a675e4eab In node_lookup() ops, pcn->pcn_nameiop contains a NAMEI_* constant, not
PUFFSLOOKUP_*
2011-04-19 10:35:24 +00:00
drochner
1e1bb256ba according to C99/POSIX, nextafter(x,y) should return y if x==y, from
Henning Petersen per PR lib/44875
2011-04-18 15:59:09 +00:00
christos
4957358ed5 Correct check for snprintf() overflow via Maksymilian Arciemowicz from FreeBSD.
(the bt one was ok, but set errno and make it the same for consistency).
[to be pulled up]
2011-04-17 23:12:38 +00:00
christos
5b8e5cb4eb Fix markup 2011-04-16 23:58:01 +00:00
plunky
5bbcd2919f when placing an attribute/value pair, validate that the value given
is a single data element
2011-04-16 07:19:36 +00:00
jruoho
e77640da5b Merge floor(3) to ceil(3). 2011-04-16 05:48:50 +00:00
jym
e09db11815 Duplicate item detected, destroying duplicate. 2011-04-15 22:57:05 +00:00
elric
98fbe74f8c Upgrade Heimdal to 1.5pre1 by switching the build from crypto/dist/heimdal
to crypto/external/bsd/heimdal.  The latter was just imported as the head
of the Heimdal tree as of a few days ago.
2011-04-15 18:05:42 +00:00
jruoho
ff8dfca355 Xref tm(3). 2011-04-14 05:50:49 +00:00
he
b974c45b30 Move the forward declaration of _sys_readlink() outside of the #if,
so that the build succeeds even if _FORTIFY_SOURCE isn't > 0.
2011-04-13 12:40:54 +00:00
jruoho
b29fd93227 Collect also the division functions to single place, div(3). 2011-04-13 07:12:52 +00:00
jruoho
19606f522d Collect abs(3), labs(3), llabs(3), and imaxabs(3) to a single small page. 2011-04-13 06:56:50 +00:00
jruoho
2ba8acef07 Fix another bug (no 'imaxint_t' type). 2011-04-13 06:41:11 +00:00
jruoho
5bbfa36d7b Fix obvious bug. 2011-04-13 06:35:48 +00:00
jruoho
9d56ec39d7 Split out from ieee(3) also the remainder(3) and copysign(3) families. 2011-04-13 04:57:10 +00:00
christos
e6eca274ad Fix SSP builds (Vladimir Kirillov) 2011-04-12 19:49:48 +00:00
jruoho
e615e396bd Split out FUNCTIONS to make this tolerable to read. Also improve readability
with lists. Describe the functions in the order of appearance in SYNOPSIS.
Use CAVEATS instead of NOTES. Remove "man page spam". Etc.
2011-04-12 13:46:38 +00:00
jruoho
72e27957d4 Xref tm(3). 2011-04-12 08:40:34 +00:00
jruoho
47a900e8bc Move some of the discussion from the messy ctime(3) to tm(3). 2011-04-12 08:39:26 +00:00
jruoho
9305ee0c33 Split the nextafter(3) family of functions to their own page and properly
document these.
2011-04-12 07:29:50 +00:00
jruoho
8ee666bc1f .Dv NULL. 2011-04-12 05:41:22 +00:00
jruoho
28629a5be1 Use RETURN VALUES rather than DIAGNOSTIC for... return values. 2011-04-12 04:55:05 +00:00
mrg
e9f4b70f7d rm -f ${.TARGET} before trying to > write to it; some how mine ended up
being mode 444 and the build failed.
2011-04-12 03:35:47 +00:00
roy
ed684e08ea Clean up some compile warnings 2011-04-11 21:37:19 +00:00
roy
9a92225ded POSIX says that term.h should define tgetstr and friends
Fixes PR lib/43941
2011-04-11 21:13:09 +00:00
drochner
997b81175f let log(<0) return NaN rather than -inf in POSIX/XOPEN modes, as
requested in PR lib/41931 by Havard Eidnes (the PR refers to POSIX,
the OSF/1 manpage suggests that XOPEN should behave that way too)
being here, do the same to log10 and log2
2011-04-11 15:17:33 +00:00
jruoho
32e685d288 Markup improvements. 2011-04-11 05:59:11 +00:00
wiz
a4af43db58 exec is on a higher plane of existence. 2011-04-11 00:21:45 +00:00
joerg
61ae1a1c52 Define _REENT. Extend CPPFLAGS. 2011-04-10 16:47:39 +00:00
christos
a87c855671 Document O_CLOEXEC. 2011-04-10 15:46:15 +00:00
christos
037499057e make infinityl match what gdtoa thinks. 2011-04-10 13:51:18 +00:00
matt
14d704c9e9 Add a workaround for older crt0.o that overwrite r2 (tcb pointer).
(save tcb pointer using _lwp_setprivate in ld.elf_so and retrieve the tcb
via _lwp_getprivate in libc and use it to restore the value in r2).
2011-04-07 02:19:28 +00:00
christos
962e9ad63f fix long double infinity. 2011-04-06 21:55:36 +00:00
jruoho
6e3ec5b1a3 Fix PR # 41894. 2011-04-06 08:38:43 +00:00
plunky
c5f754b958 inc pointer, so we store the value in the correct place 2011-04-05 18:58:43 +00:00
plunky
63f86cb4b8 Don't add the passed in 'len' value while testing if the data
space is large enough, to handle the edge case where len is
large (up to SSIZE_MAX may be valid on some machines) causing
pointers to wrap around and the fail condition to be missed.
2011-04-05 18:19:04 +00:00
plunky
354f9cc3c3 correct inverted logic (if sdp_put_data fails, sdp_put_attr should fail) 2011-04-04 19:51:33 +00:00
plunky
0d74ee67d3 remove compile time guard from previous commit, it is not needed
(C99 guarantees [u]intmax types are at least 64-bits)
2011-04-04 18:29:47 +00:00
plunky
a468cfe851 handle overflowed values correctly,
also put a compile time guard to warn if INTMAX won't fit in INT64
(all our ports currently have INTMAX = INT64)
2011-04-04 16:19:25 +00:00
blymn
eff7afe2e8 Add man page link for define_key 2011-04-04 10:32:04 +00:00
jruoho
cbe6dc2e1c Use .Fn for functions. 2011-04-04 08:00:53 +00:00
christos
8056bccd98 Protect against stack smashes (Maksymilian Arciemowicz) 2011-04-03 22:14:15 +00:00
jruoho
dc9fc4f125 .Xr uvm_map_protect, not .Fn. 2011-04-03 06:54:30 +00:00
jruoho
f364f2ef05 Offset indent. 2011-04-03 06:05:21 +00:00
mbalmer
8ac2ff5d25 Fix misplaced parenthesis, from henning.petersen@t-online.de, thanks. 2011-04-02 10:22:09 +00:00
jruoho
132da5fb56 Offset indent. 2011-03-31 07:52:34 +00:00
jruoho
88d19f0f7c .Li -> .Em. 2011-03-30 16:41:00 +00:00
jruoho
d1a07d838a + .Pp. 2011-03-30 16:37:09 +00:00
jruoho
423f8d7704 Improve -width. 2011-03-30 16:29:26 +00:00
blymn
3da4a766de fflush the outfd after setting the cursor visibility so it takes effect
immediately.
2011-03-30 09:47:02 +00:00
jruoho
29a43bf561 From Henning Petersen in PR # 44641: C99 primitive type 'bool' used
as a variable name. Also small KNF, as in FreeBSD.
2011-03-30 08:22:01 +00:00
joerg
928f301be9 Rework TLS initialisation:
- Update TCB for the initial thread in pthread__initthread, not
  pthread__init to get it valid as soon as possible.
- Don't overwrite the pt_tls field in pthread__initthread.
- Don't deallocate pt_tls in pthread__scrubthread. This worked more by
  chance than by design.
- Handle freeing the TLS area in pthread_create after removing the
  thread instance from the dead queue.
2011-03-30 00:03:26 +00:00
jruoho
cb0f983e60 Improve -width. 2011-03-29 18:54:54 +00:00
jmmv
255271589f Extend pidfile(3) to support creating pid files in arbitrary locations.
If the argument provided to pidfile(3) contains a '/', then the value is
considered to be an absolute/relative path and the pid file is created
in the given location.

Otherwise, pidfile(3) behaves as before and treats the provided value as
a basename to construct a pid file in /var/run/<basename>.pid.  This means
that to create a pid file named "foo.pid" in the current directory, one
must specify "./foo.pid".
2011-03-29 13:55:37 +00:00
martin
ecf8c9b0f0 ABI police: avoid cluttering global registers %g2 and %g7. Not quite there
yet for %g2, but the target is not very well defined. %g7 should be clean
now.
2011-03-28 11:19:12 +00:00
wiz
7091eebfa9 Whitespace and punctuation. 2011-03-27 22:55:07 +00:00
wiz
971b386cde Oh no -- a space! get rid of it, quick. 2011-03-27 22:51:35 +00:00
njoly
119aff4da3 Fix sigprocmask section (3 -> 2). 2011-03-27 12:53:16 +00:00
njoly
63adbe29fb Fix xref, arm32_sync_icache -> arm_sync_icache. 2011-03-27 12:48:41 +00:00
he
08a8bf5254 Fix this so that it builds for vax; where the compiler balks at the
mixture of a union and a double in an expression (imagine that!)
I see other similar uses, and how they pass through for other ports
is beyond me, but I have not touched them in this round.

OK'ed by christos@
2011-03-27 11:21:54 +00:00
christos
2587e6e437 add fpgetprec/fpsetprec 2011-03-26 19:51:41 +00:00
njoly
82815469fb Add quotes for multi-words width string. 2011-03-25 17:15:26 +00:00
pooka
9fdb8e5eff mention rumphijack 2011-03-25 16:13:05 +00:00
pooka
0446c4bc83 add paragraph about kernel clients 2011-03-25 16:07:43 +00:00
joerg
6c7179c5fb Remove support for the old BSDCTYPE format. 2011-03-25 00:45:24 +00:00
bouyer
d9210c2405 Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)
2011-03-24 17:05:39 +00:00
dholland
8ba9dddb47 Eliminate dead store. From Henning Petersen in PR 42776. Doesn't change
the output .o file.
2011-03-24 02:29:33 +00:00
martin
d2c615416b Avoid using %g7 2011-03-23 20:54:35 +00:00
pooka
f347b4496a make work on nb5 again 2011-03-22 22:27:33 +00:00
martin
0c3a269fd8 Remove the sparc-v7 compatibility wrapper functions (.div, .mul, ... .urem),
the compiler never generates (or did generate in the past) 64bit code to call
them, and they are still present in our 32bit compat library.
2011-03-22 12:24:53 +00:00
jruoho
a8287d0554 * As is customary, append the parameter names from
SYNOPSIS to the description of the functions.

* Use .Ss for non-standard subtitles.

* Fix two identical subtitles.

* Add missing .It's, fix few .Ft's.

* Use a little more markup.

* Improve offsets.
2011-03-22 07:28:41 +00:00
enami
df36fea7b7 Don't use #endif where #else is expected. 2011-03-21 23:37:42 +00:00
christos
2b13247b7f pacify lint. 2011-03-21 22:33:46 +00:00
christos
a9f77bad7a Add Emin for the vax. Need to check 2011-03-21 22:33:29 +00:00
christos
ab9f1e36c8 fix vax typo. 2011-03-21 19:46:41 +00:00
pooka
dc8b381a32 update copyright 2011-03-21 16:41:27 +00:00
christos
374ecd4b4c more de-linting. 2011-03-21 12:53:50 +00:00
christos
a23ced05b4 fix some lint on i386 2011-03-21 04:52:09 +00:00
jruoho
e1897fd6ba Fix xref; security(8) -> security(7). 2011-03-21 04:42:50 +00:00
christos
a46656e6ee Add ld formats for the unit-tests. 2011-03-20 23:16:07 +00:00
christos
61e56760bc Merge the new gdtoa: Note that the built-in tests fail the same way as with
the old gdtoa.
2011-03-20 23:15:35 +00:00
bouyer
6d537d7313 Fix use-after-free. Discovered by running tests with MALLOC_OPTIONS=J
(should this be the default for tests ?), pointed out by njoly@
2011-03-20 12:36:14 +00:00
christos
3e812ebec1 don't need these and they break the build 2011-03-19 21:26:02 +00:00
christos
185969dd49 from www.netlib.org 2011-03-19 16:26:36 +00:00
he
83a6b62058 It would be nice if lint knew that abort() will never return.
For now just insert a /* NOTREACHED */ comment to fix the build failure.
2011-03-18 14:56:01 +00:00
roy
f42fd8d0f1 Simplify some conversion by usig pre formatted strings and a function
to print a parameter.
2011-03-18 10:42:54 +00:00
martin
30b9b129ac Test the proper array index. Discovered by sparc64 automatic test runs. 2011-03-18 09:07:20 +00:00
joerg
5349df0309 Add missing MLINKS. From Stathis Kamperis. 2011-03-18 00:57:19 +00:00
skrll
a59f1998c0 Appease the hppa linker. 2011-03-17 22:13:58 +00:00
wiz
b8e9a97310 Fix SYNOPSIS. Error found by martin. 2011-03-17 14:06:29 +00:00
matt
353ac4a525 Since this is use pthread_int.h, it needs __LIBPTHREAD_SOURCE__ to be defined. 2011-03-17 01:01:15 +00:00
matt
def13dad30 Add __HAVE___LWP_GETTCB_FAST support (for mips and powerpc). 2011-03-17 00:43:48 +00:00
joerg
01eef02a1b If TLS support is present, use it for pthread__self(). The
initialisation order is correct in this case as _lwp_setprivate has been
called already by ld.elf_so for dynamic programs or _libc_init for
statically linked ones.
2011-03-16 12:39:44 +00:00
njoly
603f3daee7 Convert hashtab to Elf_Symindx type, and use it directly to get symbol
count. Remove now unused GETVECWORDn macro.

This is needed to make it work on alpha which use non-standard 64bit
values for the symbol hash table section, unlike all other archs.
2011-03-16 11:44:01 +00:00
mbalmer
7d564f115e Crosslink wcstombs(3) and mbstowcs(3). 2011-03-16 09:32:12 +00:00
erh
dba1735a6e Remove one last reference to commaize_number.3 2011-03-16 01:30:24 +00:00
christos
ab077958c3 goodbye short-live commaize_number(3), if you liked it:
#define commaize_number(s, l, n) snprintf(s, l, "%'llu", (unsigned long long)n)
2011-03-16 00:50:28 +00:00
pooka
754d118ee3 don't spam connection errors to stderr by default 2011-03-15 09:35:05 +00:00
wiz
f675b9e58c Shorten Nd by putting the comment there in a paragraph in the body.
Use more markup. Sort SEE ALSO. Fix typo. Capitalize NetBSD like
we all love it.
2011-03-15 08:33:35 +00:00
matt
c5d79d45e3 Properly support the MIPS TLS ABI. 2011-03-15 07:40:18 +00:00
erh
9a5590a540 PR#7540, add a commaize_number function, which inserts comma into a string
of digits to make it more readable.  This is soon to be used in /bin/ls.
2011-03-15 03:47:04 +00:00
pooka
0dc6decc72 document fdoff 2011-03-14 15:21:22 +00:00
pooka
e5eecf0660 fdoff is descriptive enough 2011-03-14 15:15:47 +00:00
pooka
c9038b2d6c Make fdoffset configurable. Also, enforce that host descriptors
are smaller than the offset.
2011-03-14 15:13:26 +00:00
njoly
a8fd935b9b Add krb5_{mk,rd}_priv(3) links. 2011-03-14 13:53:55 +00:00
christos
50f9c0a390 OOPS has been reverted. 2011-03-14 11:44:20 +00:00
wiz
b84d433045 Add serial comma, quote minus, fix NetBSD version in HISTORY. 2011-03-13 09:12:35 +00:00
wiz
afb4355ad9 Add serial comma, quote minus, add HISTORY for strnunvis and strnunvisx. 2011-03-13 09:11:54 +00:00
mrg
8254d24b84 cast "~0" to (size_t) when passing to a size_t taking function.
fixes lint build errors.
2011-03-13 07:40:44 +00:00
joerg
fecb31745a Avoid a dependency issue between pthread TLS by using simple atomic
initialisation, possibly running the initialisation loop more than once.
2011-03-12 21:55:09 +00:00
christos
2d8f83e77b Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
  between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
  the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
  the buffer is not large enough, instead of silently truncating.
2011-03-12 19:52:45 +00:00
matt
01061e574e Don't initialize %r2 for SDA2_BASE anymore. It's needed for TLS. 2011-03-12 07:56:36 +00:00
matt
69358e3723 Add PPC TLS support. Add -D_LIBC_SOURCE for tls.c and _lwp.c (powerpc)
so that __lwp_gettcb_fast and __lwp_settcb inlines are define.
2011-03-12 07:55:09 +00:00
matt
d972b61c0e Use __lwp_settcb if available. 2011-03-12 07:52:37 +00:00
matt
71fdb89287 Use __lwp_gettcb_fast if present. 2011-03-12 07:46:29 +00:00
christos
2dec048cbe avoid c99 2011-03-12 05:23:41 +00:00
christos
5dc359e2dd Prepare for strnvis functionality by providing a length to the encoding
functions.
2011-03-12 03:24:08 +00:00
christos
29ba757a34 revert OOPS change now that most of the reasons for tgoto to return NULL
have been eliminated.
2011-03-11 13:28:52 +00:00
pooka
563593515e Use rumphijack_dlsym() to figure out where __sysctl() is during
init.  Otherwise powerpc dlsym() DTWT and returns NULL.
(now i have no idea why dlsym() it works from rcinit(), but i'll
opt to not care)

Hah, only took 15min to debug that crap this time around.  I'm
quickly approaching zero-time with it.
2011-03-10 23:02:56 +00:00
roy
df504c6413 Do our best to process invalid terminfo strings instead of just
returning NULL.
2011-03-10 13:39:26 +00:00
roy
9d7b5f143f Fix two other off-by-one errors when processing %P and %g commands. 2011-03-10 10:46:33 +00:00
roy
40109496d4 Add support for translating the following termcap commands into terminfo:
%B %D %r %2 %3 %d %+ %> %.
Fixes PR bin/44692.
2011-03-10 10:17:19 +00:00
pooka
3406bd8660 Revert 1.81 and do it in a saner way with an ifdef. Later, when
the naming crisis is resolved, we can probably support rump kernel
quotas from nb5 also.
2011-03-10 09:47:32 +00:00
roy
74cdc55234 Fix an off-by-one error when processing embedded values. 2011-03-10 09:45:32 +00:00
wiz
97b3b86219 Add serial commas. 2011-03-10 08:53:04 +00:00
joerg
3b9c90a96e Define namespace remap macros before including sys/tls.h. 2011-03-09 23:50:40 +00:00
pooka
bbc64bd6b0 document vfs and sysctl knobs to RUMPHIJACK 2011-03-09 23:40:44 +00:00
pooka
61f25f646e Make getfh() a pathcall instead of a fhcall. while it does pertain
to file handles, it still gets passed a path and we can DTRT based
on that.
2011-03-09 23:26:19 +00:00
joerg
aad599979d Add TLS support infrastructure. For dynamic binaries, ld.elf_so exports
_rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to
setup the thread private area of all new threads. ld.elf_so is
responsible for setting up the private area for the initial thread.
Similar functions are called from _libc_init for static binaries, using
dl_iterate_phdr to access the ELF Program Header.

Add test cases to exercise the different TLS storage models. Test cases
are compiled and installed on all platforms, but are skipped on
platforms not marked for TLS support.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

It is inspired by the TLS support in FreeBSD by Doug Rabson and the
clean ups of the DragonFly port of the original FreeBSD modifications.
2011-03-09 23:10:05 +00:00
pooka
9d51298cb8 Make this compile/work on NetBSD 5 once again. 2011-03-09 20:48:57 +00:00
bouyer
48c24921f2 Add quotactl(2) 2011-03-09 18:45:30 +00:00
bouyer
90848eb9f1 Fix last entries, make it work again. 2011-03-09 18:06:22 +00:00
tsutsui
7e1a38b9b3 Reorder insns to fix more load delay hazard botches on R3000.
Fixes floating point exceptions in _longjmp() during /etc/rc and
now NWS-3470D boots up to multi user with -current userland binaries.

Also fill BDslots in error path properly.
2011-03-09 16:10:29 +00:00
pooka
a7f297977b * use _exit() instead of exit() in retryconn=die: atexit() handlers
may hang if the server is dead
* consistent use of data
2011-03-09 15:09:21 +00:00
pooka
1af2e3a0a3 Add a bunch of process-wide hijack calls. Among other things, it's
now possible to use unmodified userspace binaries (rpcbind, mountd,
nfsd) to start a rump nfs service and mount file systems from it.

pain-rustique:42:~> mount
rumpfs on / type rumpfs (local)
10.1.1.1:/export on /mnt type nfs
2011-03-09 15:03:18 +00:00
pooka
a30ace437f g/c unused global 2011-03-09 09:17:12 +00:00
wiz
3bc5f349f0 Remove trailing whitespace. 2011-03-08 23:51:23 +00:00
pooka
7a2f6e5362 Enforce that the path=/rump specifier specifies and actual path
prefix and doesn't accept e.g. /rumpdev (only /rump/dev).
2011-03-08 21:36:01 +00:00
pooka
94372010ba clarify blanket operation a bit more 2011-03-08 21:09:18 +00:00
pooka
964221c99c maybe typo 2011-03-08 21:02:22 +00:00
pooka
f5d8571208 Add ``blanket''. It acts like path, except that the prefix does
_not_ get removed if the call goes to the rump namespace.

So, now it's possible to use e.g. tcpdump (and most other utilities
which hardcore a /dev pathname) on a rump kernel:

golem> setenv RUMPHIJACK blanket=/dev/bpf
golem> tcpdump -n -i virt0
tcpdump: WARNING: SIOCGIFADDR: virt0: Device not configured
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on virt0, link-type EN10MB (Ethernet), capture size 96 bytes
21:55:38.925596 IP 192.168.2.101 > 204.152.190.12: ICMP echo request, id 47811, seq 0, length 64
21:55:39.095596 IP 204.152.190.12 > 192.168.2.101: ICMP echo reply, id 47811, seq 0, length 64

(if you additionally set socket=all in RUMPHIJACK, tcpdump doesn't
whine about the "not configured" interface)
2011-03-08 20:59:01 +00:00
pooka
57a486416f need -I${.OBJDIR} now 2011-03-08 19:11:27 +00:00
pooka
c057875f13 create srcsys symlink 2011-03-08 18:30:24 +00:00
pooka
d06a7e799a and for my next trick, i'm going to spell ARGSUSED correctly 2011-03-08 18:28:01 +00:00
pooka
e48cccc4df lint love 2011-03-08 18:25:16 +00:00
pooka
7905447e1d Since we ~never have a frame waiting on the initial call to waitresp,
call kevent before readframe.  Doesn't really affect performance,
but makes ktraces shorter ;)
2011-03-08 15:55:12 +00:00
pooka
00e34b229c Use sendmsg() instead multiple calls to sendto(). It behaves
slightly better in the multithreaded exec case in terms of partial
frames sent.  Plus, it's theoretically a little cheaper.

There's still a gray area with partial transfer from sendmsg(),
but I'm not sure I care enough about some academic scenario to
start fixing it (it basically needs an OOB exec signaller).
2011-03-08 15:34:37 +00:00
pooka
91240244df Nuke all threads belonging to a process calling exec before allowing
the exec handshake to return.

In addition to being The Right Thing To Do, fixes some nasty
conditions for CLOEXEC fd's (or at least does so in theory, I
couldn't create any problems although I tried).
2011-03-08 12:39:28 +00:00
pooka
20446f99b9 return correct value when reading a short frame 2011-03-08 10:02:01 +00:00
mlelstv
c619be51ca Don't try to clean/build or install a library here, there are only
subdirectories.

Also, bsd.lib.mk requires a defined LIB, otherwise it will generate
unwanted commands during clean. It even failed on netbsd-4 where
'rm -f' needs at least one parameter which is missing due to recent
corrections in make/vars.c.
2011-03-08 09:49:42 +00:00
pooka
fc3b823359 use nwork-adjusted amount of idle workers to decide is they are truly idle. 2011-03-07 21:57:15 +00:00
joerg
5c3ccd6eba Pass down ELF Auxillary Vectors for static NetBSD binaries too.
Rename __libc_init to _libc_init and call it explicitly from CSU code.
This enforces the constructor run order for newly linked programs.
Keep it as constructor with run-once semantic for binary compatibility.
Implement dl_iterate_phdr for statically linked programs.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-07 05:09:09 +00:00
christos
959ab2631c Restore historical behavior of tgoto() to return "OOPS" on failure. This is
best for now because there are too many programs that don't check the return
value of it. Of course cursor motion commands from $TERMCAP have 0 chance
of working now, since their % escapes are not translated to terminfo. In
the window case %+ expects one param from the stack in the termcap case
and two in the terminfo so we barf. We need proper captoinfo handling for
the % escapes, like the one in ncurses. Hi Roy :-)
2011-03-07 00:27:51 +00:00
wiz
9ef313636b Various fixes:
Remove trailing whitespace.
Sort sections.
Sort errors.
Fix typos.
Use more markup.
Probably something else I forgot.
2011-03-06 17:19:25 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
christos
ce009e37f0 Check bits on each loop to prevent integer oveflow.
Reported by Maksymilian Arciemowicz
2011-03-06 16:00:20 +00:00
martin
49f1dcc8e5 While we use hardware (for float and double), but cooperate with softfloat
(to do long double), we need to not only handle the hardware exception
mask and cummulated flags, but also update/query the softfloat variables.
Since this may go away sometime (to make us psABI compliant), ifdef it
properly.
2011-03-06 10:32:47 +00:00