OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [jtag.c] - Diff between revs 603 and 1330

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 603 Rev 1330
Line 938... Line 938...
      strcat(sTemp,sTemp2);
      strcat(sTemp,sTemp2);
      error(sTemp);
      error(sTemp);
      return 0;
      return 0;
    }
    }
 
 
  if(fcntl(sock,F_GETFL,&flags) < 0)
  if(flags = fcntl(sock,F_GETFL,0) < 0)
    {
    {
      sprintf(sTemp,"Unable to get flags for JTAG proxy socket %d",sock);
      sprintf(sTemp,"Unable to get flags for JTAG proxy socket %d",sock);
      error(sTemp);
      error(sTemp);
      close(sock);
      close(sock);
      return 0;
      return 0;
    }
    }
 
 
  if(fcntl(sock,F_SETFL, flags & ~O_NONBLOCK) < 0)
  if(fcntl(sock,F_SETFL, flags & ~O_NONBLOCK) < 0)
    {
    {
      sprintf(sTemp,"Unable to set flags for JTAG proxy socket %d to value 0x%08x",
      sprintf(sTemp,"Unable to set flags for JTAG proxy socket %d to value 0x%08x",
              sock,flags | O_NONBLOCK);
              sock,flags & ~O_NONBLOCK);
 
      perror("fcntl ~O_NONBLOCK");
      error(sTemp);
      error(sTemp);
      close(sock);
      close(sock);
      return 0;
      return 0;
    }
    }
 
 
Line 976... Line 977...
 
 
  if(fcntl(sock,F_SETFL, flags | O_NONBLOCK) < 0)
  if(fcntl(sock,F_SETFL, flags | O_NONBLOCK) < 0)
    {
    {
      sprintf(sTemp,"Unable to set flags for JTAG proxy socket %d to value 0x%08x",
      sprintf(sTemp,"Unable to set flags for JTAG proxy socket %d to value 0x%08x",
              sock,flags | O_NONBLOCK);
              sock,flags | O_NONBLOCK);
 
      perror("fcntl | O_NONBLOCK");
      error(sTemp);
      error(sTemp);
      close(sock);
      close(sock);
      return 0;
      return 0;
    }
    }
 
 
Line 1117... Line 1119...
 
 
  linger.l_onoff = 0;
  linger.l_onoff = 0;
  linger.l_linger = 0;
  linger.l_linger = 0;
 
 
  /* First, make sure we're non blocking */
  /* First, make sure we're non blocking */
  if(fcntl(fd,F_GETFL,&flags) < 0)
  if(flags = fcntl(fd,F_GETFL,0) < 0)
    {
    {
      sprintf(sTemp,"Unable to get flags for JTAG proxy socket %d",fd);
      sprintf(sTemp,"Unable to get flags for JTAG proxy socket %d",fd);
      error(sTemp);
      error(sTemp);
    }
    }
  if(fcntl(fd,F_SETFL, flags & ~O_NONBLOCK) < 0)
  if(fcntl(fd,F_SETFL, flags & ~O_NONBLOCK) < 0)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.