Add ioctl() in read_ether() so that pccardd ensure reading its ether

address from the attribute memory area.
This commit is contained in:
Mitsuru IWASAKI 2000-05-04 15:38:18 +00:00
parent 4f79a4117a
commit 10e6817efc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59958

View File

@ -318,7 +318,9 @@ static void
read_ether(struct slot *sp)
{
unsigned char net_addr[12];
int flags = MDF_ATTR; /* attribute memory */
ioctl(sp->fd, PIOCRWFLAG, &flags);
lseek(sp->fd, (off_t)sp->card->ether->value, SEEK_SET);
if (read(sp->fd, net_addr, sizeof(net_addr)) != sizeof(net_addr)) {
logerr("read err on net addr");