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-next>] [day] [month] [year] [list]
Message-ID: <20061028184712.GG9973@localhost>
Date:	Sun, 29 Oct 2006 03:47:12 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	linux-kernel@...r.kernel.org, linux-netdev@...r.kernel.org
Cc:	Jeff Garzik <jgarzik@...ox.com>, Krzysztof Halasa <khc@...waw.pl>
Subject: [PATCH] n2: fix confusing error code

modprobe n2 with no parameters or no such devices
will get confusing error message.

# modprobe n2
...  Kernel does not have module support

This patch replaces return code from -ENOSYS to -EINVAL.

Cc: Jeff Garzik <jgarzik@...ox.com>
Cc: Krzysztof Halasa <khc@...waw.pl>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>

 drivers/net/wan/n2.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: work-fault-inject/drivers/net/wan/n2.c
===================================================================
--- work-fault-inject.orig/drivers/net/wan/n2.c
+++ work-fault-inject/drivers/net/wan/n2.c
@@ -500,7 +500,7 @@ static int __init n2_init(void)
 #ifdef MODULE
 		printk(KERN_INFO "n2: no card initialized\n");
 #endif
-		return -ENOSYS;	/* no parameters specified, abort */
+		return -EINVAL;	/* no parameters specified, abort */
 	}
 
 	printk(KERN_INFO "%s\n", version);
@@ -538,11 +538,11 @@ static int __init n2_init(void)
 			n2_run(io, irq, ram, valid[0], valid[1]);
 
 		if (*hw == '\x0')
-			return first_card ? 0 : -ENOSYS;
+			return first_card ? 0 : -EINVAL;
 	}while(*hw++ == ':');
 
 	printk(KERN_ERR "n2: invalid hardware parameters\n");
-	return first_card ? 0 : -ENOSYS;
+	return first_card ? 0 : -EINVAL;
 }
 
 
-
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