aboutsummaryrefslogtreecommitdiff
path: root/lib/libgeom
Commit message (Collapse)AuthorAgeFilesLines
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-1/+0
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* pkgbase: Put a lot of binaries and lib in FreeBSD-runtimeEmmanuel Vadot2019-09-051-1/+2
| | | | | | | | | | | | All of them are needed to be able to boot to single user and be able to repair a existing FreeBSD installation so put them directly into FreeBSD-runtime. Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21503 Notes: svn path=/head/; revision=351855
* lib: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-266-0/+12
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326219
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add a quick description of the geom_getxml(3), geom_xml2tree(3),Romain Tartière2017-10-162-1/+57
| | | | | | | | | | | | geom_gettree(3) and geom_deletetree(3) functions provided by libgeom and are not documented in libgeom(3). Reviewed by: mav, bjk, allanjude Approved by: allanjude Differential Revision: https://reviews.freebsd.org/D12679 Notes: svn path=/head/; revision=324667
* libgeom: Remove redundant and duplicated codeConrad Meyer2017-09-081-46/+31
| | | | | | | | | | | In g_open(), g_device_path_open(). No functional change. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=323316
* Remove getpagesize(3) error checking added in r317312Enji Cooper2017-05-281-2/+0
| | | | | | | | | | getpagesize(3) no longer fails as of r317436. MFC after: 3 days Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319019
* Minor style(9) fixupsEnji Cooper2017-04-231-10/+9
| | | | | | | | | | | | Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317316
* Fix type for `pagesize` to match the return type for getpagesize(3)Enji Cooper2017-04-231-2/+2
| | | | | | | | | | | | to fix the build MFC after: 5 weeks X-MFC with: r317311 Pointyhat to: ngie Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317312
* Check for failures from getpagesize(3)Enji Cooper2017-04-231-0/+2
| | | | | | | | | | | | Return errno on failure, similar to the open(2) call above it. MFC after: 5 weeks Reported by: Coverity CID: 1193753 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317311
* Minor style(9) fixupsEnji Cooper2017-04-231-8/+6
| | | | | | | | | | | | Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317310
* libgeom(3): note that stdio.h is required when referencing gctl_dump(3)Enji Cooper2017-04-221-0/+4
| | | | | | | | | | | | | | | | | gctl_dump(3) is only exposed when stdio.h is #include'd first, per its addition in r112510. The reasoning noted for the conditional "exposure" of the function was to "limit #include pollution". This addresses an issue I found with the documentation when looking at bug 218809, which in turn addresses a -Wimplicit-function-declaration compiler warning in `tools/regression/geom_gpt/test.c` (it uses gctl_dump(3)). MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317289
* libgeom(3): apply minor polishEnji Cooper2017-04-221-11/+10
| | | | | | | | | | | | | | - Use .Dv when mentioning NULL per mdoc(7). - Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions so they're less wordy. - Fix a typo in `g_device_path` (can not -> cannot). MFC after: 5 weeks Tested with: igor, make manlint Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317288
* First pass through library packaging.Glen Barber2016-02-041-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295278
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.Bryan Drewery2015-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 Notes: svn path=/head/; revision=291307
* Plug memory leaks when running out of memory.Xin LI2015-08-281-1/+3
| | | | | | | | Reported by: clang scan-build MFC after: 2 weeks Notes: svn path=/head/; revision=287247
* Revert part of r280687, reporting "1" (true) for empty value.Alexander Motin2015-08-131-1/+1
| | | | | | | | | | For example, it made gpart partitions without label report "1" as label. PR: 202089 MFC after: 3 days Notes: svn path=/head/; revision=286719
* Revert r284417 it is not necessary anymoreBaptiste Daroussin2015-06-151-1/+1
| | | | Notes: svn path=/head/; revision=284421
* Enforce overwritting SHLIBDIRBaptiste Daroussin2015-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 Notes: svn path=/head/; revision=284417
* Add META_MODE support.Simon J. Gerraty2015-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 Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-5/+14
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-192-9/+36
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-191-3/+3
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge from headSimon J. Gerraty2013-09-052-0/+6
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Updated/new Makefile.dependSimon J. Gerraty2012-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242788
| * | | | Sync from headSimon J. Gerraty2012-11-041-8/+33
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | libgeom: plug memory leak in EndElement.Pedro F. Giffuni2015-04-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CID: 1016696 Found by: Clang static checker MFC after: 1 week Notes: svn path=/head/; revision=281875
* | | | | | Make GEOM_PART work in presence of previous withered self.Alexander Motin2015-03-261-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=280687
* | | | | | Convert libraries to use LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | While here reduce a bit overlinking Notes: svn path=/head/; revision=275024
* | | | | Explicitly specify MAP_SHARED when mapping the stats file descriptor.John Baldwin2014-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: kib MFC after: 1 week Notes: svn path=/head/; revision=271721
* | | | | Systems with lots of geom providers can end up with a kern.geom.confxmlBenno Rice2014-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 Notes: svn path=/head/; revision=271085
* | | | use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin2014-06-231-3/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
* | | Since there's no defined schema for the XML that's generated by theScott Long2013-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 Notes: svn path=/head/; revision=253469
* | | Revert r253247. This change should be improved based on a lesson learntHiroki Sato2013-07-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | from r233646 first. Pointed out by: jmallett Notes: svn path=/head/; revision=253249
* | | Use strtoumax() instead of strtoul() for id/ref attr in XML elements.Hiroki Sato2013-07-121-2/+2
| |/ |/| | | | | | | | | | | | | | | This improves compatibility when running an ILP32 binary on LP64 kernel. Spotted by: gjb Notes: svn path=/head/; revision=253247
* | Improve libgeom XML parsing error handling.Jaakko Heinonen2012-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 Notes: svn path=/head/; revision=242130
* Back out r233646. Although it fixed most libgeom consumers under 32-bitJuli Mallett2012-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 Notes: svn path=/head/; revision=234107
* Fix 32-bit libgeom consumers run on 64-bit kernels with COMPAT_FREEBSD32.Juli Mallett2012-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.) Notes: svn path=/head/; revision=233646
* Remove stale link.Jaakko Heinonen2010-12-041-3/+1
| | | | | | | PR: 151252 Notes: svn path=/head/; revision=216177
* Remove code duplication by introducing static gctl_param_add() function whichPawel Jakub Dawidek2010-10-211-22/+14
| | | | | | | is now used by both gctl_ro_param() and gctl_rw_param(). Notes: svn path=/head/; revision=214129
* - Simplify gctl_get_handle() a bit.Pawel Jakub Dawidek2010-10-211-5/+3
| | | | | | | - Prefer 'unsigned int' over 'u_int' in userland code. Notes: svn path=/head/; revision=214128
* Handle null return from XML_ParserCreate and fix a few memory leaks onEd Maste2010-10-051-4/+10
| | | | | | | | | | error conditions. Submitted by: Mark Johnston <mjohnston at sandvine dot com> MFC after: 2 weeks Notes: svn path=/head/; revision=213451
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whileJoel Dahl2010-08-161-1/+1
| | | | | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> Notes: svn path=/head/; revision=211397
* Correct a typo (when we talk about offset, it shouldXin LI2010-01-171-1/+1
| | | | | | | | | be offset, not size). Submitted by: pluknet at gmail com Notes: svn path=/head/; revision=202458