summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-03-03 07:21:37 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-03-03 07:21:37 (GMT)
commit7c5a8b6e05696763e2d1c66c272491fe746f3c75 (patch)
tree2602e0ccf16fd100b044dec8c872bf05366045df
parentc5c0c14c1375029dffa8d7bbca05f871b82c39c1 (diff)
downloadvirtio9p-7c5a8b6e05696763e2d1c66c272491fe746f3c75.zip
virtio9p-7c5a8b6e05696763e2d1c66c272491fe746f3c75.tar.gz
virtio9p-7c5a8b6e05696763e2d1c66c272491fe746f3c75.tar.bz2
virtio9p-7c5a8b6e05696763e2d1c66c272491fe746f3c75.tar.xz
Split out yet another set of fields in the SDA
Yet another set of version-dependent fields we need in the SDA.
-rw-r--r--acc.S4
-rw-r--r--start.S11
-rw-r--r--v9fs.h22
3 files changed, 26 insertions, 11 deletions
diff --git a/acc.S b/acc.S
index a8cc15a..4378d15 100644
--- a/acc.S
+++ b/acc.S
@@ -82,7 +82,7 @@ acc_drive_common:
.globl acc_findnext
acc_findnext:
lfsw dos_sdafn,%si
- addw $SDF_SEARCHDATA,%si /* First byte in srcrec = drive no */
+ addw $SDN_SEARCHDATA,%si /* First byte in srcrec = drive no */
jmp acc_drive_common
.size acc_findnext,.-acc_findnext
@@ -117,7 +117,7 @@ fxn_unknown = acc_never
.globl acc_cds
acc_cds:
lfsw dos_sdafn,%si
- addw $SDF_CDS,%si
+ addw $SDN_CDS,%si
cmpw $CDS_MAGIC,%fs:CDS_DPBPTR(%si) /* Our magic? */
jne acc_fail
movb drive_letter,%al
diff --git a/start.S b/start.S
index 601af42..4431994 100644
--- a/start.S
+++ b/start.S
@@ -197,6 +197,7 @@ tag_too_long:
* ------------------------------------------------------------------------- */
grblong dos_sda /* Pointer to Swappable Data Area */
grblong dos_sdafn /* Pointer to first filename in SDA */
+ grblong dos_sdafcb /* Pointer to the FCB entries in SDA */
liblong dos_lol /* Pointer to List of Lists */
liblong dos_cds /* Pointer to Current Directory Structures */
liblong our_cds /* Pointer to our own CDS */
@@ -218,18 +219,24 @@ get_dos_bits:
movw %si,%cs:dos_sda
movw %ds,%cs:dos_sda+2
addw $0x92,%si /* DOS 3.x: searchdata @ 0x92 */
+ movw $(0x218-0x92),%ax /* Further offset for the FCB entries */
popfw /* DOS 4+? */
jb 2f
addw $(0x9e-0x92),%si
+ movw $(0x22b-0x9e),%ax
2:
movw %si,%cs:dos_sdafn
movw %ds,%cs:dos_sdafn+2
- movw $0x5200,%ax
- int $0x21 /* Get list of lists pointer */
+ addw %ax,%si
+ movw %si,%cs:dos_sdafcb
+ movw %ds,%cs:dos_sdafcb+2
popw %ds
+ movw $0x5200,%ax
+ int $0x21 /* Get list of lists pointer */
+
movw %bx,dos_lol
movw %es,dos_lol+2
diff --git a/v9fs.h b/v9fs.h
index 7c52021..1898dda 100644
--- a/v9fs.h
+++ b/v9fs.h
@@ -246,8 +246,9 @@
* Fields in the DOS Swappable Data Area (SDA)
*
* The SDA is different in DOS 3 and DOS 4+, but the areas we care about
- * are either at the common head of the SDA (SDA_) or they are at a
- * fixed address relative to the filename buffers (SDF_)
+ * are either at the common head of the SDA (SDA_), they are at a
+ * fixed address relative to the filename buffers (SDN_), or they are
+ * at a fixed address with the FCB fields (SDF_)
*/
#define SDA_ERRLOCUS 0x003 /* Extended error locus */
#define SDA_ERREXT 0x004 /* Extended error code */
@@ -256,11 +257,18 @@
#define SDA_ERRPTR 0x008 /* Extended error pointer */
#define SDA_DTAPTR 0x00C /* Pointer to current DTA */
-#define SDF_FN1 0x000 /* First filename */
-#define SDF_FN2 0x080 /* Second filename */
-#define SDF_SEARCHDATA 0x100 /* Find first/find next data block */
-#define SDF_DIRENT 0x115 /* FAT-style directory entry for found file */
-#define SDF_CDS 0x135 /* Copy of CDS for current file */
+#define SDN_FN1 0x000 /* First filename */
+#define SDN_FN2 0x080 /* Second filename */
+#define SDN_SEARCHDATA 0x100 /* Find first/find next data block */
+#define SDN_DIRENT 0x115 /* FAT-style directory entry for found file */
+#define SDN_CDS 0x135 /* Copy of CDS for current file */
+
+#define SDF_DEVNAME 0x000 /* Formatted filename for device comparison */
+#define SDF_WILDREN 0x00c /* Wildcard pattern for rename */
+#define SDF_ATTRIB 0x020 /* Search attributes */
+#define SDF_FCBTYPE 0x021 /* Extended FCB? */
+#define SDF_DIRSRCH 0x022 /* Directory search attributes */
+#define SDF_OPENMODE 0x023 /* File open mode */
/*
* Fields in the DOS Current Directory Structure (CDS)