From owner-freebsd-alpha Mon May 1 19:30:55 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id 99E5C37B82B for ; Mon, 1 May 2000 19:30:52 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (root@c06-106.006.popsite.net [64.24.38.106]) by relay.nuxi.com (8.9.3/8.9.3) with ESMTP id TAA78719; Mon, 1 May 2000 19:30:49 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.9.3/8.9.1) id TAA02854; Mon, 1 May 2000 19:30:53 -0700 (PDT) (envelope-from obrien) Date: Mon, 1 May 2000 19:30:52 -0700 From: "David O'Brien" To: nm , freebsd-alpha@FreeBSD.ORG Subject: (FWD) dd fix for Alpha Message-ID: <20000501193052.A2804@dragon.nuxi.com> Reply-To: obrien@NUXI.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-PGP-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Keyid: 34F9F9D5 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org ----- Forwarded message from Matthew Jacob ----- Date: Sun, 5 Dec 1999 15:19:18 -0800 (PST) From: Matthew Jacob > 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-alpha" in the body of the message