Module Name: src Committed By: dholland Date: Sun Jul 26 03:22:01 UTC 2009
Modified Files: src/sbin/clri: Makefile clri.c Log Message: Remove gross hack and attendant need for -fno-strict-aliasing. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sbin/clri/Makefile cvs rdiff -u -r1.21 -r1.22 src/sbin/clri/clri.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/clri/Makefile diff -u src/sbin/clri/Makefile:1.14 src/sbin/clri/Makefile:1.15 --- src/sbin/clri/Makefile:1.14 Fri Aug 29 00:02:23 2008 +++ src/sbin/clri/Makefile Sun Jul 26 03:22:01 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2008/08/29 00:02:23 gmcgarry Exp $ +# $NetBSD: Makefile,v 1.15 2009/07/26 03:22:01 dholland Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 .include <bsd.own.mk> @@ -9,7 +9,3 @@ .PATH: ${NETBSDSRCDIR}/sys/ufs/ffs .include <bsd.prog.mk> - -.if defined(HAVE_GCC) && ${HAVE_GCC} == 4 -COPTS.clri.c+= -fno-strict-aliasing -.endif Index: src/sbin/clri/clri.c diff -u src/sbin/clri/clri.c:1.21 src/sbin/clri/clri.c:1.22 --- src/sbin/clri/clri.c:1.21 Mon Mar 16 13:01:21 2009 +++ src/sbin/clri/clri.c Sun Jul 26 03:22:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: clri.c,v 1.21 2009/03/16 13:01:21 lukem Exp $ */ +/* $NetBSD: clri.c,v 1.22 2009/07/26 03:22:01 dholland Exp $ */ /* * Copyright (c) 1990, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)clri.c 8.3 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: clri.c,v 1.21 2009/03/16 13:01:21 lukem Exp $"); +__RCSID("$NetBSD: clri.c,v 1.22 2009/07/26 03:22:01 dholland Exp $"); #endif #endif /* not lint */ @@ -76,7 +76,7 @@ struct ufs1_dinode *ip1; struct ufs2_dinode *ip2; int fd; - char *ibuf[MAXBSIZE]; + void *ibuf; int32_t generation; off_t offset; size_t bsize; @@ -150,7 +150,12 @@ if (needswap) ffs_sb_swap(sbp, sbp); + bsize = sbp->fs_bsize; + ibuf = malloc(bsize); + if (ibuf == NULL) { + err(1, "malloc"); + } /* remaining arguments are inode numbers. */ while (*++argv) { @@ -193,6 +198,7 @@ err(1, "%s", fs); (void)fsync(fd); } + free(ibuf); (void)close(fd); exit(0); }