summaryrefslogtreecommitdiff
path: root/common/include
AgeCommit message (Collapse)Author
2021-08-02fix various typos in comments and log messages.andvar
2020-06-06Improvements to the problib(3) API:thorpej
==> Provide a much more complete set of setters and getters for different value types in the prop_array_util(3) and prop_dictionary_util(3) functions. ==> Overhaul the prop_data(3), prop_number(3), and prop_string(3) APIs to be easier to use and less awkwardly named, Deprecate the old awkward names, and produce link-time warnings when they are referenced. ==> Deprecate mutable prop_data(3) and prop_string(3) objects. The old APIs that support them still exist, but will now produce link-time warnings when used. ==> When the new prop_string(3) API is used, strings are internally de-duplicated as a memory footprint optimization. ==> Provide a rich set of bounds-checked gettter functions in and a corresponding set of convenience setters in the prop_number(3) API. ==> Add a new prop_bool_value(3) function that is equivalent to prop_bool_true(3), but aligned with the new "value" routines in prop_data(3), prop_string(3), and prop_number(3).
2019-06-16get rid of caddr_tchristos
2019-06-05Make XDR usable from kernel or module.hannken
No user visible changes intended.
2019-06-04Move the basic part of XDR to common/include/rpc and common/lib/libc/rpc.hannken
No functional change intended.
2017-01-29fix argschristos
2017-01-29add sized versions of the copyin ioctls.christos
2016-05-31Add prop_array_add_cstring{,_no_copy} utility functions as suggested inpgoyette
PR lib/46723 using the patch provided. (Header file updates are mine.)
2016-01-22Needs prop_array.h to compile.dholland
2012-02-05Migrate one last leftover bit (used only by the kernel now) todholland
sys/ufs/ufs and remove the old quota headers and no-longer-used shared code. Ok by releng.
2012-02-01Remove old (5.99.48 - 5.99.62) libquota interface.dholland
2012-02-01Change the syscall API for quotas over to the new non-proplib one.dholland
- struct vfs_quotactl_args -> struct quotactl_args - add sys/stdint.h to sys/quotactl.h for clean userland build - install sys/quotactl.h in /usr/include - update set lists for same - add new marshalling code in libquota - add new unmarshalling code in vfs_syscalls.c - discard proplib interpreter code in vfs_quotactl.c - add dispatching code for the 14 quotactl ops in vfs_quotactl.c - mark the proplib quotactl syscall obsolete - add a new syscall number for the new quotactl syscall - change the name of the syscall to __quotactl() - remove the decl of the old quotactl from quota/quotaprop.h - add a decl of the new quotactl to sys/quotactl.h - update the libc build - update ktruss - remove proplib marshalling code from libquota - update copy of syscall table in gdb ppc sources - hack rumphijack to accomodate new quotactl name (as I recall, pooka wanted such a name change to simplify something, but I don't really see what/how) This change appears to require a kernel version bump for rumpish reasons.
2011-11-25Rename struct ufs_quota_entry -> struct quotaval.dholland
2011-11-20Reshuffle decls among the quota headers so everything is in the placedholland
it should be: - stuff for the proplib interface goes in <quota/quotaprop.h> - stuff for userlevel only goes in <quota/quota.h> - stuff shared between user and kernel goes in <sys/quota.h> Note that <quota/quota.h> and <quota/quotaprop.h> are expected to be moved or removed later on... one thing at a time. Update include directives in other files as needed.
2011-09-30Fix an implementation inconsistency with the prop_*_send_syscall() andjym
prop_*_recv_syscall() functions from proplib(3). They now share the same logic as the one from prop_*_send_ioctl() functions: - returns an int - 0 indicates "no error", otherwise returns the error number (and set errno) Many consumers of the prop_*_{ioctl, syscall} expect errno to be set on error and use err() to display the error message. As such, ensures that errno gets set before returning from these functions. prop_*_send_syscall() functions returned a boolean, and now return an int. Fix all call sites to use the new paradigm (only quota2 is affected in src). As the prop_*_{send,recv}_syscall() API appeared in -current and is only used by the recent quota2 code, I am not bumping the lib. The API change only affects the prop_*_send_syscall() function (recv_syscall()s were already used correctly), so ensure you are not mixing "old" -current quota binaries with a new proplib(3) (or the other way around). This change will be announced via a HEADS-UP and UPDATING. Does not affect the kernel part of proplib. Document the correct API in prop_array(3) and prop_dictionary(3). Thanks to Francois Tigeot for noticing the API inconsistency and reporting it on tech-kern@. ok bouyer@.
2011-08-25Add ppath/ headers that I had overlooked.dyoung
2011-06-07Fix bad cut'n'paste in copyright. Pointed out by dyoung@bouyer
2011-03-24Add a new libquota library, which contains some blocks to build and/orbouyer
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-01-20prop_*_copyout takes an object as second parameter, not a pointer to object.bouyer
2011-01-19- Implement prop_{array,dictionary}_copyout(), based onbouyer
prop_{array,dictionary}_copyout_ioctl(). - Implement prop_{array,dictionary}_recv_syscall(), which takes as parameter the pref we got from kernel and internalize it, and unmaps the buffer prop_{array,dictionary}_copyout() mapped for us. - add a prop_{array,dictionary}_send_syscall() for symetry, which is an alias to prop_{array,dictionary}_externalize_to_pref() Discussed on tech-kern@ and tech-userlevel@
2009-10-10Commit changes to header files missed in my previous commit.bad
Implement prop_array_externalize_to_pref(), prop_array_copyin(), prop_dictionary_externalize_to_pref() and prop_dictionary_copyin() as discussed in the thread: http://mail-index.netbsd.org/tech-kern/2009/07/29/msg005594.html Add prototypes for prop_array_externalize_to_pref() and prop_dictionary_externalize_to_pref().
2009-09-13Wipe out the last vestiges of POOL_INIT with one swift stroke. Inpooka
most cases, use a proper constructor. For proplib, give a local equivalent of POOL_INIT for the kernel object implementation. This way the code structure can be preserved, and a local link set is not hazardous anyway (unless proplib is split to several modules, but that'll be the day). tested by booting a kernel in qemu and compile-testing i386/ALL
2008-12-05Avoid conflicts with ZFS.ad
2008-09-11Add prop_array_add_int* and prop_array_add_uint* functions. These functionshaad
can be used to append specified type to the end of prop_array_t. Ok'ed by @joerg.
2008-06-03Add prop_array_util functions to proplib. This code is copied/changedhaad
prop_dictionary_util. From manual page The prop_array_util family of functions are provided to make getting and setting values in arrays more convenient in some applications. OK by mjf@ and freza@.
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2008-01-05Nuke prop_dictionary_capacity, there was no implementation for it.mjf
No objections on tech-kern.
2007-12-21Add virtual i8254 for x86emu.joerg
2007-12-01Move x86emu's include files to src/common/include/x86emu.joerg
2007-08-30Avoid using unbound amount of stack frames in prop_object_equaljoerg
by using a dynamic stack as well. Reorder arguments for the internalizer as the iteration is always present and should go before possibly NULL arguments. Reviewed by mjf@ and adrianp@
2007-08-17struct plistref does not reference other proplib data types, so split itpavel
in its own header file to be included by dkio.h. Fixes breakage due to pollution from proplib.h in programs which include ioctl.h. Tested and OK by dogcow@.
2007-08-16boolean_t -> boolthorpej
TRUE -> true FALSE -> false
2006-10-26Add prop_array_t support to prop_kern.thorpej
2006-10-26- Add prop_dictionary_all_keys(). Takes a snapshot of a dictionary'sthorpej
keys and returns them in an array. This effectively allows a caller to mutate a dictionary while iterating over it (really, you iterate over the array of keys instead of the dictionary itself). - Add a slew of utility functions that make it more convenient (in some circumstances, anyway) to get/set values in a dictionary.
2006-10-12Make prop_number_t handle both signed and unsigned numbers. The *integer*thorpej
routines now take int64_t arguments, and new *unsigned_integer* routines take uint64_t arguments. See prop_number(3) for complete details.
2006-09-22Alter the protocol impemented by prop_kern to allow for bi-directionalthorpej
plist-based messages and to eliminate looping previously required to receive a plist from the kernel: - prop_dictionary_copyin_ioctl() and prop_dictionary_copyout_ioctl() now take the cmd argument rather than the file open flag. The read-ness or write-ness of an ioctl command is checked by these routines to ensure that information is being passed to/from the userland component properly. - prop_dictionary_copyout_ioctl() now allocates the memory for the XML plist on behalf of the userland component by way of uvm_mmap(). The XML plist is copied out to the newly-mapped anonymous region, and the pointer returned via the plistref. - prop_dictionary_recv_ioctl() is responsible for munmap()'ing the region after parsing the XML plist into internal represenatation. - A new prop_dictionary_sendrecv_ioctl() is added, allowing user space code to send a dictionary to the kernel and receive one back as a reply. Update users of prop_kern for the API changes (Bluetooth). This constitutes an ABI / protocol change -- but this will also be put into NetBSD 4.0 so that the first proplib release will implement the new scheme.
2006-08-21Several changes to proplib:thorpej
- Arrays can now be externalized and internalized in the same way dictionaries can. - Add new "externalize to file" and "internalize from file" functions to make reading a property list from a file and writing a property list to a file more convenient. - Many assertions in the object implementations are gone. Instead, calling an accessor for one object type with a different object type as an argument will return a suitable "invalid" value. - prop_object_type() now returns a new PROP_TYPE_UNKNOWN value if called with a NULL object. - Externalized property lists now contain a reference to the Apple XML plist DTD. - Add a new prop_ingest(3) facility, which provides a convenient way to translate a dictionary into an arbitrary binary representation.
2006-07-12don't include stdint.h for _STANDALONE.yamt
2006-07-07Change prop_number_t to store a uint64_t, rather than a uintmax_t. Nothorpej
ABI change, and we ought to explicitly state that this is a fixed-width type, since that what it needs to be for binary plist support.
2006-07-05Add kernel and user space parts of a protocol for sending property liststhorpej
to / from the kernel using ioctls.
2006-05-18- Add prop_array_equals(), prop_dictionary_equals(), andthorpej
prop_dictionary_keysym_equals(), and prop_object_equals() functions. - Use realloc() where it makes sense. There will be more changes in this area. - Add a _prop_object_type structure that is used internally to keep information about the object types. Decreases the footprint of the objects slightly by replacing several pointers with just one.
2006-05-07Make the conditional for defining boolean_t complement the conditionalhe
in sys/sys/types.h -- also need to test _STANDALONE. Fixes a build problem for vax.
2006-04-27Initial commit of proplib, a library for manipulating property lists andthorpej
converting to/from an XML external representation (based on Apple XML property lists). Works in the kernel and user space.