Hi,
I debugged some more, trying to figure out why I could not
add a new partition to my disk using /usr/sbin/sysinstall
on -CURRENT.
I tracked the problem down to these lines in libdisk's write_i386_disk.c:
98 strcpy(device, _PATH_DEV);
99 strcat(device, d1->name);
100
101 fd = open(device, O_RDWR);
102 if (fd < 0)
103 return 1;
According to the debugger, device == "/dev/ad0"
I wrote the attached program to open "/dev/ad0".
It consistently fails with:
fd: -1
Error: : Operation not permitted
If I change the program to open one of my SCSI disks, "/dev/da0", it
does not fail:
fd: 3
Any ideas what the problem could be?
Thanks.
--
Craig Rodrigues
http://www.gis.net/~craigr
[EMAIL PROTECTED]
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
int
main(int argc, char *argv[])
{
int fd;
fd = open("/dev/da0", O_RDWR);
printf("fd: %d\n", fd);
if(fd < 0 ) {
perror("Error: ");
}
else {
close(fd);
}
return 0;
}