Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/msdosfs provide a function to access the name and ext...
details: https://anonhg.NetBSD.org/src/rev/e70f000e0522
branches: trunk
changeset: 790740:e70f000e0522
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 20 00:01:55 2013 +0000
description:
provide a function to access the name and extension as a single array as
opposed depend on array index overflow.
diffstat:
sys/fs/msdosfs/direntry.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r e6c425f5db3b -r e70f000e0522 sys/fs/msdosfs/direntry.h
--- a/sys/fs/msdosfs/direntry.h Sun Oct 20 00:00:51 2013 +0000
+++ b/sys/fs/msdosfs/direntry.h Sun Oct 20 00:01:55 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: direntry.h,v 1.6 2013/01/26 00:21:49 christos Exp $ */
+/* $NetBSD: direntry.h,v 1.7 2013/10/20 00:01:55 christos Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -78,6 +78,12 @@
u_int8_t deFileSize[4]; /* size of file in bytes */
};
+static __inline uint8_t
+msdos_dirchar(const struct direntry *de, size_t i) {
+ return i < sizeof(de->deName) ? de->deName[i] :
+ de->deExtension[i - sizeof(de->deName)];
+}
+
/*
* Structure of a Win95 long name directory entry
*/
Home |
Main Index |
Thread Index |
Old Index