summaryrefslogtreecommitdiffstats
path: root/protomsg.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-03-21 22:09:02 -0700
committerH. Peter Anvin <hpa@zytor.com>2013-03-21 22:09:02 -0700
commit81d9cd91c09e12ad29f66d579d0b9bd765ad260c (patch)
tree6ae9c5823ebcf37d26edf0bd5d1b5697aa17a1ab /protomsg.asm
parentad0a8d14550dad96e4f5ee2f30c2d766fae26837 (diff)
downloadvirtio9p-81d9cd91c09e12ad29f66d579d0b9bd765ad260c.tar.gz
virtio9p-81d9cd91c09e12ad29f66d579d0b9bd765ad260c.tar.xz
virtio9p-81d9cd91c09e12ad29f66d579d0b9bd765ad260c.zip
Generalize pathname parsing functions
For create and mkdir we will need to be able to split a path into directory name and file name.
Diffstat (limited to 'protomsg.asm')
-rw-r--r--protomsg.asm8
1 files changed, 7 insertions, 1 deletions
diff --git a/protomsg.asm b/protomsg.asm
index a0bc4e8..286a336 100644
--- a/protomsg.asm
+++ b/protomsg.asm
@@ -39,13 +39,19 @@
* On error, CF=1 and %ax contains the Linux error number.
* ------------------------------------------------------------------------- */
+GPROC(path_walk_asciiz)
+ call get_end_path /* Point BX to the end of string */
+ /* jmp path_walk */
+END(path_walk_asciiz)
+
GPROC(path_walk)
movw msgbuf7,%di
movl $FID_ROOT,(%di)
movl %eax,4(%di)
addw $8,%di
pushw %di
- call genpath_asciiz
+ incw %si /* Skip leading backslash */
+ call genpath
popw %si
pushw (%si) /* Number of pathname chunks */
movb $P9_TWALK,%al