summaryrefslogtreecommitdiffstats
path: root/lib/libdisk/disk.c
Commit message (Collapse)AuthorAgeFilesLines
* Modernize my email address.phk2002-03-251-1/+1
|
* Sort the disknames when we get them from the kernel.phk2001-12-231-10/+23
| | | | Submitted by: <anarcat@anarcat.dyndns.org>
* Add EFI GPT (238, 0xEE) and EFI System Parition (239, 0xEF)peter2001-10-151-0/+2
|
* Add __FBSDID()s to libdiskdillon2001-09-301-3/+3
|
* + add u_long sector_size to struct disk (documented in libdisk.3)jkh2001-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>
* Add spaces around operators.obrien2001-04-011-73/+74
| | | | | It's OK, the Project and afford them now -- they aren't as expensive as they used to be.
* Add back <err.h> for warn().obrien2001-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)
* Libraries should _never_ call exit() themselves (or its alternate spellingobrien2001-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
* MFS: add ATA raid support for sysinstalljkh2000-11-061-2/+2
|
* Use kern.disks sysctl on PC-98.nyan2000-10-211-4/+0
|
* Teach libdisk about 'aac'msmith2000-09-131-2/+2
|
* - Added support for installing boot0 and boot0.5 for PC-98.nyan2000-08-121-2/+55
| | | | - Cosmetic changes.
* - Fixed warnings and typo.nyan2000-08-081-1/+4
| | | | | | - Recognize slice type 0x24 as FAT (only PC-98). Submitted by: Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
* Don't use kern.disks sysctl on PC-98 because the wd driver doesn't callnyan2000-08-071-0/+4
| | | | disk_create() function.
* - Allow support for MBR boot loaders that are longer than one sector. Asjhb2000-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.
* _PATH_DEV'ify libdiskjhb2000-06-281-4/+5
|
* Let Disk_Names() take advantage of the kern.disks sysctl if it'snbm2000-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
* Re-support "wd" if PC98 is defined. Because PC-98 still uses the wd driver.nyan2000-06-051-0/+4
|
* /dev/rXXX -> /dev/XXXmsmith2000-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).
* De-support 'wd'; with it making a dual appearance with 'ad', thingsmsmith2000-05-301-1/+1
| | | | | depending on libdisk to detect a list of actually-there disk devices were providing duplicate entries (eg. sysinstall).
* Teach libdisk about 'twe' disks.msmith2000-05-251-1/+1
|
* catch up to the modern ATAPI disk naming conventions and add floppyjkh2000-05-241-1/+1
| | | | | | disks. Submitted by: bde
* Raw devices are now the normal device name, not prefixed with 'r'.obrien2000-04-191-1/+1
|
* Changes for PC-98.kato2000-03-291-0/+76
|
* Fix fd leak in libdisk's Disk_Names()imp2000-03-101-0/+4
|
* Correct device naming for IDA disk nodes (idad)jlemon2000-03-081-1/+1
|
* Remove 'sd' support. SCSI disks are known as 'da' these days.msmith1999-11-271-1/+1
|
* Teach libdisk about the AMI and Mylex RAID drivers. You should be ablemsmith1999-11-021-1/+1
| | | | to install directly to arrays managed by these controllers now.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Merge from -stable; support for the 'ida' driver, move fla to major 102msmith1999-07-051-2/+2
|
* Back out the last change to disk.c - a kernel change removed the need.dfr1999-05-091-2/+1
| | | | Enabled writing to the disklabel when writing a disk (only affects alpha).
* Make libdisk see the existing partitiions on the alpha.dfr1999-05-081-1/+2
|
* Clean up after another half-Danish.msmith1999-05-041-2/+2
| | | | Add 'ad' as another known disk driver of the same kind as 'wd'.
* More egcs warning fixes:imp1999-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
* More support for Alpha installs.jkh1999-01-291-1/+63
| | | | Submitted by: dfr
* Add "fla" to Disk_Names()phk1998-12-191-2/+2
|
* Teach libdisk about alpha boot blocks.dfr1998-10-061-1/+22
|
* Eliminate unaligned access on Alpha and also neaten up this code a little.jkh1998-09-301-5/+25
| | | | Submitted by: dfr
* Remove references to the "od" device.gibbs1998-09-151-2/+2
|
* Add new NetBSD FFS with FDISK partition ID 0xa9obrien1998-05-191-1/+2
| | | | Obtained from: Frank van der Linden <frank@wins.uva.nl>
* Change an arbitarly hardcoded `10' to MAX_NO_DISKS, which is currently "20".obrien1998-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.
* Add Compaq & SCO partition types.jkh1998-03-221-1/+3
| | | | | PR: 6092 Submitted by: Drew Derbyshire <ahd@kew.com>
* MF22: teach about LS-120 devices.jkh1998-03-201-2/+2
|
* Add more AIX/DOS/Win95 partition typesache1998-03-141-4/+12
|
* Add primary fat-32ache1998-03-071-1/+3
|
* Reconized OpenBSD partitions.obrien1998-03-051-1/+3
|
* Non-intrusive changes to support Justin's CAM stuff.jkh1998-01-161-2/+2
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Adds slice_type_name() which extends chunk_n[] for subtype's too.obrien1997-01-231-0/+37
| | | | Curorary review by: phk
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
OpenPOWER on IntegriCloud