aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_map.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the label search routine in geom_map to not trip up on '\0' bytes.Adrian Chadd2015-03-191-1/+9
| | | | | | | | | | | | | | | | | | * Just do the buf check early and fail out * If the offset being searched is: 00110000 00 b5 7e 45 61 e2 76 d3 c1 78 dd 15 95 cd 1f f1 |..~Ea.v..x......| .. and the match string is '.!/bin/sh' .. then it'll set the match string[0] to '\0', do a strncmp() against the read buffer, find it's matching two zero-length strings, and think that's where to start. MFC after: 2 weeks Notes: svn path=/head/; revision=280239
* Add device name used in geom_map verbose output. This helps when usingSean Bruno2014-09-111-4/+4
| | | | | | | | | | | geom_map with multiple flash/spi devices. Phabric: https://reviews.freebsd.org/D766 Reviewed by: adrian MFC after: 2 weeks Notes: svn path=/head/; revision=271442
* Use %j to match intmax_t.Warner Losh2012-07-011-1/+1
| | | | Notes: svn path=/head/; revision=237875
* MFP4 #212266Brooks Davis2012-06-291-10/+11
| | | | | | | | | Fix compile on MIPS64. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=237820
* Updates to geom_map from the author.Adrian Chadd2011-05-051-209/+246
| | | | | | | | | | The major update here is to support 64 bit size/offsets. There's also style related changes. Submitted by: ray@dlink.ua Notes: svn path=/head/; revision=221500
* Introduce geom_map, a GEOM provider designed for use byAdrian Chadd2011-04-121-0/+356
embedded flash stores. Some devices - notably those with uboot - don't have an explicit partition table (eg like Redboot's FIS.) geom_map thus provides an easy way to export the hard-coded flash layout as geom providers for use by filesystems and other tools. It also includes a "search" function which allows for dynamic creation of partition layouts where the device only has a single hard-coded partition. For example, if there is a "kernel+rootfs" partition, a single image can be created which appends the rootfs after the kernel with an appropriate search string. geom_map can be told to search for said search string and create a partition beginning after it. Submitted by: Aleksandr Rybalko <ray@dlink.ua> Notes: svn path=/head/; revision=220559