Preliminary symlink/readlink support.
[bluesky.git] / bluesky / serialize.c
index e243bd2..6f31dcb 100644 (file)
@@ -124,6 +124,13 @@ void bluesky_serialize_inode(GString *out, BlueSkyInode *inode)
 
         break;
     }
+
+    case BLUESKY_SYMLINK:
+    {
+        g_string_append(out, inode->symlink_contents);
+        g_string_append_c(out, '\0');
+    }
+
     default:
         g_warning("Serialization for inode type %d not implemented!\n",
                   inode->type);
@@ -200,6 +207,12 @@ BlueSkyInode *bluesky_deserialize_inode(BlueSkyFS *fs, const gchar *buf)
         }
         break;
     }
+
+    case BLUESKY_SYMLINK:
+    {
+        inode->symlink_contents = g_strdup(buf);
+    }
+
     default:
         g_warning("Deserialization for inode type %d not implemented!\n",
                   inode->type);