From 95c7aad99ed66a9ecb7609a90ee53d5435d81577 Mon Sep 17 00:00:00 2001 From: pathoswithin Date: Fri, 10 Feb 2017 09:17:54 +0000 Subject: [PATCH] ext fs small fixes git-svn-id: svn://kolibrios.org@6861 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/fs/ext.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/trunk/fs/ext.inc b/kernel/trunk/fs/ext.inc index 61aa52c9f8..3720ea84ee 100644 --- a/kernel/trunk/fs/ext.inc +++ b/kernel/trunk/fs/ext.inc @@ -130,7 +130,6 @@ fsBlock dd ? ends ROOT_INODE = 2 -PERMISSIONS = 110110110b EXTENTS_USED = 80000h TYPE_MASK = 0F000h FLAG_FILE = 8000h @@ -2300,7 +2299,7 @@ ext_CreateFolder: mov [ebx+INODE.dataModified], eax pop edi esi edx ; edx = allocated inode number, edi -> filename, esi = parent inode number - mov [ebx+INODE.accessMode], DIRECTORY or PERMISSIONS + mov [ebx+INODE.accessMode], DIRECTORY or 511 mov eax, edx call writeInode jc .error @@ -2374,7 +2373,7 @@ ext_CreateFile: mov [ebx+INODE.dataModified], eax pop edi esi edx ; edx = allocated inode number, edi -> filename, esi = parent inode number - mov [ebx+INODE.accessMode], FLAG_FILE or PERMISSIONS + mov [ebx+INODE.accessMode], FLAG_FILE or 110110110b mov eax, edx call writeInode jc .error2 @@ -2434,6 +2433,7 @@ ext_WriteFile: mov ecx, [ebx+12] mov esi, [ebx+16] .write: + jecxz .zero div [ebp+EXTFS.bytesPerBlock] test edx, edx jz .aligned @@ -2470,6 +2470,7 @@ ext_WriteFile: pop eax inc eax xor edx, edx +.zero: jecxz .done .aligned: xchg eax, ecx