Commit Graph

1454 Commits

Author SHA1 Message Date
drochner
5724e77fda Implement experimental support to pass notifications that a file
was deleted from the filesystem to the disk driver, commonly
known as "discard" or "trim".
fs/driver support is in ffs and ata wd for now.
This is what was posted here:
http://mail-index.netbsd.org/tech-kern/2012/02/28/msg012813.html
with minor cleanup, and the global switch replaced by a mount option.
2012-10-19 17:09:06 +00:00
christos
71bbc99990 add clock_nanosleep 2012-10-02 01:42:06 +00:00
christos
9d1644e9da make the default to not check names. 2012-09-09 18:03:17 +00:00
drochner
8588929dc5 Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.
2012-08-30 12:16:48 +00:00
joerg
5e0b44099f SSP mostly works with Clang, even if optimisation is disabled.
Explicitly disable it for Lint though.
2012-08-08 20:23:32 +00:00
yamt
5c3967c0d3 comments 2012-07-30 23:04:42 +00:00
joerg
37a2d02f2e Always provide *_chk prototypes. Fixes DBG=-g build of libc. 2012-07-22 21:05:26 +00:00
darrenr
3ec957d580 bin/46703: BSD r-commands use wrong source address for stderr
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46703
Bump libc minor for the addition of rresvport_af_addr()
2012-07-14 15:06:26 +00:00
christos
6ddff5efba sprinkle restrict in realpath(3) 2012-06-21 21:13:29 +00:00
joerg
1907ec3a61 Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) to
depend on new devname_r(3) as heart. Add /dev/pts magic directly to
devname(3). While it can lead to returning non-existing paths, the
behavior is more consistent that way. Drop caching layer in devname(3),
it doesn't buy anything for the common case of having access to the
database. Teach devname(3) proper fallback behavior of scanning /dev.
Create both old-style and new-style database for now in /etc/rc.d/sysdb.
2012-06-03 21:42:44 +00:00
joerg
f22837c031 Prototype for cdbw_stable_seeder. 2012-06-03 21:21:45 +00:00
christos
ba12b0dcec oops, forgot to commit: add tgamma and tgammaf 2012-05-05 22:07:57 +00:00
christos
0bcf0d6f44 PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
2012-04-20 17:31:29 +00:00
joerg
2839b8fcc3 Do not wrap other header files with extern "C". 2012-04-20 16:20:45 +00:00
christos
ca5a32edc2 specify size of the array to help -fmudflap 2012-04-18 19:30:15 +00:00
christos
e457beb983 new flag. 2012-04-14 01:34:08 +00:00
christos
ffed4f27af add more options. 2012-04-13 23:29:14 +00:00
christos
5d7ab7f99c add timeout to getpassfd. 2012-04-13 14:39:49 +00:00
christos
311b90b920 add GETPASS_ECHO_STAR 2012-04-12 23:16:38 +00:00
christos
7def94a8ad add getpassfd 2012-04-12 22:08:02 +00:00
christos
eead6b2f0e add getpass_r 2012-04-12 19:36:34 +00:00
christos
8630757097 add getdisk{raw,cooked}name 2012-04-07 16:44:59 +00:00
christos
29484ab26f add getfsspecname 2012-04-07 04:04:21 +00:00
christos
20331437fc make CHAR_{MIN,MAX} work for both -fsigned-char and -funsigned-char 2012-03-28 17:04:41 +00:00
christos
0ed4e38b3f funopen2() 2012-03-27 15:06:01 +00:00
dholland
975bbee604 typo in comment 2012-03-22 03:06:06 +00:00
christos
53cd98be07 Add AI_ADDRCONFIG 2012-03-17 21:57:48 +00:00
christos
1aa0fee779 use __type_fit() instead of locally brewed macro 2012-03-13 21:14:55 +00:00
joerg
4acff4c01b Implement sem_timedwait. 2012-03-08 21:59:24 +00:00
christos
2b01a8ad07 PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
2012-03-02 17:27:48 +00:00
martin
136a5cd515 Use C++ compatible declaration for posix_spawn (instead of the C99 specific
posix one).
2012-02-22 17:51:01 +00:00
martin
74ce3f6bfc Make this include file C++ save, using the new __conly_restrict. 2012-02-21 10:54:07 +00:00
martin
2b8e910c25 Add missing __BEGIN_DECLS, from Henning Petersen in PR misc/46058. 2012-02-20 09:28:43 +00:00
rmind
8dad299218 Remove <sa.h> which has been obsolete since 2007. 2012-02-19 22:32:32 +00:00
joerg
52a4c27e3e Add _dlauxinfo helper function to provide access to the ELF auxilary
vector. This can normally be found via __ps_strings, but libc is
initialised too early when linked dynamically and doesn't have access to
it yet, so provide an alternative mechanism via ld.elf_so.
Bump libc minor.
2012-02-16 23:00:38 +00:00
martin
19f52532ad Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.
2012-02-11 23:31:22 +00:00
matt
a99c34e987 Use __INFINITY in preference to __builtin_inff(). Currently only VAX defines
__INFINITY and allows to use __builtin_huge_valf() instead since gcc4.5 will
error out unconditionally if __builtin_inf() is used.
2012-02-05 17:57:17 +00:00
dholland
7609b9bc56 Migrate one last leftover bit (used only by the kernel now) to
sys/ufs/ufs and remove the old quota headers and no-longer-used shared
code. Ok by releng.
2012-02-05 14:19:02 +00:00
dholland
832d4ca72b Be consistent about whether idtype and objtype codes are signed or
unsigned. They are signed. (While unsigned might have been a better
choice, it doesn't really matter and the majority of preexisting uses
were signed. And consistency is good.)
2012-02-01 05:46:45 +00:00
dholland
5f0d2c5f55 Add quota_quotaon() and quota_quotaoff(). Use them in quotaon(8). 2012-01-30 16:45:13 +00:00
dholland
f6b247aa3b Add quota_getrestrictions() to report the semantic restrictions
associated with a particular quotahandle.
2012-01-30 16:44:08 +00:00
dholland
d87a2031f8 Per the FS-independent schema, get one quotaval at a time from the
filesystem, instead of blocks and files together.

