Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/modules/examples Use ENOTTY as error for an unrecognized...



details:   https://anonhg.NetBSD.org/src/rev/892c479577d1
branches:  trunk
changeset: 744541:892c479577d1
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Feb 05 14:10:46 2020 +0000

description:
Use ENOTTY as error for an unrecognized ioctl() code, rather than
"magic number" 1.


ok kamil@

diffstat:

 sys/modules/examples/ping/ping.c       |  6 +++---
 sys/modules/examples/ping_block/ping.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 13f6df36efc7 -r 892c479577d1 sys/modules/examples/ping/ping.c
--- a/sys/modules/examples/ping/ping.c  Wed Feb 05 13:23:42 2020 +0000
+++ b/sys/modules/examples/ping/ping.c  Wed Feb 05 14:10:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping.c,v 1.2 2020/01/30 07:58:33 kamil Exp $   */
+/*     $NetBSD: ping.c,v 1.3 2020/02/05 14:10:46 pgoyette Exp $        */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ping.c,v 1.2 2020/01/30 07:58:33 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ping.c,v 1.3 2020/02/05 14:10:46 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -101,7 +101,7 @@
                printf("ping: pong!\n");
                return 0;
        default:
-               return 1;
+               return ENOTTY;
        }
 }
 
diff -r 13f6df36efc7 -r 892c479577d1 sys/modules/examples/ping_block/ping.c
--- a/sys/modules/examples/ping_block/ping.c    Wed Feb 05 13:23:42 2020 +0000
+++ b/sys/modules/examples/ping_block/ping.c    Wed Feb 05 14:10:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping.c,v 1.1 2020/02/05 13:23:42 kamil Exp $   */
+/*     $NetBSD: ping.c,v 1.2 2020/02/05 14:10:47 pgoyette Exp $        */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ping.c,v 1.1 2020/02/05 13:23:42 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ping.c,v 1.2 2020/02/05 14:10:47 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -111,7 +111,7 @@
                printf("ping: pong!\n");
                return 0;
        default:
-               return 1;
+               return ENOTTY;
        }
 }
 



Home | Main Index | Thread Index | Old Index