summaryrefslogtreecommitdiffstats
path: root/lib/libgeom
Commit message (Collapse)AuthorAgeFilesLines
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.bdrewery2015-11-251-1/+0
| | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division
* Plug memory leaks when running out of memory.delphij2015-08-281-1/+3
| | | | | Reported by: clang scan-build MFC after: 2 weeks
* Revert part of r280687, reporting "1" (true) for empty value.mav2015-08-131-1/+1
| | | | | | | For example, it made gpart partitions without label report "1" as label. PR: 202089 MFC after: 3 days
* Revert r284417 it is not necessary anymorebapt2015-06-151-1/+1
|
* Enforce overwritting SHLIBDIRbapt2015-06-151-1/+1
| | | | | | | | | Since METAMODE has been added, sys.mk loads bsd.mkopt.mk which ends load loading bsd.own.mk which then defines SHLIBDIR before all the Makefile.inc everywhere. This makes /lib being populated again. Reported by: many
* Add META_MODE support.sjg2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-272-5/+14
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-192-9/+36
| |\
| * \ Merge head from 7/28sjg2014-08-191-3/+3
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+1
| | | |
| * | | Updated dependenciessjg2014-05-101-0/+2
| | | |
| * | | Merge from headsjg2013-09-052-0/+6
| |\ \ \
| * | | | Updated dependenciessjg2013-03-111-0/+1
| | | | |
| * | | | Updated dependenciessjg2013-02-161-2/+0
| | | | |
| * | | | Updated/new Makefile.dependsjg2012-11-081-0/+4
| | | | |
| | | | |
| | \ \ \
| *-. \ \ \ Sync from headsjg2012-11-041-8/+33
| |\ \ \ \ \
| * | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+17
| | |/ / / / | |/| | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | libgeom: plug memory leak in EndElement.pfg2015-04-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CID: 1016696 Found by: Clang static checker MFC after: 1 week
* | | | | | Make GEOM_PART work in presence of previous withered self.mav2015-03-261-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Sponsored by: iXsystems, Inc.
* | | | | | Convert libraries to use LIBADDbapt2014-11-251-2/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | While here reduce a bit overlinking
* | | | | Explicitly specify MAP_SHARED when mapping the stats file descriptor.jhb2014-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: kib MFC after: 1 week
* | | | | Systems with lots of geom providers can end up with a kern.geom.confxmlbenno2014-09-041-7/+34
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | value too large for the buffer allocated. Work around this by retrying a few times with larger buffer sizes. Submitted by: Scott Ferris <scott.ferris@isilon.com> Reviewed by: mlaier, ngie Sponsored by: EMC Isilon Storage Division
* | | | use .Mt to mark up email addresses consistently (part3)bapt2014-06-231-3/+3
| |_|/ |/| | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* | | Since there's no defined schema for the XML that's generated by thescottl2013-07-192-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | kern.geom.confxml sysctl, it's silly to warn about tags in libgeom, especially since libgeom exists simply to build a tree out of the conf information. Obtained from: Netflix MFC after: 3 days
* | | Revert r253247. This change should be improved based on a lesson learnthrs2013-07-121-2/+2
| | | | | | | | | | | | | | | | | | from r233646 first. Pointed out by: jmallett
* | | Use strtoumax() instead of strtoul() for id/ref attr in XML elements.hrs2013-07-121-2/+2
| |/ |/| | | | | | | | | This improves compatibility when running an ILP32 binary on LP64 kernel. Spotted by: gjb
* | Improve libgeom XML parsing error handling.jh2012-10-261-8/+33
|/ | | | | | | - Abort parsing and return an error if we run out of memory. - Return EILSEQ from geom_xml2tree() for XML syntax errors. Silence on: freebsd-geom
* Back out r233646. Although it fixed most libgeom consumers under 32-bitjmallett2012-04-102-82/+29
| | | | | | | | | | | | | | | | | | | compatibility, it broke programs using devstat, under 32-bit compatibility and not. It's very difficult to fix the identifiers used by devstat, so this change is simply being backed out. Since changes to 3rd-party code seem likely, and may be necessary to properly fix 32-bit binaries on 64-bit kernel, it would seem better to make more invasive changes to fix GEOM's problems with 32-bit compatibility in general. The right thing to do is to replace all of the use of pointers as opaque identifiers with a fixed-size (64-bit or even 32-bit should be enough for tracking unique GEOM elments) field. That probably maintains source compatibility with most GEOM consumers, and allows xml2tree to make better assumptions about how to decode the identifiers. Submitted by: Anton Yuzhaninov
* Fix 32-bit libgeom consumers run on 64-bit kernels with COMPAT_FREEBSD32.jmallett2012-03-292-29/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel pointer values are used as opaque unique identifiers, which are then used to reconstruct references between various providers, classes, etc., inside libgeom from the source XML. Unfortunately, they're converted to pointer-width integers (in the form of pointers) to do this, and 32-bit userland pointers cannot hold sensible representations (however opaque) of 64-bit kernel pointers on all systems. In the case where the leading bits are zero and 32 distinct bits of pointer can be identified, this will happen to work. On systems where the upper 32-bits of kernel pointers are non-zero and the same for all kernel pointers, this will result in double frees and all kinds of bizarre crashes and linkage between objects inside libgeom. To mitigate this problem, treat the opaque identifiers in the XML as C strings instead, and internalize them to give unique and consistent per-object pointer values in userland for each identifier in the XML. This allows us to keep the libgeom logic the same with only minor changes to initial setup and parsing. It might be more sensible for speed reasons to treat the identifiers as numbers of a large size (uintmax_t, say) rather than strings, but strings seem fine for now. (As an added side-effect, this makes it slightly easier to identify unresolved references, but nothing has been added to inform the user of those.)
* Remove stale link.jh2010-12-041-3/+1
| | | | PR: 151252
* Remove code duplication by introducing static gctl_param_add() function whichpjd2010-10-211-22/+14
| | | | is now used by both gctl_ro_param() and gctl_rw_param().
* - Simplify gctl_get_handle() a bit.pjd2010-10-211-5/+3
| | | | - Prefer 'unsigned int' over 'u_int' in userland code.
* Handle null return from XML_ParserCreate and fix a few memory leaks onemaste2010-10-051-4/+10
| | | | | | | error conditions. Submitted by: Mark Johnston <mjohnston at sandvine dot com> MFC after: 2 weeks
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-161-1/+1
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* Correct a typo (when we talk about offset, it shoulddelphij2010-01-171-1/+1
| | | | | | be offset, not size). Submitted by: pluknet at gmail com
* Expose stripe offset and stripe size through libgeom and geom(8) userlanddelphij2010-01-174-1/+55
| | | | | | utilities. Reviewed by: pjd, mav (earlier version)
* Add missing `void' keyword.ed2009-12-311-1/+1
|
* Add links to libgeom(3) where appropriate.trasz2009-05-191-0/+2
|
* - Update the libgeom manpage with a description of g_device_path andlulf2008-09-081-3/+26
| | | | | | g_providername utility functions. Approved by: kib (mentor)
* - Add a new ioctl for getting the provider name of a geom provider.lulf2008-09-072-13/+95
| | | | | | | | - Add a routine for looking up a device and checking if it is a valid geom provider given a partial or full path to its device node. Reviewed by: phk Approved by: pjd (mentor)
* Add sbuf_new_auto as a shortcut for the very common case of creating ades2008-08-091-1/+1
| | | | | | | completely dynamic sbuf. Obtained from: Varnish MFC after: 2 weeks
* - Simplify the procedure of retrieving XML-data from the kernel.lulf2008-07-083-26/+65
| | | | | | | | | | | | | - Fix a number of potential memory leaks in libgeom related to doing realloc without freeing old pointer if things go wrong. - Fix a number of places in libgeom where malloc and calloc return values were not checked. - Check malloc return value and provide sufficient warning messages when XML parsing fails. PR: kern/83464 Submitted by: Dan Lukes <dan - at - obluda.cz> Approved by: kib (mentor)
* Fix spelling.thompsa2008-06-131-1/+1
| | | | | PR: docs/124561 Submitted by: Sam Banks
* Use 'dowrite' as an argument name instead of too general 'write'.pjd2008-05-202-7/+7
|
* Remove parameter names from prototypes to avoid namespace issues.des2007-05-061-22/+22
|
* Implement and document some utility functions that can be used to communicatepjd2007-05-064-3/+360
| | | | | | with GEOM providers. OK'ed by: phk
* Second call of sysctl() is used to gather a proper size of a memory chunkwkoszek2007-05-011-1/+1
| | | | | | | | | | | needed to hold the GEOM tree. At this point, pointer 'p' has an improper value (as it was used previously), and we're getting EFAULT. Fix this functionality by passing NULL instead of 'p'. This fixes mdconfig(8) -l output with high number of md(4) devices. Found by: kris Reviewed by: phk
* Fix prototype.ru2005-11-241-1/+1
|
* Check for NULL pointer return.phk2005-05-241-0/+2
| | | | Spotted by: marcus
OpenPOWER on IntegriCloud