Hi,
I pretty new to rtnet, so forgive me any nonsense.
Jan Kiszka wrote:
Jorge Almeida wrote:
Jan,
please consider the new patch for the link beat functionality using the
ethtool structure.
Any comments??!!
Looks OK, find just one issue below. For the nitpicking (coding style
etc.) see my previous review.
[please trim your replies...]
------------------------------------------------------------------------
Index: stack/socket.c
===================================================================
--- stack/socket.c (revision 1087)
+++ stack/socket.c (working copy)
@@ -229,7 +229,7 @@
struct ifreq *ifr = arg;
int ret = 0;
if (request == SIOCGIFCONF) {
struct ifconf *ifc = arg;
struct ifreq *cur_ifr = ifc->ifc_req;
@@ -279,6 +279,10 @@
case SIOCGIFFLAGS:
ifr->ifr_flags = rtdev->flags;
break;
+
+ case SIOCETHTOOL:
+ ret = rtdev->do_ioctl( rtdev, request, arg);
+ break;
default:
ret = -EOPNOTSUPP;
I guess that are some that don't have do_ioctl defined. This must be
+ if (rtdev->do_ioctl) {
+ ret = rtdev->do_ioctl( rtdev, request, arg);
+ }
I think that a more generic approach would be, instead of inserting
another option in stack/socket.c, to do something like this:
----------------------------
diff -r -c rtnet.orig/stack/socket.c rtnet.new/stack/socket.c
*** rtnet.orig/stack/socket.c 2006-11-29 15:01:01.000000000 -0200
--- rtnet.new/stack/socket.c 2006-11-29 15:39:43.000000000 -0200
***************
*** 281,287 ****
break;
default:
! ret = -EOPNOTSUPP;
break;
}
--- 281,291 ----
break;
default:
! if (rtdev->do_ioctl) {
! ret = rtdev->do_ioctl(rtdev, request, arg);
! } else {
! ret = -EOPNOTSUPP;
! }
break;
}
----------------------------
<...>
Just my 2 cents...
Paulo
_________________________________________________________________
AVISO
Esta mensagem é destinada exclusivamente a(s) pessoa(s) indicada(s)
como destinatário(s), podendo conter informações confidenciais,
protegidas por lei.
A transmissão incorreta da mensagem não acarreta a perda de sua
confidencialidade.
Caso esta mensagem tenha sido recebida por engano, solicitamos que
seja devolvida ao remetente e apagada imediatamente de seu sistema. É
vedado a qualquer pessoa que não seja destinatário, usar, revelar,
distribuir ou copiar ainda que parcialmente esta mensagem.
_________________________________________________________________
DISCLAIMER
This message is destined exclusively to the intended receiver. It may
contain confidential or legally protected information.
The incorrect transmission of this message does not mean loss of its
confidentiality.
If this message is received by mistake, please send it back to the
sender and delete it from your system immediately. It is forbidden to
any person who is not the intended receiver to use, reveal,
distribute, or copy any part of this message.
_________________________________________________________________-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers