lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 16 Feb 2009 23:57:31 -0500
From:	Mike Murphy <mamurph@...clemson.edu>
To:	Greg KH <greg@...ah.com>
Cc:	Oliver Neukum <oliver@...kum.org>, linux-usb@...r.kernel.org,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: xpad.c - Xbox 360 wireless and sysfs support

On Mon, Feb 16, 2009 at 10:18 PM, Greg KH <greg@...ah.com> wrote:
>
> input_set_drvdata() and input_get_drvdata() is what you are looking for.
>

Thanks! That solved the problem at least as far as getting the entries
to show up in sysfs... though somehow now I'm having problems with the
I/O buffers, and a cat of the sysfs file shows no output (not even a
blank line). I added a couple printk's to one of the routines, and the
values are being read correctly from the data structure, but no
working I/O (cannot set the values either, per printk results). The
dmesg output shows the printk results, so the functions are getting
called. Even the count from sprintf is correct, and the resulting
buffer looks like it should... though with the extra blank line I
added in the last printk:

static ssize_t xpad_show_dead_zone(struct device *dev, char *buf)
{
	struct usb_xpad *xpad = to_xpad(dev);
	int count;
	printk(KERN_INFO "Dead zone is %d\n", xpad->dead_zone);
	count = sprintf(buf, "%d\n", xpad->dead_zone);
	printk(KERN_INFO "Count is %d\n", count);
	printk(KERN_INFO "Buffer is %s\n", buf);
	return count;
}

Unless that is some common error that is obvious from its description,
I will have to chase the bug down tomorrow or Wednesday. It's getting
a bit late here.

Thanks,
Mike
-- 
Mike Murphy
Ph.D. Candidate and NSF Graduate Research Fellow
Clemson University School of Computing
120 McAdams Hall
Clemson, SC 29634-0974 USA
Tel: +1 864.656.2838   Fax: +1 864.656.0145
http://cirg.cs.clemson.edu/~mamurph
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