Skip to contentSkip to conversation

hw/9pfs: Update the fidp path before opendir

PATCH New Aneesh Kumar K.V 1 participant 1 message Aug 25, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/9pfs: Update the fidp path before opendir

We need to update the fidp path before opendir. Since we don't use the fid returned by mkdir, earlier code should not have much issue. We do a double v9fs_string_copy here. The later patch cleanup the entire function.

---
 hw/9pfs/virtio-9p.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
hw/9pfs/virtio-9p.c +1 -0
index 94b7090..71bc51b 100644
@@ -2106,6 +2106,7 @@ static void v9fs_create(void *opaque)
         if (err < 0) {
             goto out;
         }
+        v9fs_string_copy(&fidp->path, &fullname);
         err = v9fs_co_opendir(pdu->s, fidp);
         if (err < 0) {
             goto out;
Signature · 1 line
1.7.4.1