Commit Graph

156 Commits

Author SHA1 Message Date
Garrett Wollman
d7c98975c5 Use correct printf format specifier to print unsigned longs. 2002-05-30 21:00:42 +00:00
Ruslan Ermilov
ede5bec0ba NOSHARED is meaningless in the bsd.lib.mk context. 2002-05-13 12:00:45 +00:00
Poul-Henning Kamp
77068a7fe2 Retire the bogus uses of the disklabel field d_sbsize and begin to
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.
2002-05-12 20:49:41 +00:00
Poul-Henning Kamp
aaead0dfe9 Modernize my email address. 2002-03-25 13:52:45 +00:00
Matthew Dillon
d010343b82 Modify Delete_Chunk() into Delete_Chunk2() which can take a flags
argument.  Leave a compatibility shim for Delete_Chunk().

Implement DELCHUNK_RECOVER flag so sysinstall can ask libdisk
to recover space when deleting a chunk.
2002-01-07 07:47:25 +00:00
Poul-Henning Kamp
257bc17600 Sort the disknames when we get them from the kernel.
Submitted by:	<anarcat@anarcat.dyndns.org>
2001-12-23 21:43:48 +00:00
Matthew Dillon
173592263d Add auto-fill-on-delete. When deleting an 'A'uto created partition
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
2001-12-09 23:40:02 +00:00
Makoto Matsushita
94eacee1fc One more fix for sysinstall/libdisk to create a device file
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
2001-11-11 12:16:50 +00:00
Peter Wemm
febd72f843 Add EFI GPT (238, 0xEE) and EFI System Parition (239, 0xEF) 2001-10-15 07:25:29 +00:00
Jordan K. Hubbard
ac68d688b1 Check to see if the devfs MIB exists and return 1 if it exists rather
than making device node(s).
Submitted by:	Hiroo ONO <hiroo@oikumene.gcd.org>
2001-10-10 07:46:04 +00:00
Bruce Evans
1457ddda12 Fixed bitrot in synopsis. The change of the return type of
Set_Boot_Blocks() from void to int had not reached here.  Callers
still don't check the new return value.
2001-10-03 03:49:48 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Matthew Dillon
96be23e0be Add __FBSDID()s to libdisk 2001-09-30 21:16:57 +00:00
Kris Kennaway
6dac8ac9e5 Mark some functions as __printflike() and/or taking const char * arguments
instead of char *.

MFC after:	2 weeks
2001-08-20 12:53:36 +00:00
Ruslan Ermilov
753d686d34 mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
Ruslan Ermilov
57e4378bf6 mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Jordan K. Hubbard
96e426f43d + add u_long sector_size to struct disk (documented in libdisk.3)
+ 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>
2001-05-13 20:08:54 +00:00
David E. O'Brien
e32cb81d24 Add spaces around operators.
It's OK, the Project and afford them now -- they aren't as expensive as
they used to be.
2001-04-01 12:18:20 +00:00
David E. O'Brien
5e734d413c Correct a comment. 2001-04-01 11:44:12 +00:00
David E. O'Brien
8c32a31fd2 Try to untangle some of the #ifdef spaghetti.
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.
2001-04-01 11:37:31 +00:00
David E. O'Brien
ad6d7cd03f Add back <err.h> for warn().
(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)
2001-04-01 11:32:56 +00:00
David E. O'Brien
656533ef4d Quiet warnings on the Alpha. 2001-04-01 11:22:40 +00:00
David E. O'Brien
a11b77ba78 Add back <err.h> for warn().
(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)
2001-04-01 10:44:52 +00:00
Ruslan Ermilov
4a558355e5 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
David E. O'Brien
135c56336a Libraries should _never_ call exit() themselves (or its alternate spelling
`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
2001-03-18 21:30:11 +00:00
Bruce Evans
c38fecdd5c Fixed bitrot in prototype(s) in synopsis. 2001-02-05 23:56:05 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ruslan Ermilov
4263595653 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
Robert Nordier
f0da1b03a0 Do install-time configuration of the i386 boot0 boot manager. At
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
2000-12-12 17:25:06 +00:00
Ruslan Ermilov
725ab6287f log 2000-11-22 09:23:54 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Jordan K. Hubbard
5e25dc0f5c MFS: add ATA raid support for sysinstall 2000-11-06 23:15:01 +00:00
Yoshihiro Takahashi
e30bdf6ba1 Use kern.disks sysctl on PC-98. 2000-10-21 10:08:57 +00:00
Poul-Henning Kamp
fc87418be0 Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
2000-09-16 13:43:00 +00:00
Mike Smith
53ea88cdd1 Teach libdisk about 'aac' 2000-09-13 05:04:48 +00:00
Yoshihiro Takahashi
552112cadd - Added support for installing boot0 and boot0.5 for PC-98.
- Cosmetic changes.
2000-08-12 14:20:31 +00:00
Yoshihiro Takahashi
9ede9bda28 - Fixed warnings and typo.
- Recognize slice type 0x24 as FAT (only PC-98).

Submitted by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
2000-08-08 04:01:51 +00:00
Yoshihiro Takahashi
ce7ca0624c Don't use kern.disks sysctl on PC-98 because the wd driver doesn't call
disk_create() function.
2000-08-07 02:14:44 +00:00
John Baldwin
be0fdc4646 - Allow support for MBR boot loaders that are longer than one sector. As
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.
2000-07-12 18:05:18 +00:00
Kris Kennaway
c2616fc538 Don't call printf without a format string. 2000-07-11 23:49:24 +00:00
John Baldwin
61e9944f4f _PATH_DEV'ify libdisk 2000-06-28 22:28:50 +00:00
Neil Blakey-Milner
0138fc17c5 Let Disk_Names() take advantage of the kern.disks sysctl if it's
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
2000-06-23 14:01:06 +00:00
Yoshihiro Takahashi
88916759e4 Re-support "wd" if PC98 is defined. Because PC-98 still uses the wd driver. 2000-06-05 13:33:39 +00:00
Mike Smith
ad3a8d908d /dev/rXXX -> /dev/XXX
This should fix sysinstall and other tools that don't expect the 'r' devices
to exist anymore (and thus don't create them).
2000-05-31 00:51:57 +00:00
Mike Smith
6311733944 De-support 'wd'; with it making a dual appearance with 'ad', things
depending on libdisk to detect a list of actually-there disk devices
were providing duplicate entries (eg. sysinstall).
2000-05-30 15:18:30 +00:00
Alfred Perlstein
7009672a8a fix stray 'i' from editor. 2000-05-25 08:24:38 +00:00
Mike Smith
880479f425 Teach libdisk about 'twe' disks. 2000-05-25 02:23:47 +00:00
Jordan K. Hubbard
9b5b02c405 catch up to the modern ATAPI disk naming conventions and add floppy
disks.

Submitted by:	bde
2000-05-24 20:25:42 +00:00