Dear all

I wanted to implement the ioctl syscall for X86.
Can any of you please help me with that ?

Should I use a similar  implementation as shown below or is it somehow 
incomplete?




    if (fd < 0 || process->sim_fd(fd) < 0) {
        // doesn't map to any simulator fd: not a valid target fd
        return -EBADF;
    }

    switch (req) {
      case OS::TIOCISATTY_:
      case OS::TIOCGETP_:
      case OS::TIOCSETP_:
      case OS::TIOCSETN_:
      case OS::TIOCSETC_:
      case OS::TIOCGETC_:
      case OS::TIOCGETS_:
      case OS::TIOCGETA_:
      case OS::TCSETAW_:
        return -ENOTTY;

      default:
        fatal("Unsupported ioctl call: ioctl(%d, 0x%x, ...) @ \n",
              fd, req, tc->pcState());
    }



appreciate your help in advance 




_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to