summaryrefslogtreecommitdiffstats
path: root/lib/libdisk/write_disk.c
Commit message (Collapse)AuthorAgeFilesLines
* Retire the bogus uses of the disklabel field d_sbsize and begin tophk2002-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.
* Modernize my email address.phk2002-03-251-1/+1
|
* Add __FBSDID()s to libdiskdillon2001-09-301-3/+3
|
* + add u_long sector_size to struct disk (documented in libdisk.3)jkh2001-05-131-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | + 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-39/+38
| | | | | It's OK, the Project and afford them now -- they aren't as expensive as they used to be.
* Try to untangle some of the #ifdef spaghetti.obrien2001-04-011-9/+9
| | | | | | 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.
* Quiet warnings on the Alpha.obrien2001-04-011-1/+4
|
* Libraries should _never_ call exit() themselves (or its alternate spellingobrien2001-03-181-1/+0
| | | | | | | | | | | `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
* Do install-time configuration of the i386 boot0 boot manager. Atrnordier2000-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
* - Added support for installing boot0 and boot0.5 for PC-98.nyan2000-08-121-0/+7
| | | | - Cosmetic changes.
* - Fixed warnings and typo.nyan2000-08-081-0/+2
| | | | | | - Recognize slice type 0x24 as FAT (only PC-98). Submitted by: Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
* - Allow support for MBR boot loaders that are longer than one sector. Asjhb2000-07-121-0/+3
| | | | | | 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-1/+2
|
* /dev/rXXX -> /dev/XXXmsmith2000-05-311-1/+1
| | | | | This should fix sysinstall and other tools that don't expect the 'r' devices to exist anymore (and thus don't create them).
* Changes for PC-98.kato2000-03-291-0/+85
|
* lowercase error messagecharnier2000-03-261-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Back out the last change to disk.c - a kernel change removed the need.dfr1999-05-091-1/+5
| | | | Enabled writing to the disklabel when writing a disk (only affects alpha).
* More support for Alpha installs.jkh1999-01-291-2/+10
| | | | Submitted by: dfr
* Changes for alpha support.jkh1999-01-081-1/+11
| | | | Submitted by: dfr
* Fixes for handling 'wfd' (and any other disk with a non-2-character name)msmith1998-10-271-3/+4
| | | | Submitted by: Some from Satoh Junichi (junichi@astec.co.jp)
* Teach libdisk about alpha boot blocks.dfr1998-10-061-1/+18
|
* Eliminate unaligned access on Alpha and also neaten up this code a little.jkh1998-09-301-3/+13
| | | | Submitted by: dfr
* Extend the existing hackery to set the disk type to SCSI for thejdp1998-06-271-2/+3
| | | | | "da" and "od" devices. Formerly ESDI was used for them, causing problems for fresh installations of CAM systems.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* 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.
* Improve the Dangerously Dedidcated mode a bit. Not much, but a bit better.phk1996-11-271-7/+1
|
* Move some warn()'s into DEBUG space since I don't need them comingjkh1996-04-291-1/+7
| | | | out in my curses interfaces and spamming my screen.
* Update the -current sources from the 2.1 branch.peter1995-12-071-3/+3
| | | | Approved (in spirit) by: jkh
* Brought in changes from rev 1.14.2.1 into main branch.dg1995-08-261-1/+10
|
* Merge RELENG_2_0_5 into HEADrgrimes1995-06-111-1/+7
|
* Remove trailing whitespace.rgrimes1995-05-301-9/+9
|
* Align slices to cylinder boundries.jkh1995-05-241-5/+4
| | | | Submitted By: phk
* Fix a typo, now there should always be an active slice.phk1995-05-211-2/+2
|
* Remove two printfs before Jordan has a fit over them.phk1995-05-181-4/+1
|
* Recognize slice type #6 as dosphk1995-05-081-3/+14
| | | | handle OnTrack Disk manager correctly.
* General sanitation and cleanup. Killed the "reserved" type, it wasn't.phk1995-05-061-3/+1
|
* Make the partitions names even more sensiblephk1995-05-041-1/+9
| | | | CheckRules sets the CHUNK_ALIGN & CHUNK_PAST_1024 flags.
* start CHS is 0xff,0xff,0xff if past 1024.phk1995-05-011-17/+12
| | | | | | end CHS is 1023,bios_hd,bios_sect if past 1024. This way we can find bios the geometry again. Added a primitive "scan" to tst01.
* Use the DIOCSYNCSLICE ioctl now. (use only with kernel from this morning).phk1995-04-301-28/+32
| | | | | Get the CHS's right. Get the disklabels (more) right.
* get bootblocks right.phk1995-04-301-2/+6
| | | | | | | Add mbr and bteasy17 to tst01 read partitions from kernel instead of disk. Still problems with writing labels, discussing with Bruce. Extended slices doesn't get written yet.
* Use 0xff for CHS when past 1024 cyls.phk1995-04-301-22/+34
| | | | Fix (hopefully) a bug Gary found.
* Now we do writes too.phk1995-04-301-1/+157
|
* Names are assigned when chunks are created.phk1995-04-291-0/+34
Rules for only one fat & one extended in MBR.
OpenPOWER on IntegriCloud