From the submitter:

Sun format is a util for formatting/partitioning/analysis/repairing of SCSI
disks. While formatting and partitioning currently is only usefule on big-
endian systems in order to create Sun disk labels, analysis and repairing
works on either endian and are very useful to remap defect blocks when
AWRE/ARRE fail for some reason. Tested on i386 and sparc64, respawned a
disk here.

Submitted by:	marius@alchemy.franken.de
This commit is contained in:
Alexander Leidinger 2003-01-02 15:07:43 +00:00
parent 5c160ac5bd
commit 772906abd2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=72211
11 changed files with 152 additions and 0 deletions

View file

@ -203,6 +203,7 @@
SUBDIR += service-config
SUBDIR += setcdboot
SUBDIR += setquota
SUBDIR += sformat
SUBDIR += shlock
SUBDIR += sjog
SUBDIR += skill

42
sysutils/sformat/Makefile Normal file
View file

@ -0,0 +1,42 @@
# New ports collection makefile for: sformat
# Date created: 16 December 2002
# Whom: marius@alchemy.franken.de
#
# $FreeBSD$
#
PORTNAME= sformat
PORTVERSION= 3.5
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.zeist.de/pub/distfiles/ \
ftp://ftp.berlios.de/pub/sformat/
MAINTAINER= marius@alchemy.franken.de
USE_GMAKE= yes
USE_REINPLACE= yes
MAN1= sformat.1
MAKE_ENV= COPTX="-DBSD_SCSI_SENSE_BUG"
post-extract:
.if ${MACHINE_ARCH} != "i386"
@${LN} -s ${WRKSRC}/RULES/i386-freebsd-cc.rul \
${WRKSRC}/RULES/${MACHINE_ARCH}-freebsd-cc.rul
.endif
post-patch:
.for i in datio.c sformat.1
@${REINPLACE_CMD} -i "" -e 's:%%DATADIR%%:${DATADIR}:g;' \
${WRKSRC}/sformat/${i}
.endfor
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/sformat/OBJ/${ARCH}-freebsd-cc/sformat \
${PREFIX}/bin
@${MKDIR} ${DATADIR}
@${INSTALL_DATA} ${WRKSRC}/sformat/sformat.dat ${DATADIR}
@${INSTALL_MAN} ${WRKSRC}/sformat/sformat.1 ${PREFIX}/man/man1
.include <bsd.port.mk>

View file

@ -0,0 +1 @@
MD5 (sformat-3.5.tar.gz) = 10317f96dfd5262a7813350034131695

View file

@ -0,0 +1,31 @@
--- RULES/i386-freebsd-cc.rul.orig Tue Oct 15 22:43:39 2002
+++ RULES/i386-freebsd-cc.rul Sun Oct 27 19:59:00 2002
@@ -24,7 +24,8 @@
###########################################################################
CPPFLAGS= $(CPPOPTS) $(CPPOPTX)
-CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(COPTX)
+XCFLAGS:= $(CFLAGS)
+CFLAGS= $(COPTS) $(CWARNOPTS) $(XCFLAGS) $(COPTX)
CPPOPTS= -I. -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(OSDEFS)
COPTS=
@@ -57,14 +58,13 @@
FLOAT_OPTIONS=
-CC= @echo " ==> COMPILING \"$@\""; gcc
-LDCC= @echo " ==> LINKING \"$@\""; gcc
-DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc
-RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib
+LDCC= $(CC)
+DYNLD= $(CC)
+RANLIB= ranlib
ARFLAGS= cr
LORDER= lorder
TSORT= tsort
RMDEP= :
-MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc -M
+MKDEP= $(CC) -M
MKDEP_OUT=

View file

@ -0,0 +1,9 @@
--- TARGETS/Targetdirs.orig Mon Dec 16 15:33:41 2002
+++ TARGETS/Targetdirs Mon Dec 16 15:34:30 2002
@@ -1,5 +1,4 @@
#ident %W% %E% %Q%
###########################################################################
-DIRS= patches conf inc lib libdeflt libscg librscg \
- sformat rscsi man
+DIRS= conf inc lib libscg sformat
###########################################################################

View file

@ -0,0 +1,15 @@
--- sformat/datio.c.orig Mon Dec 16 16:04:37 2002
+++ sformat/datio.c Mon Dec 16 16:05:11 2002
@@ -81,11 +81,7 @@
char *datpath[] = {
"",
- "/opt/schily/etc/",
- "/usr/bert/etc/",
- "/etc/",
- "/usr/etc/",
- "/opt/schily/etc/",
+ "%%DATADIR%%/",
NULL
};

View file

@ -0,0 +1,11 @@
--- sformat/fmt.c.orig Mon Dec 16 16:26:00 2002
+++ sformat/fmt.c Mon Dec 16 16:27:51 2002
@@ -482,7 +482,7 @@
}
printf("sformat SCSI format/analysis/repair utilities\n");
- printf("Release 3.4, Copyright J. Schilling\n\n");
+ printf("Release %s, Copyright J. Schilling\n\n", fmt_version);
if (!datfile_chk) {
if (datfile_present)

View file

@ -0,0 +1,11 @@
--- sformat/sformat.1.orig Mon Dec 16 19:18:21 2002
+++ sformat/sformat.1 Mon Dec 16 19:20:33 2002
@@ -143,7 +143,7 @@
.B sformat
looks in the following path:
.br
-.I /opt schily/etc, /etc, /usr/etc.
+.I %%DATADIR%%.
.TP
.BI debug= "#, " -d
Set the misc debug value to # (with debug=#) or increment

View file

@ -0,0 +1 @@
Allows formatting/partitioning/analysis/repairing of SCSI disks

View file

@ -0,0 +1,27 @@
The main advantages to the Sun format utility are:
- Working surface analyze that will detect defective blocks that are going
to get bad.
- Analyzing program that detects defective bearings in the disk (-randrw).
- Will repair nearly any defective disk, that has no firmware bug or electric
defect.
- Allows to clear the grown defect list if a disk.
- Disk geometry and label geometry are separated.
- Allows cheating in the label geometry to deal with the problems with the
limitation to 16 bit data types in the Sun disk label.
- Large database of disks including firmware specials.
- You need no desk calculator to generate a partition table.
Shorthands for:
- MBytes
- cylinders/head/sectors
- size partition to end on end of disk
- partition following another partition
- partition ending before another partition
- shifting partition on the disk (allows growing part 0 and shrinking part 1)
- Partition consistency checker with (ascii) graphical display.
- Mode page interpreter allows to set easily all mode pages you will ever find
in a manual, sformat needs not to know about them.
NOTE: Sformat has its full functionality on SunOS/Solaris on sparc
and Motorola systems, on all other systems sformat will create
Sun disk labels with wrong byte-order, but formatting/analysis/
repair will work.

View file

@ -0,0 +1,3 @@
bin/sformat
share/sformat/sformat.dat
@dirrm share/sformat