aboutsummaryrefslogtreecommitdiff
path: root/lib/libdisk
Commit message (Collapse)AuthorAgeFilesLines
...
* Lobotomize MakeDev(), we don't need it with devfs.Poul-Henning Kamp2002-10-211-0/+2
| | | | Notes: svn path=/head/; revision=105662
* Sigh, d_ntracks, not d_nheads.Poul-Henning Kamp2002-10-211-1/+1
| | | | Notes: svn path=/head/; revision=105652
* fwheads and fwsectors got swapped underway.Poul-Henning Kamp2002-10-211-2/+2
| | | | | | | Approved by: sam Notes: svn path=/head/; revision=105646
* Another baby step toward getting sysinstall working:Sam Leffler2002-10-201-76/+127
| | | | | | | | | | | | | | | o fillin media s/h/c fields from new XML phk just added; need this because sysinstall uses them in the fdisk look-alike o add new tags to xml parser o cleanup parser a touch; remove unused tags and move tag parsing stuff to a table to simplify future additions o redo callback to pass 64-bit values since mediasize overflows u_int32_t o loosen parsing sanity checks a touch to deal with new xml we must handle o move sector size probing to non-geom handling since we now get it from xml o remove WHOLE_DISK_SLICE buggery now that we get mediasize from xml Notes: svn path=/head/; revision=105575
* o since you can't use DIOCGDINFO and DIOCGSLICEINFO on drive nodes with geom,Sam Leffler2002-10-191-62/+456
| | | | | | | | | | | | | | | | get the xml configuration for the devices and "parse" the information to get what's needed o replace #ifdef DEBUG constructs with DPRINT/DPRINTX to make the code more readable Note the xml "parser" is very very hackish and should be replaced with a real one. This one was done to be very small and special-purpose; don't think about copying it elsewhere. Approved by: phk Notes: svn path=/head/; revision=105460
* not sure if this correct, but it compiles againSam Leffler2002-10-181-3/+3
| | | | Notes: svn path=/head/; revision=105366
* o ioctl DIOCGDINFO error wasn't checkedSam Leffler2002-10-171-7/+29
| | | | | | | | | | | | | | | o memory wasn't reclaimed in certain cases o add more msgs under #ifdef DEBUG o rewrite tangle of for loops for clarity NB: Open_Disk should redo how it malloc's memory so the caller can free everything. Documentation says the caller can free the disk list to reclaim everything but this leaks the indirect strings. Fixing this is simple for the sysctl case but adds complexity to the fallback, non-sysctl, case. Notes: svn path=/head/; revision=105349
* correct arg order to strlcpy/strlcat under #ifdef alphaSam Leffler2002-10-171-2/+2
| | | | Notes: svn path=/head/; revision=105348
* Fix to check disk geometry.Yoshihiro Takahashi2002-10-141-1/+18
| | | | | | | Submitted by: kawanobe@st.rim.or.jp (Kawanobe Koh) Notes: svn path=/head/; revision=105105
* Use buffer-safe string functions for paranoia.Kris Kennaway2002-10-121-11/+12
| | | | Notes: svn path=/head/; revision=105007
* Zero memory after malloc. This stops sysinstall from dumping coreKris Kennaway2002-10-121-0/+1
| | | | | | | | | during disk probing with malloc debugging enabled. MFC after: 1 week Notes: svn path=/head/; revision=105005
* Fix to support pc98.Yoshihiro Takahashi2002-10-083-0/+12
| | | | Notes: svn path=/head/; revision=104674
* White-space change only. Move closer to style(9).Poul-Henning Kamp2002-10-041-323/+322
| | | | Notes: svn path=/head/; revision=104469
* #include the right thing for PC98Poul-Henning Kamp2002-10-021-0/+4
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=104362
* Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:Poul-Henning Kamp2002-10-014-0/+4
| | | | | | | | | | | | | | | | | | | Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h. These two new copies are still intact copies of disklabel.h and therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them in programs which already include <sys.disklabel.h> is currently a no-op. This commit adds a number of such #includes. Once I have verified that I have fixed all the places which need fixing, I will commit the updated versions of the three #include files. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=104272
* Use correct printf format specifier to print unsigned longs.Garrett Wollman2002-05-301-1/+1
| | | | Notes: svn path=/head/; revision=97628
* NOSHARED is meaningless in the bsd.lib.mk context.Ruslan Ermilov2002-05-131-1/+0
| | | | Notes: svn path=/head/; revision=96518
* Retire the bogus uses of the disklabel field d_sbsize and begin toPoul-Henning Kamp2002-05-121-1/+1
| | | | | | | | | | initialize it to zero so we don't have to have everbody and their aunt including FFS specific header files. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=96475
* Modernize my email address.Poul-Henning Kamp2002-03-2510-10/+10
| | | | Notes: svn path=/head/; revision=93149
* Modify Delete_Chunk() into Delete_Chunk2() which can take a flagsMatthew Dillon2002-01-072-1/+20
| | | | | | | | | | argument. Leave a compatibility shim for Delete_Chunk(). Implement DELCHUNK_RECOVER flag so sysinstall can ask libdisk to recover space when deleting a chunk. Notes: svn path=/head/; revision=88995
* Sort the disknames when we get them from the kernel.Poul-Henning Kamp2001-12-231-10/+23
| | | | | | | Submitted by: <anarcat@anarcat.dyndns.org> Notes: svn path=/head/; revision=88448
* Add auto-fill-on-delete. When deleting an 'A'uto created partitionMatthew Dillon2001-12-092-17/+38
| | | | | | | | | | | | | | | | | | | sysinstall will automatically expand the previous partition to take up the freed up space. So you can 'D'elete /home and /usr will get the combined space, or you can 'D'elete /tmp and /var will get the combined space. This gives the user, developer, or lay person a huge amount of flexibility in constructing partitions from an 'A'uto base. It takes only 3 or 4 keystrokes to achieve virtually any combination of having or not having a /tmp and/or /home after doing an 'A'uto create. Change 'A'uto creation of /var/tmp to 'A'uto creation /tmp, which should be less controversial. MFC after: 6 days Notes: svn path=/head/; revision=87581
* One more fix for sysinstall/libdisk to create a device fileMakoto Matsushita2001-11-111-6/+10
| | | | | | | | | | | if and only if a target directory is devfs. Previous patch doesn't correct, it's unconditionally avoid to create a device file if kernel knows devfs. PR: 31109 Notes: svn path=/head/; revision=86260
* Add EFI GPT (238, 0xEE) and EFI System Parition (239, 0xEF)Peter Wemm2001-10-151-0/+2
| | | | Notes: svn path=/head/; revision=84965
* Check to see if the devfs MIB exists and return 1 if it exists ratherJordan K. Hubbard2001-10-101-0/+9
| | | | | | | | than making device node(s). Submitted by: Hiroo ONO <hiroo@oikumene.gcd.org> Notes: svn path=/head/; revision=84748
* Fixed bitrot in synopsis. The change of the return type ofBruce Evans2001-10-031-1/+1
| | | | | | | | Set_Boot_Blocks() from void to int had not reached here. Callers still don't check the new return value. Notes: svn path=/head/; revision=84394
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-011-2/+2
| | | | Notes: svn path=/head/; revision=84306
* Add __FBSDID()s to libdiskMatthew Dillon2001-09-309-27/+27
| | | | Notes: svn path=/head/; revision=84200
* Mark some functions as __printflike() and/or taking const char * argumentsKris Kennaway2001-08-201-0/+2
| | | | | | | | | instead of char *. MFC after: 2 weeks Notes: svn path=/head/; revision=81975
* mdoc(7) police: s/BSD/.Bx/ where appropriate.Ruslan Ermilov2001-08-141-1/+3
| | | | Notes: svn path=/head/; revision=81622
* mdoc(7) police: protect trailing full stops of abbreviationsRuslan Ermilov2001-08-101-1/+1
| | | | | | | with a trailing zero-width space: `e.g.\&'. Notes: svn path=/head/; revision=81449
* Remove whitespace at EOL.Dima Dorfman2001-07-151-2/+2
| | | | Notes: svn path=/head/; revision=79754
* + add u_long sector_size to struct disk (documented in libdisk.3)Jordan K. Hubbard2001-05-138-80/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + make Open_Disk sense the sector size by trying 512, 1024 and 2048 in this order. This makes the kernel note that dscheck(cd1): bio_bcount 512 is not on a sector boundary (ssize 2048) dscheck(cd1): bio_bcount 1024 is not on a sector boundary (ssize 2048) if 2048 is the sector size. If this worries anyone: the message is from /usr/src/sys/kern/subr_diskslice.c and shutups are to be placed there. + Have read_block and write_block use an additional parameter, the sector size. + replace all barfout calls with return NULL, 0, __LINE__, etc. Note that this does NOT emit diagnostics. More often than not, you don't want library functions to scribble on stderr -- it may not even be available. The right thing is to propagate the error condition to upper management. The app should take care of errors. + use d1->sector_size instead of 512 in various places. I've left many places untouched, especially those writing MBRs. I simply added another arg hardcoded as 512. This is because I would not know what I'm doing... I felt this approach would be reasonably backward compatible and not introduce any new bugs in critical software. Famous last words. Messing with MBRs might soon put me in the same screwup meister category as, uh, never mind. :-) + bump the max no of disks from 20 to 32 (due to PR 24503). PR: 8434 / 8436 / 24503 Submitted by: Jens Schweikhardt <schweikh@schweikhardt.net> Notes: svn path=/head/; revision=76551
* Add spaces around operators.David E. O'Brien2001-04-018-244/+248
| | | | | | | | It's OK, the Project and afford them now -- they aren't as expensive as they used to be. Notes: svn path=/head/; revision=75069
* Correct a comment.David E. O'Brien2001-04-011-1/+1
| | | | Notes: svn path=/head/; revision=75068
* Try to untangle some of the #ifdef spaghetti.David E. O'Brien2001-04-012-12/+12
| | | | | | | | | Also, looking to the future, don't assume all the world is an i386 and all its disk layout brain damage will be repeated by other platforms. So all the diking out if we are an Alpha, becomes adding in if we are an i386. Notes: svn path=/head/; revision=75067
* Add back <err.h> for warn().David E. O'Brien2001-04-011-0/+1
| | | | | | | | (of course it's pretty stupid to call it, as printf doesn't work w/in sysinstall, and sysinstall is the only consumer of libdisk) Notes: svn path=/head/; revision=75066
* Quiet warnings on the Alpha.David E. O'Brien2001-04-012-3/+11
| | | | Notes: svn path=/head/; revision=75065
* Add back <err.h> for warn().David E. O'Brien2001-04-011-0/+1
| | | | | | | | (of course it's pretty stupid to call it, as printf doesn't work w/in sysinstall, and sysinstall is the only consumer of libdisk) Notes: svn path=/head/; revision=75064
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-1/+1
| | | | Notes: svn path=/head/; revision=74870
* Libraries should _never_ call exit() themselves (or its alternate spellingDavid E. O'Brien2001-03-189-33/+33
| | | | | | | | | | | | | | `err()'). libdisk does! and additionally libdisk gets confused on Alpha disks with foreign disklabels, throws up its hands and exits. This is the cause of the "going no where without my init" install bug on the Alpha. So now on the Alpha, rather than call err(), we print the error string and continue processing. Submitted by: jkh Notes: svn path=/head/; revision=74426
* Fixed bitrot in prototype(s) in synopsis.Bruce Evans2001-02-051-1/+1
| | | | Notes: svn path=/head/; revision=72062
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-1/+1
| | | | Notes: svn path=/head/; revision=71895
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-291-1/+1
| | | | Notes: svn path=/head/; revision=70481
* Do install-time configuration of the i386 boot0 boot manager. AtRobert Nordier2000-12-121-1/+23
| | | | | | | | | | | | present, this is limited to turning on the packet option if any of disk slices begin above cylinder 1023. The effect of this change should therefore be to automatically enable LBA support, as needed, when installing FreeBSD. Something-of-the-kind-requested-by: peter Notes: svn path=/head/; revision=69920
* logRuslan Ermilov2000-11-221-3/+5
| | | | Notes: svn path=/head/; revision=69026
* Use Fx macro wherever possible.Ruslan Ermilov2000-11-141-1/+3
| | | | Notes: svn path=/head/; revision=68716
* Avoid use of direct troff requests in mdoc(7) manual pages.Ruslan Ermilov2000-11-101-2/+1
| | | | Notes: svn path=/head/; revision=68575
* MFS: add ATA raid support for sysinstallJordan K. Hubbard2000-11-062-2/+4
| | | | Notes: svn path=/head/; revision=68409
* Use kern.disks sysctl on PC-98.Yoshihiro Takahashi2000-10-211-4/+0
| | | | Notes: svn path=/head/; revision=67417