Commit Graph

23 Commits

Author SHA1 Message Date
Marcel Moolenaar
e01c6f329a Change <sys/diskpc98.h> to not redefine the same symbols that are
being defined in <sys/diskmbr.h>. Instead give the symbols here a
"PC98_" prefix. This way, both <sys/diskmbr.h> and <sys/diskpc98.h>
can be included in the same C source file.

The renaming is trivial. The only gotcha is that DOSBBSECTOR is
also redefined from 0 to 1. This because DOSBBSECTOR was always
used in conjunction with an addition of 1. The PC98_BBSECTOR symbol
is defined as 1 and the expression is simplified.

Note: it is not believed that ports are seriously impacted; or at
all for that matter.

Approved by: nyan@
2013-08-07 00:00:48 +00:00
Yoshihiro Takahashi
162784c969 Use the common PC98_SID_ACTIVE define instead of a local define. 2009-03-19 12:31:59 +00:00
Warner Losh
95f75d437b Because there are so many more partitions on pc98 than on wintel (16
vs 4), supress all unused partition output unless -v is specified.
This makes operating on a 'typical' disk with one partition less
painful.  The 30 lines needed for the empty partitions no longer
scroll the useful information off the screen.  When the user requests
a specific partition, the unused information is not suppressed.

Also add the partition name to the -s output.

Initialize the partition name to 'FreeBSD' when -I is specified.
2007-04-21 22:47:35 +00:00
Warner Losh
5d6b294513 Fixes and new features:
o Merge the -I switch from i386 verison to initialize the partition table
  to use the maximum amount possible for a single FreeBSD table.
o Improve warning when the geom method fails (which I think it
  always will until geom_pc98 is updated to respond to this ctl message)
o when writing out the boot sector, we have to write out a minimum of
  1024 bytes or the sector size.  This is different than the i386 case where
  we need to write out a minimum of 512 bytes (which is also the minimum
  sector size).  We already handle this difference on reading, but didn't
  in writing, so attempting to write a new partition table would fail.
o Add MID to the -s output, since pc98 users are likely interested in
  both of these parameters.

# I can now initialize disks on my pc98 machine either by -I or by
# manually entering the parameters.  I don't know if fdisk -B works or not,
# since I'm not willing to risk my only working boot disk to test it..
2006-02-26 07:37:10 +00:00
Yoshihiro Takahashi
a382309a4e Merged from src/sbin/fdisk/fdisk.c revision 1.81.
- Call gctl_free() to free resource allocated with gctl_get_handle().

MFC after:	3 days
2005-09-18 02:38:29 +00:00
Yoshihiro Takahashi
543f81fa1a Merged from src/sbin/fdisk.
- Attempt gctl verb "write MBR" when updating.
2005-07-15 15:31:19 +00:00
Yoshihiro Takahashi
cdb5312231 - Merged some missing changes from fdisk/fdisk.c.
- Remove ifdef PC98.
- Make WARN=4 clean.
2005-05-01 10:08:35 +00:00
Yoshihiro Takahashi
7422f40538 Merged more changes from fdisk/fdisk.c. 2005-05-01 05:04:05 +00:00
Yoshihiro Takahashi
cbf1a58f6c Merged from src/sbin/fdisk/fdisk.c revision 1.77. 2005-05-01 04:14:01 +00:00
Yoshihiro Takahashi
a7d53c9cae Merged from src/sbin/fdisk/fdisk.c revision 1.75.
(Don't prepend "/dev" if an argument given is an absolute pathname.)
2004-10-24 12:05:10 +00:00
Yoshihiro Takahashi
f67666fcb7 Oops, DIOCGPC98 should be DIOCSPC98. 2003-05-01 14:30:59 +00:00
Yoshihiro Takahashi
7513940d0f Merged from src/sbin/fdisk/fdisk.c revision 1.69. 2003-05-01 13:27:11 +00:00
Yoshihiro Takahashi
4a29c3a740 MFi386: Use DIOCGPC98 ioctl. 2003-02-11 07:32:45 +00:00
Yoshihiro Takahashi
404a379e4a Rename the dos_partition structure for pc98 to pc98_partition. 2003-01-04 08:50:48 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Yoshihiro Takahashi
5c4ff91fbb Merged various changes from src/sbin/fdisk/fdisk.c revisions up to 1.66. 2002-10-27 16:43:59 +00:00
Yoshihiro Takahashi
d3647c0221 Don't use DPCYL and DPSECT macros. These are not needed.
Submitted by:	kawanobe@st.rim.or.jp (Kawanobe Koh)
2002-10-07 10:04:07 +00:00
Yoshihiro Takahashi
bd8ab1f63e Include <sys/diskpc98.h> 2002-10-04 14:05:00 +00:00
Tom Rhodes
ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Warner Losh
5416b6f4dd Add missing \ before an 'n' to get the proper newline when running
fdisk -s for each partition.
2002-03-27 06:20:20 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Yoshihiro Takahashi
ff1c1afb9f Sync with sbin/i386/fdisk/fdisk.c revision 1.37.
(Don't try to open the /dev/rXXX device.)
2000-06-05 13:28:49 +00:00
KATO Takenori
8220dd2744 Added PC98 version of fdisk. 2000-03-18 16:48:41 +00:00