Allow for certain device APIs to be NULL
[akaros.git] / kern / src / ns / convM2kdirent.c
index 14fd968..bd3d2b1 100644 (file)
@@ -124,13 +124,16 @@ unsigned int convM2kstat(uint8_t * buf, unsigned int nbuf, struct kstat *ks)
        if (ks->st_mode & DMDIR) {
                ks->st_mode &= ~DMDIR;
                ks->st_mode |= __S_IFDIR;
+       } else if (ks->st_mode & DMSYMLINK) {
+               ks->st_mode &= ~DMSYMLINK;
+               ks->st_mode |= __S_IFLNK;
        } else {
                ks->st_mode |= __S_IFREG;
        }
        p += BIT32SZ;
-       ks->st_atime.tv_sec = GBIT32(p);
+       ks->st_atim.tv_sec = GBIT32(p);
        p += BIT32SZ;
-       ks->st_mtime.tv_sec = GBIT32(p);
+       ks->st_mtim.tv_sec = GBIT32(p);
        p += BIT32SZ;
        ks->st_size = GBIT64(p);
        p += BIT64SZ;