[fast-classifier] fix writing to offload_at_pkts in sysfs
Not sure how this ever worked
Change-Id: I2a4b4043dac7820bc4d37b1a8a0425a9124fa14c
Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
diff --git a/fast-classifier/fast-classifier.c b/fast-classifier/fast-classifier.c
index 04bd3f3..44cfde7 100644
--- a/fast-classifier/fast-classifier.c
+++ b/fast-classifier/fast-classifier.c
@@ -1092,9 +1092,12 @@
struct device_attribute *attr,
char *buf, size_t size)
{
- int new;
+ long new;
+ int ret;
- if (strict_strtol(buf, 0, &new) < 1)
+ printk(KERN_EMERG "BUF: %s\n", buf);
+ ret = strict_strtol(buf, 0, &new);
+ if (ret == -EINVAL || ((int)new != new))
return -EINVAL;
offload_at_pkts = new;