Calculate size of symlinks.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Tue, 29 Dec 2009 04:56:17 +0000 (20:56 -0800)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Tue, 29 Dec 2009 04:56:17 +0000 (20:56 -0800)
nfs3/nfs3.c

index 2aa4299..2a25e0b 100644 (file)
@@ -119,6 +119,14 @@ void encode_fattr3(struct fattr3 *result, BlueSkyInode *inode)
     result->mtime.nseconds = (inode->mtime % 1000000) * 1000;
     result->ctime.seconds = inode->ctime / 1000000;
     result->ctime.nseconds = (inode->ctime % 1000000) * 1000;
+
+    switch (inode->type) {
+    case BLUESKY_SYMLINK:
+        result->size = strlen(inode->symlink_contents);
+        break;
+    default:
+        break;
+    }
 }
 
 void encode_pre_wcc(struct wcc_data *wcc, BlueSkyInode *inode)