[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 02/12: eth-multiplexer: fix device_{get,set}_status calls
From: |
Samuel Thibault |
Subject: |
[hurd] 02/12: eth-multiplexer: fix device_{get,set}_status calls |
Date: |
Wed, 10 Dec 2014 15:16:58 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit c4ea3e08b4b8d6a931ce0cdb32cdbba7545f1b84
Author: Justus Winter <address@hidden>
Date: Fri Nov 14 18:30:18 2014 +0100
eth-multiplexer: fix device_{get,set}_status calls
* eth-multiplexer/ethernet.c (set_promisc): Make flags an int, count
must be 1.
---
eth-multiplexer/ethernet.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/eth-multiplexer/ethernet.c b/eth-multiplexer/ethernet.c
index 32c5589..886f5df 100644
--- a/eth-multiplexer/ethernet.c
+++ b/eth-multiplexer/ethernet.c
@@ -76,12 +76,12 @@ int set_promisc (char *dev_name, mach_port_t ether_port,
int is_promisc)
#ifndef NET_FLAGS
#define NET_FLAGS (('n'<<16) + 4)
#endif
- short flags;
+ int flags;
int ret;
size_t count;
debug ("set_promisc is called, is_promisc: %d\n", is_promisc);
- count = sizeof (flags);
+ count = 1;
ret = device_get_status (ether_port, NET_FLAGS, (dev_status_t) &flags,
&count);
if (ret)
@@ -93,8 +93,7 @@ int set_promisc (char *dev_name, mach_port_t ether_port, int
is_promisc)
flags |= IFF_PROMISC;
else
flags &= ~IFF_PROMISC;
- ret = device_set_status(ether_port, NET_FLAGS, (dev_status_t) &flags,
- sizeof (flags));
+ ret = device_set_status(ether_port, NET_FLAGS, (dev_status_t) &flags, 1);
if (ret)
{
error (0, ret, "device_set_status");
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch dde updated (607eaa3 -> 723ff43), Samuel Thibault, 2014/12/10
- [hurd] 08/12: libmachdev: fix size of `net_rcv_msg' message, Samuel Thibault, 2014/12/10
- [hurd] 06/12: libmachdev: drop unused function, Samuel Thibault, 2014/12/10
- [hurd] 02/12: eth-multiplexer: fix device_{get,set}_status calls,
Samuel Thibault <=
- [hurd] 07/12: libmachdev: drop debugging printf, Samuel Thibault, 2014/12/10
- [hurd] 01/12: libmachdev: fix getting parameter for get_status, Samuel Thibault, 2014/12/10
- [hurd] 11/12: Merge remote-tracking branch 'incubator/dde' into dde-upstream, Samuel Thibault, 2014/12/10
- [hurd] 10/12: libmachdev: avoid malloc overhead when sending package, Samuel Thibault, 2014/12/10
- [hurd] 03/12: eth-multiplexer: improve the netfs_demuxer function, Samuel Thibault, 2014/12/10
- [hurd] 09/12: libmachdev: drop static libmachdev.so hack, Samuel Thibault, 2014/12/10
- [hurd] 05/12: Remove obsolete device server stubs, Samuel Thibault, 2014/12/10
- [hurd] 04/12: Drop superfluous files, Samuel Thibault, 2014/12/10
- [hurd] 12/12: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2014/12/10