The in-kernel ioctl code creates a raw# device on-demand. udev will create
the /dev/raw/raw# file when the device is created automatically.
The current raw userspace code wants to stat the file before using it,
which is unnecessary for setting up the raw device.
This patch stats the file only when query() is called as a singleton, and
it's doubtful it's needed even there. I modified as little code as I could,
though.
[kzak@redhat.com: - check properly fscanf() return code
- add NLS stuff]
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>