equal
deleted
inserted
replaced
47 |
47 |
48 static struct cd_header cd_header; |
48 static struct cd_header cd_header; |
49 |
49 |
50 static unsigned char virt_buffer[VIRT_HEADER_LEN]; |
50 static unsigned char virt_buffer[VIRT_HEADER_LEN]; |
51 struct virt_header *virt_header=(struct virt_header *)virt_buffer; |
51 struct virt_header *virt_header=(struct virt_header *)virt_buffer; |
52 int virtualMissing=0, virt_off=-1, virt_regular; |
52 int virtualMissing=0, virt_off=-1, virt_regular=0; |
53 char *real_virt_name=0; |
53 char *real_virt_name=0; |
54 |
54 |
55 extern int virtual; |
55 extern int virtual; |
56 extern int disknum; |
56 extern int disknum; |
57 extern char *virt_name, *cd_dev; |
57 extern char *virt_name, *cd_dev; |
65 if((fd=open64(cd_dev,O_RDONLY|O_NONBLOCK))<0) |
65 if((fd=open64(cd_dev,O_RDONLY|O_NONBLOCK))<0) |
66 error("Open failed (device)"); |
66 error("Open failed (device)"); |
67 } |
67 } |
68 else { |
68 else { |
69 free(real_virt_name); |
69 free(real_virt_name); |
70 if(disknum==1) { |
70 if(disknum==1 || !virt_regular) { |
71 real_virt_name=strdup(virt_name); |
71 real_virt_name=strdup(virt_name); |
72 } |
72 } |
73 else if(virt_off>0) { |
73 else if(virt_off>0) { |
74 char *strip=strdup(virt_name); |
74 char *strip=strdup(virt_name); |
75 char *dot=rindex(strip,'.'); |
75 char *dot=rindex(strip,'.'); |