summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-03-18 02:23:54 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-03-18 02:23:54 (GMT)
commit4758eea6b68f4ce2bbaa2668154babc051d80295 (patch)
treeeab5f7ed4c8173a8636de3ca7e219171fed331a8
parent05e32465167317f9346b7561ba37b53f9f1a8476 (diff)
downloadvirtio9p-4758eea6b68f4ce2bbaa2668154babc051d80295.zip
virtio9p-4758eea6b68f4ce2bbaa2668154babc051d80295.tar.gz
virtio9p-4758eea6b68f4ce2bbaa2668154babc051d80295.tar.bz2
virtio9p-4758eea6b68f4ce2bbaa2668154babc051d80295.tar.xz
Move findfirst/findnext to a separate file
Move the directory access functions to a separate file
-rw-r--r--Makefile2
-rw-r--r--fxn.asm20
-rw-r--r--readdir.asm51
3 files changed, 52 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index dba99df..9ca18a5 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,7 @@ XTOOLS := $(wildcard ../dostools/*.com ../dostools/*.exe)
OBJS = header.o start.o printmsg.o \
int2f.o acc.o fxn.o \
- diskspc.o \
+ diskspc.o readdir.o \
utf.o datetime.o \
message.o protomsg.o pathname.o
diff --git a/fxn.asm b/fxn.asm
index d399cda..4c6b919 100644
--- a/fxn.asm
+++ b/fxn.asm
@@ -76,26 +76,6 @@ GPROC(fxn_delete)
END(fxn_delete)
/* ------------------------------------------------------------------------- *
- * fxn_findfirst
- * ------------------------------------------------------------------------- */
-
-GPROC(fxn_findfirst)
- movl $0x08030002,%eax /* File not found */
- clc
- retw
-END(fxn_findfirst)
-
-/* ------------------------------------------------------------------------- *
- * fxn_findnext
- * ------------------------------------------------------------------------- */
-
-GPROC(fxn_findnext)
- movl $0x08060012,%eax /* No more files */
- clc
- retw
-END(fxn_findnext)
-
-/* ------------------------------------------------------------------------- *
* fxn_getattr
* ------------------------------------------------------------------------- */
diff --git a/readdir.asm b/readdir.asm
new file mode 100644
index 0000000..735e66b
--- /dev/null
+++ b/readdir.asm
@@ -0,0 +1,51 @@
+/* -*- asm -*- ----------------------------------------------------------- *
+ *
+ * Copyright 2013 H. Peter Anvin - All Rights Reserved
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall
+ * be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * ----------------------------------------------------------------------- */
+
+#include "v9fs.h"
+
+ .code16
+ .section ".rtext","ax"
+
+/* ------------------------------------------------------------------------- *
+ * fxn_findfirst
+ * ------------------------------------------------------------------------- */
+
+GPROC(fxn_findfirst)
+ movl $0x08030002,%eax /* File not found */
+ clc
+ retw
+END(fxn_findfirst)
+
+/* ------------------------------------------------------------------------- *
+ * fxn_findnext
+ * ------------------------------------------------------------------------- */
+
+GPROC(fxn_findnext)
+ movl $0x08060012,%eax /* No more files */
+ clc
+ retw
+END(fxn_findnext)