This results in fetching each FS-level quota entry twice and therefore
doing slightly more work, but (1) quota access isn't a critical path
and (2) after fetching the block values the file values will be hot in
the cache, so it won't add much total time.

Also move more of the FS-independent defintions from <quota.h> to
<sys/quota.h> so we can use them internally.

Step 4 of 5 for QUOTACTL_GET.

Note: this change requires a kernel version bump.
2012-01-29 06:40:57 +00:00
dholland
1d762ff060 Move second-layer proplib frobbing within ufs quota code up to the
first layer. (Step 2 of several for QUOTACTL_GET.)
2012-01-29 06:38:23 +00:00
christos
1897181a72 From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
2012-01-22 18:36:14 +00:00
dholland
0d7dfe62fa Add <quota.h> with the new libquota API.
This is the user/application API and does not include the kernel
interface. Definitions shared with the kernel are found in
<sys/quota.h>.

Since I've been working on a local branch I have taken the liberty of
moving the latest-so-far version of <quota.h> to the front of the
patch queue. This loses (a small amount of) history but has the
advantage of avoiding unnecessary version bumps of libquota.so.
2012-01-09 15:19:44 +00:00
christos
423a6f5ef0 strspct 2012-01-07 18:41:14 +00:00
christos
80b0f3a562 getfstypename addition 2011-11-13 21:57:14 +00:00
joerg
0b50389a15 Add __returns_twice for the attribute of the same name. This makes the
attribute explicit based on the functions GCC gives it too.
2011-11-05 09:27:06 +00:00
christos
d69c1b55d9 Fix pthreads variables:
- Add missing stuff from Issue 6 (some of it commented out)
- Fix _POSIX_THREAD -> PTHREAD variable confusion
- Amend PTHREAD_KEYS_MAX to 256 since this is what libpthread defined internally
2011-10-06 16:02:52 +00:00
jruoho
be8b5eb28c Define _PATH_CPUCTL. 2011-09-27 11:24:20 +00:00