From owner-freebsd-current Sun Dec 5 15:18: 1 1999 Delivered-To: freebsd-current@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id EC0D914CA4; Sun, 5 Dec 1999 15:17:59 -0800 (PST) (envelope-from mjacob@feral.com) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.8.7/8.8.7) with ESMTP id PAA15084; Sun, 5 Dec 1999 15:19:18 -0800 Date: Sun, 5 Dec 1999 15:19:18 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: "David O'Brien" Cc: Bruce Evans , current@FreeBSD.ORG Subject: oh, btw... In-Reply-To: <19991205150321.B74087@dragon.nuxi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > How do we fix this problem? I keeps from from > ``dd if=/dev/da1 of=/dev/da2'' ?? I was very peeved at having to put the > disks on a Solaris box to do such a normal Unix task. this will fix your dd Index: dd.c =================================================================== RCS file: /home/ncvs/src/bin/dd/dd.c,v retrieving revision 1.27 diff -u -r1.27 dd.c --- dd.c 1999/10/03 18:49:51 1.27 +++ dd.c 1999/12/05 23:17:16 @@ -216,6 +216,16 @@ if (ioctl(io->fd, FIODTYPE, &type) == -1) { err(1, "%s", io->name); } else { +if (type & D_DISK) { +static int one = 1; +#ifndef DIOCWLABEL +#define DIOCWLABEL _IOW('d', 109, int) +#endif +fprintf(stderr, "is a disk\n"); +if (ioctl(io->fd, DIOCWLABEL, &one) < 0) { +perror("DIOCWLABEL"); +} +} if (type & D_TAPE) io->flags |= ISTAPE; else if (type & (D_DISK | D_MEM)) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message