system-config-printer is unable to tell me what kind of printer is attached. ioctl32(hald-probe-prin:28850): Unknown cmd fd(4) cmd(44005001){04} arg(ffb66568) on /dev/usb/lp0
The ioctl by itself needs no translation, because it returns a strings. But adding COMPAT_IOCTL won't work, because this thing accepts a variable length with _IOC_SIZE(cmd). Joy.
Created attachment 122508 [details] fix Signed-off-by: David Woodhouse <dwmw2> Actually, this patch works -- almost. It fixes the kernel side, but the usblp.c code still rejects what system-config-printer does, because system-config-printer actually uses ioctl cmd=0x84005001 (P nr=1 len=1024 dir=4) instead of the expected cmd=0x4xxx5001 (P nr=1 len=xxx dir=2) -- i.e. it looks like it's using _IOW('P',1,size} instead of _IOR('P',1,size) for its definition of the ioctl.
OMFG it's not defined using _IOx() at all. It's this... magic_perl = "perl -e 'ioctl(STDIN,0x84005001,$result);" magic_perl += "print $result' 2>/dev/null <" foo = os.popen (magic_perl + dev)
The system-config-printer gem above is filed as bug #176381, and I'm tempted to submit it to thedailywtf.com too.
Created attachment 122509 [details] fix I think this is what David meant (tested to build).
This is a mass-update to all currently open kernel bugs. A new kernel update has been released (Version: 2.6.15-1.1830_FC4) based upon a new upstream kernel release. Please retest against this new kernel, as a large number of patches go into each upstream release, possibly including changes that may address this problem. This bug has been placed in NEEDINFO_REPORTER state. Due to the large volume of inactive bugs in bugzilla, if this bug is still in this state in two weeks time, it will be closed. Should this bug still be relevant after this period, the reporter can reopen the bug at any time. Any other users on the Cc: list of this bug can request that the bug be reopened by adding a comment to the bug. If this bug is a problem preventing you from installing the release this version is filed against, please see bug 169613. Thank you.
The fix is upstream in 2.6.16-rc2, but we won't be seing this in FC-4 unless we rebase. Dunno, maybe we should carry the patch until then?
Not a lot of point in it unless the userspace side is also going to be updated for FC-4.
I presume this is fixed in FC-5.