home *** CD-ROM | disk | FTP | other *** search
- *** disks.c.orig Mon Jun 11 15:32:59 1990
- --- disks.c Tue Jun 12 19:04:05 1990
- ***************
- *** 15,20 ****
- --- 15,21 ----
- static struct nlist nlst[] = {
- #define X_DK_NDRIVE 0
- { "_dk_ndrive" },
- + #ifndef sun
- #define X_DK_MSPW 1
- { "_dk_mspw" },
- #ifdef vax
- ***************
- *** 23,36 ****
- #define X_UBDINIT (X_DK_MSPW+2)
- { "_ubdinit" },
- #endif
- - #ifdef sun
- - #define X_MBDINIT (X_DK_MSPW+1)
- - { "_mbdinit" },
- - #endif
- #ifdef tahoe
- #define X_VBDINIT (X_DK_MSPW+1)
- { "_vbdinit" },
- #endif
- { "" },
- };
-
- --- 24,39 ----
- #define X_UBDINIT (X_DK_MSPW+2)
- { "_ubdinit" },
- #endif
- #ifdef tahoe
- #define X_VBDINIT (X_DK_MSPW+1)
- { "_vbdinit" },
- #endif
- + #else /* is sun */
- + #define X_MBDINIT (X_DK_NDRIVE+1)
- + { "_mbdinit" },
- + #define X_DK_BPS (X_MBDINIT+1)
- + { "_dk_bps" },
- + #endif /* is sun */
- { "" },
- };
-
- ***************
- *** 40,45 ****
- --- 43,51 ----
- register char *cp;
- static int once = 0;
- static char buf[1024];
- + # ifdef sun
- + long *bps;
- + # endif
-
- if (once)
- return(1);
- ***************
- *** 54,61 ****
- --- 60,79 ----
- return(0);
- }
- dk_mspw = (float *)calloc(dk_ndrive, sizeof (float));
- + #ifdef sun
- + bps = (long *)calloc(dk_ndrive, sizeof (long));
- + lseek(kmem, nlst[X_DK_BPS].n_value, L_SET);
- + read(kmem, bps, dk_ndrive * sizeof (long));
- + for( i = 0; i < dk_ndrive; i++ )
- + if( bps[i] > 0 )
- + dk_mspw[i] = 1.0 / bps[i];
- + else
- + dk_mspw[i] = 0.0;
- + free( bps );
- + #else
- lseek(kmem, nlst[X_DK_MSPW].n_value, L_SET);
- read(kmem, dk_mspw, dk_ndrive * sizeof (float));
- + #endif
- dr_name = (char **)calloc(dk_ndrive, sizeof (char *));
- dk_select = (int *)calloc(dk_ndrive, sizeof (int));
- for (cp = buf, i = 0; i < dk_ndrive; i++) {
-