aboutsummaryrefslogtreecommitdiff
path: root/lib/libdisk/libdisk.h
Commit message (Collapse)AuthorAgeFilesLines
* Since make release is toast anyway, add wood to the pyre:Poul-Henning Kamp2002-10-291-2/+48
| | | | | | | | | | | | | | | | | This significantly rewamps libdisks discovery of existing disk layout. Please send me reports if this does not work as expected on i386 or sparc64 platforms. I need to sort out alpha, pc98 and ia64 (in that order) before testing on those platforms make a lot of sense. Belived to work for: i386 sparc64 Unknown state: pc98 alpha ia64 Notes: svn path=/head/; revision=106135
* Add back ia64 support that was removed in the last few revisions.Peter Wemm2002-10-271-0/+4
| | | | | | | I've cloned write_ia64_disk.c from write_i386_disk.c. Notes: svn path=/head/; revision=106008
* More lobotomy:Poul-Henning Kamp2002-10-231-3/+0
| | | | | | | | | | 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
* Untangle #ifdefs in the write-end of things by giving each arch itsPoul-Henning Kamp2002-10-231-2/+3
| | | | | | | | | | own file and own copy of WriteDisk() to do things in. This should have happened years ago, instead of adding #ifdefs all over the place. Notes: svn path=/head/; revision=105816
* Remove the last traces of bogus MAKEDEV functionality.Poul-Henning Kamp2002-10-221-7/+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/+1
| | | | | | | an extra argument for all archs. Notes: svn path=/head/; revision=105685
* Swing the weed-whacker around libdisk:Poul-Henning Kamp2002-10-221-27/+11
| | | | | | | | | | | | 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
* Modernize my email address.Poul-Henning Kamp2002-03-251-1/+1
| | | | Notes: svn path=/head/; revision=93149
* Modify Delete_Chunk() into Delete_Chunk2() which can take a flagsMatthew Dillon2002-01-071-0/+9
| | | | | | | | | | 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
* Add auto-fill-on-delete. When deleting an 'A'uto created partitionMatthew Dillon2001-12-091-15/+25
| | | | | | | | | | | | | | | | | | | 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
* + add u_long sector_size to struct disk (documented in libdisk.3)Jordan K. Hubbard2001-05-131-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 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
* Correct a comment.David E. O'Brien2001-04-011-1/+1
| | | | Notes: svn path=/head/; revision=75068
* Libraries should _never_ call exit() themselves (or its alternate spellingDavid E. O'Brien2001-03-181-0/+8
| | | | | | | | | | | | | | `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
* Turn dkcksum() into an __inline function.Poul-Henning Kamp2000-09-161-1/+0
| | | | | | | Change its type to u_int_16_t. Notes: svn path=/head/; revision=65921
* - Added support for installing boot0 and boot0.5 for PC-98.Yoshihiro Takahashi2000-08-121-0/+13
| | | | | | | - Cosmetic changes. Notes: svn path=/head/; revision=64555
* - Allow support for MBR boot loaders that are longer than one sector. AsJohn Baldwin2000-07-121-6/+2
| | | | | | | | | 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
* Changes for PC-98.KATO Takenori2000-03-291-0/+12
| | | | Notes: svn path=/head/; revision=58794
* Remove BAD144 supportPoul-Henning Kamp1999-11-271-2/+0
| | | | Notes: svn path=/head/; revision=53749
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Eliminate all dependence on boot1 and boot2. This is passed in byJordan K. Hubbard1998-12-311-2/+1
| | | | | | | | | Set_Boot_Blocks() anyway and should thus have never been a part of libdisk, it should have been provided by the client of libdisk since passing the information in is already part of the API. Notes: svn path=/head/; revision=42187
* Teach libdisk about alpha boot blocks.Doug Rabson1998-10-061-1/+3
| | | | Notes: svn path=/head/; revision=40000
* Fixed #includes in the synopsis and in an example. <sys/socket.h>Bruce Evans1998-01-201-2/+2
| | | | | | | | | isn't a prerequisite, since it isn't required for the prototypes and isn't always needed to call the functions (the address family might be a variable). Notes: svn path=/head/; revision=32647
* Fixed this header to compile with gcc -pedantic -Werror (removed commaBruce Evans1997-03-191-2/+2
| | | | | | | at end of enum). Notes: svn path=/head/; revision=24014
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Adds slice_type_name() which extends chunk_n[] for subtype's too.David E. O'Brien1997-01-231-0/+5
| | | | | | | Curorary review by: phk Notes: svn path=/head/; revision=21958
* 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
* Improve the Dangerously Dedidcated mode a bit. Not much, but a bit better.Poul-Henning Kamp1996-11-271-15/+7
| | | | Notes: svn path=/head/; revision=19989
* Fix mis-declared static arrays that made sysinstall SEGV inJordan K. Hubbard1996-04-291-2/+2
| | | | | | | | | Set_Boot_Blocks(). Boy, this one had me tearing my hair out! I hate how the loader distinguishes between `extern char *foo' and `extern char foo[]' sometimes! :-) Notes: svn path=/head/; revision=15444
* Make libdisk C++ aware:Joerg Wunsch1996-03-241-108/+113
| | | | | | | | | | - add __BEGIN_DECLS and __END_DECLS, - add a bunch of ``const'' qualifiers all over the place, - rename the `private' struct member into `private_data' to avoid the clash with the C++ keyword. Notes: svn path=/head/; revision=14792
* Update the -current sources from the 2.1 branch.Peter Wemm1995-12-071-4/+13
| | | | | | | Approved (in spirit) by: jkh Notes: svn path=/head/; revision=12661
* Merge RELENG_2_0_5 into HEADRodney W. Grimes1995-06-111-1/+13
| | | | Notes: svn path=/head/; revision=9202
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-18/+18
| | | | Notes: svn path=/head/; revision=8881
* Remove Ontrack special from All_FreeBSD().Poul-Henning Kamp1995-05-251-1/+2
| | | | | | | Add chunk->disk pointer. Notes: svn path=/head/; revision=8745
* Added MakeDevDisk(struct disk*, char *path);Poul-Henning Kamp1995-05-121-1/+5
| | | | | | | fixed bug in extended slice naming. Notes: svn path=/head/; revision=8477
* Create_Chunk_DWIM() is here, though it doesn't quite do what the name implies.Poul-Henning Kamp1995-05-101-1/+8
| | | | Notes: svn path=/head/; revision=8404
* Recognize slice type #6 as dosPoul-Henning Kamp1995-05-081-3/+3
| | | | | | | handle OnTrack Disk manager correctly. Notes: svn path=/head/; revision=8346
* General sanitation and cleanup. Killed the "reserved" type, it wasn't.Poul-Henning Kamp1995-05-061-8/+12
| | | | Notes: svn path=/head/; revision=8303
* Make the partitions names even more sensiblePoul-Henning Kamp1995-05-041-5/+8
| | | | | | | CheckRules sets the CHUNK_ALIGN & CHUNK_PAST_1024 flags. Notes: svn path=/head/; revision=8264
* Add the private void *pointer to the chunks, and the functions to manage it.Poul-Henning Kamp1995-05-031-1/+14
| | | | | | | Make the reassignment of partition names less bogus. Notes: svn path=/head/; revision=8250
* Export the chunk names properly.Jordan K. Hubbard1995-05-031-3/+2
| | | | Notes: svn path=/head/; revision=8241
* Make the target for tst01 more sensible.Poul-Henning Kamp1995-05-031-1/+3
| | | | | | | | | | | | | | | | Remove bogus targets. Allocate partition letters as follows: lowest offset "flags & CHUNK_IS_ROOT" gets 'a', lowest offset "subtype==FS_SWAP" gets 'b' the rest is allocated in offset order from this sequence "defghab". This will generally make sense. Added rules to complain if more than one CHUNK_IS_ROOT or more than one FS_SWAP per FreeBSD chunk. Set CHUNK_IS_ROOT on the 'a' partition in Open_Disk. Run Fixup_Names in Open_Disk. Notes: svn path=/head/; revision=8233
* foo -> unknown.Jordan K. Hubbard1995-05-011-3/+3
| | | | | | | I have to be able to show this stuff to the user. :-) Notes: svn path=/head/; revision=8207
* get bootblocks right.Poul-Henning Kamp1995-04-301-1/+2
| | | | | | | | | | 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. Notes: svn path=/head/; revision=8183
* Now we do writes too.Poul-Henning Kamp1995-04-301-8/+38
| | | | Notes: svn path=/head/; revision=8178
* Names are assigned when chunks are created.Poul-Henning Kamp1995-04-291-1/+7
| | | | | | | Rules for only one fat & one extended in MBR. Notes: svn path=/head/; revision=8160
* Even More stuff. Disk_Names() is here amongst other things.Poul-Henning Kamp1995-04-291-3/+101
| | | | Notes: svn path=/head/; revision=8158
* Next Iteration, getting better.Poul-Henning Kamp1995-04-291-2/+7
| | | | | | | | | | | Made an All_FreeBSD() function. Added a cmd-line interface (lowest rank) to the tst01 program. The tst01 program is harmless (worst it can do is coredump), but it is instructive to run, you can see what the slice-code things of your disk... Notes: svn path=/head/; revision=8157
* Sanitize and explain a little bit... Implement the first rules...Poul-Henning Kamp1995-04-291-25/+80
| | | | Notes: svn path=/head/; revision=8156
* This is a revision 0.00 of the backend stuff for the fdisk/disklabel stuffPoul-Henning Kamp1995-04-281-0/+75
in the new sysinstall. If you want to give a helping hand, then send email to phk@FreeBSD.ORG. DO NOT COMMIT TO THIS DIRECTORY! Notes: svn path=/head/; revision=8153