qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 16/17] virtio-9p: Add support for hardlink


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 16/17] virtio-9p: Add support for hardlink
Date: Wed, 3 Mar 2010 13:01:13 -0600

From: Aneesh Kumar K.V <address@hidden>

link count for files and directories are encoded as
a tagged string in the extension field for a .u protocol
extension.

Signed-off-by: Aneesh Kumar K.V <address@hidden>
---
 hw/virtio-9p.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index 65f5827..8a96645 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -676,6 +676,9 @@ static void stat_to_v9stat(V9fsState *s, V9fsString *name,
            v9fs_string_sprintf(&v9stat->extension, "%c %u %u",
                                S_ISCHR(stbuf->st_mode) ? 'c' : 'b',
                                major(stbuf->st_rdev), minor(stbuf->st_rdev));
+       } else if (S_ISDIR(stbuf->st_mode) || S_ISREG(stbuf->st_mode)) {
+               v9fs_string_sprintf(&v9stat->extension, "%s %u",
+                               "HARDLINKCOUNT", stbuf->st_nlink);
        }
     }
 
-- 
1.6.5.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]