From e9e6f3531d8fda314bec0215719c4cd5f7b9c364 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 9 Mar 2016 16:28:51 +0000 Subject: We are done providing support for the vax. lots of agreement. --- sbin/newfs/newfs.c | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'sbin/newfs') diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 5824728e4c9..b68d6b922db 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs.c,v 1.104 2015/12/06 11:56:47 tobias Exp $ */ +/* $OpenBSD: newfs.c,v 1.105 2016/03/09 16:28:47 deraadt Exp $ */ /* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */ /* @@ -620,44 +620,6 @@ rewritelabel(char *s, int fd, struct disklabel *lp) warn("ioctl (WDINFO)"); fatal("%s: can't rewrite disk label", s); } -#ifdef __vax__ - if (lp->d_type == DTYPE_SMD && lp->d_flags & D_BADSECT) { - int i; - int cfd; - u_int64_t alt; - char specname[64]; - char blk[1024]; - char *cp; - - /* - * Make name for 'c' partition. - */ - if (*s == '\0' || - strlcpy(specname, s, sizeof(specname)) >= sizeof(specname)) - fatal("%s: invalid partition name supplied", s); - cp = specname + strlen(specname) - 1; - if (!isdigit((unsigned char)*cp)) - *cp = 'c'; - cfd = open(specname, O_WRONLY); - if (cfd < 0) - fatal("%s: %s", specname, strerror(errno)); - memset(blk, 0, sizeof(blk)); - *(struct disklabel *)(blk + LABELOFFSET) = *lp; - alt = lp->d_ncylinders * lp->d_secpercyl - lp->d_nsectors; - for (i = 1; i < 11 && i < lp->d_nsectors; i += 2) { - off_t offset; - - offset = alt + i; - offset *= lp->d_secsize; - if (lseek(cfd, offset, SEEK_SET) == -1) - fatal("lseek to badsector area: %s", - strerror(errno)); - if (write(cfd, blk, lp->d_secsize) != lp->d_secsize) - warn("alternate label %d write", i/2); - } - close(cfd); - } -#endif /*__vax__*/ } void -- cgit v1.2.3