From 011429a837aabd31149f5641545b9d05a042d144 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 24 Feb 2013 00:59:42 +0100 Subject: Fix getting parameter for set_status * libmachdev/net.c (device_set_status): Use count as number of parameter, not number of bytes. Take status as integer, not short. --- libmachdev/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmachdev/net.c') diff --git a/libmachdev/net.c b/libmachdev/net.c index 4b4cfe7c..501c9bb7 100644 --- a/libmachdev/net.c +++ b/libmachdev/net.c @@ -583,10 +583,10 @@ device_set_status(void *d, dev_flavor_t flavor, dev_status_t status, { if (flavor == NET_FLAGS) { - if (count != sizeof(short)) + if (count != 1) return D_INVALID_SIZE; - short flags = *(short *) status; + int flags = *(int *) status; struct net_data *net = (struct net_data *) d; dev_change_flags (net->dev, flags); -- cgit v1.2.3