mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <WHarms@bfs.de> (Walter Harms)
To: <linux-kernel@vger.kernel.org>
Subject: fix: lp.c wrong return code
Date: Sun, 24 Feb 2002 18:34:59 +0100	[thread overview]
Message-ID: <vines.sxdD+0FGSwA@SZKOM.BFS.DE> (raw)

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

hi,
how takes care about the lp driver ? i saw some changes in the 2.4 but found no maintainer.
to the maintainer:
LPGETSTATS is strange. first you set LP_STAT then you delete it. maybe a EACCES (Permission denied) would do it ?



problem:
calling the ioctl( LPSETIRQ ) the driver returns EINVAL (Invalid argument)instead of ENOSYS.

Fix : return ENOSYS (Function not implemented)

NOTE:
if EINVAL is correct, you can delete the entiere entry, EINVAL in default.



[-- Attachment #2: lp.diff --]
[-- Type: application/octet-stream, Size: 267 bytes --]

--- lp.c.old	Sun Feb 24 18:19:59 2002
+++ lp.c	Sun Feb 24 18:20:57 2002
@@ -806,7 +806,7 @@
 			LP_WAIT(minor) = arg;
 			break;
 		case LPSETIRQ: 
-			return -EINVAL;
+			return -ENOSYS;
 			break;
 		case LPGETIRQ:
 			if (copy_to_user((int *) arg, &LP_IRQ(minor),

             reply	other threads:[~2002-02-24 17:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-24 17:34 Walter Harms [this message]
2002-02-24 19:58 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vines.sxdD+0FGSwA@SZKOM.BFS.DE \
    --to=wharms@bfs.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®