wizard.c (8576) | wizard.c (8641) |
---|---|
1/* 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 * | 1/* 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 * |
9 * $Id: wizard.c,v 1.2 1995/05/16 02:53:31 jkh Exp $ | 9 * $Id: wizard.c,v 1.3 1995/05/17 14:40:00 jkh Exp $ |
10 * 11 */ 12 13#include <stdio.h> 14#include <stdlib.h> 15#include <unistd.h> 16#include <fcntl.h> 17#include <string.h> --- 58 unchanged lines hidden (view full) --- 76 if (-1 == lseek(fd,block * 512,SEEK_SET)) 77 err(1,"lseek"); 78 if (512 != read(fd,foo, 512)) 79 return 1; 80 return 0; 81} 82 83void | 10 * 11 */ 12 13#include <stdio.h> 14#include <stdlib.h> 15#include <unistd.h> 16#include <fcntl.h> 17#include <string.h> --- 58 unchanged lines hidden (view full) --- 76 if (-1 == lseek(fd,block * 512,SEEK_SET)) 77 err(1,"lseek"); 78 if (512 != read(fd,foo, 512)) 79 return 1; 80 return 0; 81} 82 83void |
84Scan_Disk(struct disk *d) | 84Scan_Disk(Disk *d) |
85{ 86 char device[64]; 87 u_long l; 88 int i,j,fd; 89 90 strcpy(device,"/dev/r"); 91 strcat(device,d->name); 92 --- 17 unchanged lines hidden (view full) --- 110 } 111 i = j; 112 } 113 } 114 close(fd); 115} 116 117void | 85{ 86 char device[64]; 87 u_long l; 88 int i,j,fd; 89 90 strcpy(device,"/dev/r"); 91 strcat(device,d->name); 92 --- 17 unchanged lines hidden (view full) --- 110 } 111 i = j; 112 } 113 } 114 close(fd); 115} 116 117void |
118slice_wizard(struct disk *d) | 118slice_wizard(Disk *d) |
119{ | 119{ |
120 struct disk *db; | 120 Disk *db; |
121 char myprompt[BUFSIZ]; 122 char input[BUFSIZ]; 123 char *p,*q=0; 124 char **cp,*cmds[200]; 125 int ncmd,i; 126 127 sprintf(myprompt,"%s> ", d->name); 128 while(1) { --- 137 unchanged lines hidden --- | 121 char myprompt[BUFSIZ]; 122 char input[BUFSIZ]; 123 char *p,*q=0; 124 char **cp,*cmds[200]; 125 int ncmd,i; 126 127 sprintf(myprompt,"%s> ", d->name); 128 while(1) { --- 137 unchanged lines hidden --- |