Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/stand/lib PR 50516 bad switch statement.
details: https://anonhg.NetBSD.org/src/rev/f3ba5be8dabc
branches: trunk
changeset: 812325:f3ba5be8dabc
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Fri Dec 11 08:04:20 2015 +0000
description:
PR 50516 bad switch statement.
Adding some comments.
diffstat:
sys/arch/i386/stand/lib/dosfile.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diffs (39 lines):
diff -r 6dcf5c61e3ef -r f3ba5be8dabc sys/arch/i386/stand/lib/dosfile.c
--- a/sys/arch/i386/stand/lib/dosfile.c Fri Dec 11 07:59:14 2015 +0000
+++ b/sys/arch/i386/stand/lib/dosfile.c Fri Dec 11 08:04:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dosfile.c,v 1.16 2013/10/20 21:06:37 christos Exp $ */
+/* $NetBSD: dosfile.c,v 1.17 2015/12/11 08:04:20 mlelstv Exp $ */
/*
* Copyright (c) 1996
@@ -56,18 +56,22 @@
int err;
switch (doserrno) {
- case 1:
- case 4:
- case 12:
+ case 1: /* invalid function number */
+ case 4: /* too many open files */
+ case 12: /* invalid access mode */
default:
err = EIO;
- case 2:
- case 3:
+ break;
+ case 2: /* file not found */
+ case 3: /* path not found */
err = ENOENT;
- case 5:
+ break;
+ case 5: /* access denied */
err = EPERM;
- case 6:
+ break;
+ case 6: /* invalid handle */
err = EINVAL;
+ break;
}
return err;
}
Home |
Main Index |
Thread Index |
Old Index