summaryrefslogtreecommitdiff
path: root/lib/libdisk/create_chunk.c
Commit message (Collapse)AuthorAgeFilesLines
* the 'd' partition hasn't been magic for years, so allocate it in naturalPoul-Henning Kamp2002-10-291-1/+1
| | | | | | | order instead of last. Notes: svn path=/head/; revision=106114
* More lobotomy:Poul-Henning Kamp2002-10-231-7/+2
| | | | | | | | | | remove CHUNK_BSD_COMPAT, it was a bad idea, and now its gone. remove DOSPTYP_ONTRACK, missed in OnTrack removal commit. unifdef -DHAVE_GEOM make tst01 compile again. Notes: svn path=/head/; revision=105821
* Remove the last traces of bogus MAKEDEV functionality.Poul-Henning Kamp2002-10-221-17/+0
| | | | Notes: svn path=/head/; revision=105707
* Avoid a lot of #ifdef PC98 code by giving a couple of the Chunk functionsPoul-Henning Kamp2002-10-221-12/+0
| | | | | | | an extra argument for all archs. Notes: svn path=/head/; revision=105685
* Swing the weed-whacker around libdisk:Poul-Henning Kamp2002-10-221-205/+5
| | | | | | | | | | | | Constify some things. Staticize some things. Remove some unused things. Prototype some things. Don't install a gazillion man-pages links. Drop support for ON-TRACK disk-manager. Notes: svn path=/head/; revision=105681
* Lobotomize MakeDev(), we don't need it with devfs.Poul-Henning Kamp2002-10-211-0/+2
| | | | Notes: svn path=/head/; revision=105662
* Fix to support pc98.Yoshihiro Takahashi2002-10-081-0/+4
| | | | 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
* 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
* Use correct printf format specifier to print unsigned longs.Garrett Wollman2002-05-301-1/+1
| | | | Notes: svn path=/head/; revision=97628
* Modernize my email address.Poul-Henning Kamp2002-03-251-1/+1
| | | | Notes: svn path=/head/; revision=93149
* 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
* 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
* Add __FBSDID()s to libdiskMatthew Dillon2001-09-301-3/+3
| | | | 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
* + add u_long sector_size to struct disk (documented in libdisk.3)Jordan K. Hubbard2001-05-131-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 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-35/+35
| | | | | | | | 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
* Try to untangle some of the #ifdef spaghetti.David E. O'Brien2001-04-011-3/+3
| | | | | | | | | 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
* Quiet warnings on the Alpha.David E. O'Brien2001-04-011-2/+7
| | | | Notes: svn path=/head/; revision=75065
* Libraries should _never_ call exit() themselves (or its alternate spellingDavid E. O'Brien2001-03-181-5/+4
| | | | | | | | | | | | | | `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-0/+2
| | | | Notes: svn path=/head/; revision=68409
* Teach libdisk about 'aac'Mike Smith2000-09-131-0/+2
| | | | Notes: svn path=/head/; revision=65801
* _PATH_DEV'ify libdiskJohn Baldwin2000-06-281-1/+2
| | | | Notes: svn path=/head/; revision=62223
* Re-support "wd" if PC98 is defined. Because PC-98 still uses the wd driver.Yoshihiro Takahashi2000-06-051-1/+5
| | | | Notes: svn path=/head/; revision=61279
* De-support 'wd'; with it making a dual appearance with 'ad', thingsMike Smith2000-05-301-3/+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
* fix stray 'i' from editor.Alfred Perlstein2000-05-251-1/+1
| | | | Notes: svn path=/head/; revision=60918
* Teach libdisk about 'twe' disks.Mike Smith2000-05-251-0/+2
| | | | Notes: svn path=/head/; revision=60908
* Changes for PC-98.KATO Takenori2000-03-291-0/+22
| | | | Notes: svn path=/head/; revision=58794
* Fix pointer addition bug (3 -> 4).Jonathan Lemon2000-03-091-1/+1
| | | | | | | Submitted by: david.w.james@bt.com Notes: svn path=/head/; revision=57856
* Correct device naming for IDA disk nodes (idad)Jonathan Lemon2000-03-081-1/+1
| | | | Notes: svn path=/head/; revision=57831
* Hide more debugging behind isDebug(); what's currentlyJordan K. Hubbard2000-02-181-2/+4
| | | | | | | spewing out will only alarm people. Notes: svn path=/head/; revision=57306
* Just on the off-chance that somebody might use libdisk in a totallyPoul-Henning Kamp1999-12-221-5/+11
| | | | | | | | | | | lobotomized environment, say booted from a floppy with no /etc full of password and group files, give sensible fallbacks for roots uid and operators gid. This might fix sysinstall. Notes: svn path=/head/; revision=55008
* Catch up to the fact that block devices are toast.Jordan K. Hubbard1999-12-151-12/+38
| | | | | | | | | | | Teach about the afd driver. Teach new char dev for ad driver. Make ownerships correct. Submitted by: jhb Notes: svn path=/head/; revision=54627
* Remove 'sd' support. SCSI disks are known as 'da' these days.Mike Smith1999-11-271-2/+0
| | | | Notes: svn path=/head/; revision=53784
* Remove BAD144 supportPoul-Henning Kamp1999-11-271-7/+0
| | | | Notes: svn path=/head/; revision=53749
* Teach libdisk about the AMI and Mylex RAID drivers. You should be ableMike Smith1999-11-021-0/+4
| | | | | | | 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/+4
| | | | Notes: svn path=/head/; revision=48585
* Fix my own Pie Floater.Mike Smith1999-05-121-2/+2
| | | | | | | (Correctly handle 'wd' devices) Notes: svn path=/head/; revision=47090
* Clean up after another half-Danish.Mike Smith1999-05-041-1/+3
| | | | | | | Add 'ad' as another known disk driver of the same kind as 'wd'. Notes: svn path=/head/; revision=46455
* Bring us one step closer to sysinstall'ing on a DOC2k device.Poul-Henning Kamp1999-01-141-1/+3
| | | | Notes: svn path=/head/; revision=42669
* Changes for alpha support.Jordan K. Hubbard1999-01-081-1/+10
| | | | | | | Submitted by: dfr Notes: svn path=/head/; revision=42387
* Fixes for handling 'wfd' (and any other disk with a non-2-character name)Mike Smith1998-10-271-6/+5
| | | | | | | Submitted by: Some from Satoh Junichi (junichi@astec.co.jp) Notes: svn path=/head/; revision=40676
* Remove references to the "od" device.Justin T. Gibbs1998-09-151-3/+1
| | | | Notes: svn path=/head/; revision=39252
* MF22: teach about LS-120 devices.Jordan K. Hubbard1998-03-201-1/+3
| | | | Notes: svn path=/head/; revision=34729
* Be more verbose if we can't determine device major/minor.Jordan K. Hubbard1998-02-101-1/+2
| | | | Notes: svn path=/head/; revision=33219
* Non-intrusive changes to support Justin's CAM stuff.Jordan K. Hubbard1998-01-161-1/+3
| | | | Notes: svn path=/head/; revision=32558
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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. Notes: svn path=/head/; revision=21673
* Close PR#2198:Jordan K. Hubbard1996-12-131-1/+3
| | | | | | | | | | | | | | | | I've added an installation from optical disk drive facility. This enables FreeBSD to be installed from an optical disk, which may be formatted in "super floppy" style or sliced into MSDOS-FS and UFS partitions. Note: ncr.c should be reviewed by Stefan Esser <se@freebsd.org> and cd.c by Joerg Wunsch <joerg@freebsd.org> before bringing this into 2.2. Submitted-By: Shunsuke Akiyama <akiyama@kme.mei.co.jp> Notes: svn path=/head/; revision=20390