aboutsummaryrefslogtreecommitdiff
path: root/lib/libdisk/disk.c
Commit message (Collapse)AuthorAgeFilesLines
...
* correct arg order to strlcpy/strlcat under #ifdef alphaSam Leffler2002-10-171-2/+2
| | | | Notes: svn path=/head/; revision=105348
* 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-081-0/+4
| | | | Notes: svn path=/head/; revision=104674
* Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:Poul-Henning Kamp2002-10-011-0/+1
| | | | | | | | | | | | | | | | | | | 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
* Modernize my email address.Poul-Henning Kamp2002-03-251-1/+1
| | | | Notes: svn path=/head/; revision=93149
* 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 EFI GPT (238, 0xEE) and EFI System Parition (239, 0xEF)Peter Wemm2001-10-151-0/+2
| | | | Notes: svn path=/head/; revision=84965
* Add __FBSDID()s to libdiskMatthew Dillon2001-09-301-3/+3
| | | | Notes: svn path=/head/; revision=84200
* + add u_long sector_size to struct disk (documented in libdisk.3)Jordan K. Hubbard2001-05-131-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 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-011-73/+74
| | | | | | | | 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
* 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
* Libraries should _never_ call exit() themselves (or its alternate spellingDavid E. O'Brien2001-03-181-10/+9
| | | | | | | | | | | | | | `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
* MFS: add ATA raid support for sysinstallJordan K. Hubbard2000-11-061-2/+2
| | | | 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
* Teach libdisk about 'aac'Mike Smith2000-09-131-2/+2
| | | | Notes: svn path=/head/; revision=65801
* - Added support for installing boot0 and boot0.5 for PC-98.Yoshihiro Takahashi2000-08-121-2/+55
| | | | | | | - Cosmetic changes. Notes: svn path=/head/; revision=64555
* - Fixed warnings and typo.Yoshihiro Takahashi2000-08-081-1/+4
| | | | | | | | | - Recognize slice type 0x24 as FAT (only PC-98). Submitted by: Nobuyuki Koganemaru <kogane@koganemaru.co.jp> Notes: svn path=/head/; revision=64379
* Don't use kern.disks sysctl on PC-98 because the wd driver doesn't callYoshihiro Takahashi2000-08-071-0/+4
| | | | | | | disk_create() function. Notes: svn path=/head/; revision=64324
* - Allow support for MBR boot loaders that are longer than one sector. AsJohn Baldwin2000-07-121-9/+10
| | | | | | | | | with fdisk, ensure that they are a multiple of the sector size in length. - Axe all the 1024 cylinder checks as they are no longer relevant with the fixed bootstrap. Notes: svn path=/head/; revision=63030
* _PATH_DEV'ify libdiskJohn Baldwin2000-06-281-4/+5
| | | | Notes: svn path=/head/; revision=62223
* Let Disk_Names() take advantage of the kern.disks sysctl if it'sNeil Blakey-Milner2000-06-231-0/+15
| | | | | | | | | | | | available. If not, it falls back to the existing hack and slash method. A positive side effect is that non-root users may now use Disk_Names(), for non-dangerous libh/disk.tcl testing. Reviewed by: phk Notes: svn path=/head/; revision=62008
* Re-support "wd" if PC98 is defined. Because PC-98 still uses the wd driver.Yoshihiro Takahashi2000-06-051-0/+4
| | | | Notes: svn path=/head/; revision=61279
* /dev/rXXX -> /dev/XXXMike Smith2000-05-311-3/+3
| | | | | | | | This should fix sysinstall and other tools that don't expect the 'r' devices to exist anymore (and thus don't create them). Notes: svn path=/head/; revision=61101
* De-support 'wd'; with it making a dual appearance with 'ad', thingsMike Smith2000-05-301-1/+1
| | | | | | | | depending on libdisk to detect a list of actually-there disk devices were providing duplicate entries (eg. sysinstall). Notes: svn path=/head/; revision=61093
* Teach libdisk about 'twe' disks.Mike Smith2000-05-251-1/+1
| | | | Notes: svn path=/head/; revision=60908
* catch up to the modern ATAPI disk naming conventions and add floppyJordan K. Hubbard2000-05-241-1/+1
| | | | | | | | | disks. Submitted by: bde Notes: svn path=/head/; revision=60886
* Raw devices are now the normal device name, not prefixed with 'r'.David E. O'Brien2000-04-191-1/+1
| | | | Notes: svn path=/head/; revision=59399
* Changes for PC-98.KATO Takenori2000-03-291-0/+76
| | | | Notes: svn path=/head/; revision=58794
* Fix fd leak in libdisk's Disk_Names()Warner Losh2000-03-101-0/+4
| | | | Notes: svn path=/head/; revision=57898
* Correct device naming for IDA disk nodes (idad)Jonathan Lemon2000-03-081-1/+1
| | | | Notes: svn path=/head/; revision=57831
* Remove 'sd' support. SCSI disks are known as 'da' these days.Mike Smith1999-11-271-1/+1
| | | | Notes: svn path=/head/; revision=53784
* Teach libdisk about the AMI and Mylex RAID drivers. You should be ableMike Smith1999-11-021-1/+1
| | | | | | | to install directly to arrays managed by these controllers now. Notes: svn path=/head/; revision=52786
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Merge from -stable; support for the 'ida' driver, move fla to major 102Mike Smith1999-07-051-2/+2
| | | | Notes: svn path=/head/; revision=48585
* Back out the last change to disk.c - a kernel change removed the need.Doug Rabson1999-05-091-2/+1
| | | | | | | Enabled writing to the disklabel when writing a disk (only affects alpha). Notes: svn path=/head/; revision=46787
* Make libdisk see the existing partitiions on the alpha.Doug Rabson1999-05-081-1/+2
| | | | Notes: svn path=/head/; revision=46731
* Clean up after another half-Danish.Mike Smith1999-05-041-2/+2
| | | | | | | Add 'ad' as another known disk driver of the same kind as 'wd'. Notes: svn path=/head/; revision=46455
* More egcs warning fixes:Warner Losh1999-04-251-11/+1
| | | | | | | | | | | | | o use braces to avoid potentially ambiguous else o don't default to type int (and also remove a useless register modifier). o Use parens around assignment values used as truth values. o Remove unused function. Reviewed by: obrien and chuckr Notes: svn path=/head/; revision=46079
* More support for Alpha installs.Jordan K. Hubbard1999-01-291-1/+63
| | | | | | | Submitted by: dfr Notes: svn path=/head/; revision=43393
* Add "fla" to Disk_Names()Poul-Henning Kamp1998-12-191-2/+2
| | | | Notes: svn path=/head/; revision=41941
* Teach libdisk about alpha boot blocks.Doug Rabson1998-10-061-1/+22
| | | | Notes: svn path=/head/; revision=40000
* Eliminate unaligned access on Alpha and also neaten up this code a little.Jordan K. Hubbard1998-09-301-5/+25
| | | | | | | Submitted by: dfr Notes: svn path=/head/; revision=39844
* Remove references to the "od" device.Justin T. Gibbs1998-09-151-2/+2
| | | | Notes: svn path=/head/; revision=39252
* Add new NetBSD FFS with FDISK partition ID 0xa9David E. O'Brien1998-05-191-1/+2
| | | | | | | Obtained from: Frank van der Linden <frank@wins.uva.nl> Notes: svn path=/head/; revision=36182
* Change an arbitarly hardcoded `10' to MAX_NO_DISKS, which is currently "20".David E. O'Brien1998-05-151-2/+2
| | | | | | | | Otherwise can't see sd10 (obtained using wired down sd unit numbers), reguardless of the number of actual disks you have. Notes: svn path=/head/; revision=36081
* Add Compaq & SCO partition types.Jordan K. Hubbard1998-03-221-1/+3
| | | | | | | | PR: 6092 Submitted by: Drew Derbyshire <ahd@kew.com> Notes: svn path=/head/; revision=34776
* MF22: teach about LS-120 devices.Jordan K. Hubbard1998-03-201-2/+2
| | | | Notes: svn path=/head/; revision=34729
* Add more AIX/DOS/Win95 partition typesAndrey A. Chernov1998-03-141-4/+12
| | | | Notes: svn path=/head/; revision=34579
* Add primary fat-32Andrey A. Chernov1998-03-071-1/+3
| | | | Notes: svn path=/head/; revision=34148