ok but please add these:
1) an error message if the user didn't invoke the file correctly
2) a check to see if the setrfkill have not failed
if((fd=fopen(path,"rw"))==NULL) return -1;
fputc(argv[2][0],fd);
kill_status=fgetc(fd);
if (argv[2][0]!=kill_status) return -1;
fclose(fd);
g_free(path);

wouldn't it be better if instead of returning immediately error, we first try 
to set the values to all cards? this if the first card fails, but the second is 
ok, we don't prevent the second setting to be applied!
This could be done adding a flag error_occurred...


----- Messaggio originale -----
Da: dragoran <[EMAIL PROTECTED]>
A: yelo_3 <[EMAIL PROTECTED]>
Cc: Dan Williams <[EMAIL PROTECTED]>; network manager 
<[email protected]>; David Zeuthen <[EMAIL PROTECTED]>; Bastien 
Nocera <[EMAIL PROTECTED]>
Inviato: Lunedì 25 giugno 2007, 19:14:24
Oggetto: Re: ipw srcipts for hal



On 6/25/07, yelo_3 <[EMAIL PROTECTED]> wrote:
I've removed some code duplication...
And in my opinion the script should return On if it founds at least one card 
on, and not as dan said, off if it finds at least one card off..
It is just an opinion...
Because one card on is enough to say that you have wireless on

What do you think?
this won't work with the new .fdi file (the ipw card is no longer a parent of 
the killswitch).
and you also don't check for cards but for interfaces on one card. 












      ___________________________________ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html
_______________________________________________
NetworkManager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to