[pso] [Tema4] no of rules

Marius Ion marius.ion85 at gmail.com
Sat Jun 14 17:50:31 EEST 2008


Salut,

Din user space iti vin de 2 ori comenzi ioctl. Prima are spatiu alocat pentru 0 reguli si trebuie sa returnezi -ENOSPC, iar a doua va veni cu spatiu alocat pentru cate reguli trebuie si trebuie sa returnezi 0. Incearca sa vezi la care din cele 2 ioctl-uri nu intorci ce trebuie.

Marius Ion
343 C3
  ----- Original Message ----- 
  From: Laura Ionita 
  To: Proiectarea Sistemelor de Operare 
  Sent: Saturday, June 14, 2008 2:14 PM
  Subject: Re: [pso] [Tema4] no of rules


  Salut,

  Am aceeasi problema (cu care ma chinuiesc de 3 zile :D): no_of_rules ..... failed: success.
  Nu inteleg de ce pentru ca trimit user-ului numarul de reguli curent si intorc -ENOSPC.

  if (copy_to_user((void*) arg, &nr_rules, sizeof(int)))
      return -EFAULT;
                  
  return -ENOSPC;

  Imi scapa ceva?


  multumesc anticipat,
  Laura


  2008/5/31 Razvan Deaconescu <razvan.deaconescu at cs.pub.ro>:

    On Sat, 2008-05-31 at 16:52 +0300, Laura Cristina wrote:
    > In enuntul temei nu zice nimic despre asta, si am incercat in ambele
    > moduri tot imi da failed.. poate e de la altceva.


    Verifica in test ce trebuie sa intorci. Daca testul cere -EINVAL sau
    cere sa intoarca 0 verifica daca intorci aceeasi valoare din modulul
    tau.

    Razvan


    --
    This message has been scanned for viruses and
    dangerous content by MailScanner, and is
    believed to be clean.


    _______________________________________________
    pso mailing list
    pso at cursuri.cs.pub.ro
    http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso







------------------------------------------------------------------------------


  _______________________________________________
  pso mailing list
  pso at cursuri.cs.pub.ro
  http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080614/b3f47d53/attachment.htm 


More information about the pso mailing list