summaryrefslogtreecommitdiffstats
path: root/protomsg.asm
diff options
context:
space:
mode:
Diffstat (limited to 'protomsg.asm')
-rw-r--r--protomsg.asm27
1 files changed, 21 insertions, 6 deletions
diff --git a/protomsg.asm b/protomsg.asm
index d76d85a..0d4f89b 100644
--- a/protomsg.asm
+++ b/protomsg.asm
@@ -33,27 +33,28 @@
/* ------------------------------------------------------------------------- *
* path_walk
*
- * Issue a walk message for the path in FS:SI.
+ * Issue a walk message for the path (absolute path starting in \) in FS:SI.
* BX marks the end of the path to convert, and EAX is the new fid.
+ * On successful exit, CF=0 and %al contains the QID type.
+ * On error, CF=1 and %ax contains the Linux error number.
* ------------------------------------------------------------------------- */
- .globl path_walk
-path_walk:
+GPROC(path_walk)
movw msgbuf7,%di
movl $FID_ROOT,(%di)
movl %eax,4(%di)
addw $8,%di
pushw %di
- call genpath
+ call genpath_asciiz
popw %si
- pushw (%di) /* Number of pathname chunks */
+ pushw (%si) /* Number of pathname chunks */
movb $P9_TWALK,%al
call simple_message
jc 1f /* Message error */
popw %dx
movw (%di),%cx /* %ax = nwqid */
imul $13,%cx,%bx /* Each qid is 13 bytes */
- movb $-11(%bx,%di),%al /* Type of the final QID */
+ movb -11(%bx,%di),%al /* Type of the final QID */
cmpw %dx,%cx
jne 2f
clc /* All good */
@@ -71,3 +72,17 @@ path_walk:
3:
stc
retw
+END(path_walk)
+
+/* ------------------------------------------------------------------------- *
+ * clunk
+ *
+ * Clunks the FID in %eax
+ * ------------------------------------------------------------------------- */
+
+GPROC(clunk)
+ movw msgbuf7,%di
+ stosl
+ movb $P9_TCLUNK,%al
+ jmp simple_message
+END(clunk)