tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SCSI/EIDE
@ 2001-07-27 10:27 J.A. Gutierrez
  0 siblings, 0 replies; only message in thread
From: J.A. Gutierrez @ 2001-07-27 10:27 UTC (permalink / raw)
  To: tru64-unix-managers


	Hello


	I have a DS10 (COMPAQ AlphaServer DS10 466 MHz DEC6600)
	which should have SCSI disks:

    Run on Thu May 17 10:40:30 MEST 2001 Script sys_check Version: 114.0
  13:      connection pci0slot13
  33:        ide_adapter ata0
  34:          scsi_bus scsi0
  37:            disk bus-0-targ-0-lun-0 dsk0


	But while I was working on a "prtoc" program I found
	label->d_type is EIDE instead of SCSI:

# ./prtoc /dev/rdisk/dsk0c
280     sizeof(*label)
0x82564557      d_magic (should be 0x82564557)
9       type (EIDE)

	
	where 

- prtoc.c -----------------------------------------------------------------
#include <stdio.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#define DKTYPENAMES
#define STANDALONE

#include <sys/param.h>
#include <sys/disklabel.h>

main(int argc, char ** argv)
{
	int disk;

	struct fs		*ufs;
	unsigned char	b[DEV_BSIZE];
	struct disklabel		*label;
	short				i;
	unsigned short		sum, *word;


	if ( -1 == ( disk = open( argv[1], O_RDONLY )))
	{
		perror(argv[1]);
		exit(1);
	}
	else
	{

		fprintf(stdout,"%d\tsizeof(*label)\n",sizeof(*label));
		for (i=0; i<=LABELSECTOR; i++)
		{
		if ( sizeof(b) != read( disk, &b[0], sizeof(b) ))
			perror("read label");
		}
		close(disk);

		label=(struct disklabel *)(&b[LABELOFFSET]);


		fprintf(stdout,"0x%X\td_magic (should be 0x%X)\n",label->d_magic,DISKMAGIC);
		fprintf(stdout,"%u\ttype (%s)\n",label->d_type,dktypenames[label->d_type]);

	}
	exit ( 0 );
}
---------------------------------------------------------------------------



-- 
finger spd@gtc1.cps.unizar.es for PGP       /              So be easy and free
.mailcap tip of the day:                   /      when you're drinking with me
application/ms-tnef; cat '%s' > /dev/null / I'm a man you don't meet every day
text/x-vcard; cat '%s' > /dev/null       /            (the pogues)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-27 10:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-27 10:27 SCSI/EIDE J.A. Gutierrez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox