diff options
author | Raphael Assenat <raph@raphnet.net> | 2005-07-04 16:23:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-04 16:23:45 -0400 |
commit | e7270dec080002d8aa18256c756af6c32331ef48 (patch) | |
tree | 5f00f1e682b1423d9fcb31500a53c598dbba7e0a | |
parent | 19f7241a3b087bbf4dd107c979608fdb56c83a09 (diff) |
[SPARC64/COMPAT]: Add some compat ioctl for ppdev
The following patch adds some ioctls to include/linux/compat_ioctl.h
to allow using ppdev from the 32 bit user space on sparc64.
This patch also adds the PPDEV option in the sparc64 menu, near Parallel
printer support in the 'General machine setup' submenu.
All those ioctls seem to be compatible, since (correct me if I'm wrong)
they dont use the 'long' type. See include/linux/ppdev.h.
The application I used to test the new ioctls only used the following:
PPEXCL
PPCLAIM
PPNEGOT
PPGETMODES
PPRCONTROL
PPWCONTROL
PPDATADIR
PPWDATA
PPRDATA
But I beleive that the other ioctls will work fine.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc64/Kconfig | 18 | ||||
-rw-r--r-- | include/linux/compat_ioctl.h | 19 |
2 files changed, 36 insertions, 1 deletions
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index e2b050eb3b96..d78bc13ebbb9 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -444,6 +444,24 @@ config PRINTER | |||
444 | If you have more than 8 printers, you need to increase the LP_NO | 444 | If you have more than 8 printers, you need to increase the LP_NO |
445 | macro in lp.c and the PARPORT_MAX macro in parport.h. | 445 | macro in lp.c and the PARPORT_MAX macro in parport.h. |
446 | 446 | ||
447 | config PPDEV | ||
448 | tristate "Support for user-space parallel port device drivers" | ||
449 | depends on PARPORT | ||
450 | ---help--- | ||
451 | Saying Y to this adds support for /dev/parport device nodes. This | ||
452 | is needed for programs that want portable access to the parallel | ||
453 | port, for instance deviceid (which displays Plug-and-Play device | ||
454 | IDs). | ||
455 | |||
456 | This is the parallel port equivalent of SCSI generic support (sg). | ||
457 | It is safe to say N to this -- it is not needed for normal printing | ||
458 | or parallel port CD-ROM/disk support. | ||
459 | |||
460 | To compile this driver as a module, choose M here: the | ||
461 | module will be called ppdev. | ||
462 | |||
463 | If unsure, say N. | ||
464 | |||
447 | config ENVCTRL | 465 | config ENVCTRL |
448 | tristate "SUNW, envctrl support" | 466 | tristate "SUNW, envctrl support" |
449 | depends on PCI | 467 | depends on PCI |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 70a4ebb5d964..ecb0d39c0798 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -346,10 +346,27 @@ COMPATIBLE_IOCTL(PPPOEIOCDFWD) | |||
346 | /* LP */ | 346 | /* LP */ |
347 | COMPATIBLE_IOCTL(LPGETSTATUS) | 347 | COMPATIBLE_IOCTL(LPGETSTATUS) |
348 | /* ppdev */ | 348 | /* ppdev */ |
349 | COMPATIBLE_IOCTL(PPSETMODE) | ||
350 | COMPATIBLE_IOCTL(PPRSTATUS) | ||
351 | COMPATIBLE_IOCTL(PPRCONTROL) | ||
352 | COMPATIBLE_IOCTL(PPWCONTROL) | ||
353 | COMPATIBLE_IOCTL(PPFCONTROL) | ||
354 | COMPATIBLE_IOCTL(PPRDATA) | ||
355 | COMPATIBLE_IOCTL(PPWDATA) | ||
349 | COMPATIBLE_IOCTL(PPCLAIM) | 356 | COMPATIBLE_IOCTL(PPCLAIM) |
350 | COMPATIBLE_IOCTL(PPRELEASE) | 357 | COMPATIBLE_IOCTL(PPRELEASE) |
351 | COMPATIBLE_IOCTL(PPEXCL) | ||
352 | COMPATIBLE_IOCTL(PPYIELD) | 358 | COMPATIBLE_IOCTL(PPYIELD) |
359 | COMPATIBLE_IOCTL(PPEXCL) | ||
360 | COMPATIBLE_IOCTL(PPDATADIR) | ||
361 | COMPATIBLE_IOCTL(PPNEGOT) | ||
362 | COMPATIBLE_IOCTL(PPWCTLONIRQ) | ||
363 | COMPATIBLE_IOCTL(PPCLRIRQ) | ||
364 | COMPATIBLE_IOCTL(PPSETPHASE) | ||
365 | COMPATIBLE_IOCTL(PPGETMODES) | ||
366 | COMPATIBLE_IOCTL(PPGETMODE) | ||
367 | COMPATIBLE_IOCTL(PPGETPHASE) | ||
368 | COMPATIBLE_IOCTL(PPGETFLAGS) | ||
369 | COMPATIBLE_IOCTL(PPSETFLAGS) | ||
353 | /* CDROM stuff */ | 370 | /* CDROM stuff */ |
354 | COMPATIBLE_IOCTL(CDROMPAUSE) | 371 | COMPATIBLE_IOCTL(CDROMPAUSE) |
355 | COMPATIBLE_IOCTL(CDROMRESUME) | 372 | COMPATIBLE_IOCTL(CDROMRESUME) |