Browse Source

kernel: return EROFS for some unconfigured VFS operations

K. Lange 2 years ago
parent
commit
3d3738d76a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      kernel/fs/vfs.c

+ 2 - 2
kernel/fs/vfs.c

@@ -159,7 +159,7 @@ uint32_t write_fs(fs_node_t *node, uint64_t offset, uint32_t size, uint8_t *buff
 		uint32_t ret = node->write(node, offset, size, buffer);
 		return ret;
 	} else {
-		return -EINVAL;
+		return -EROFS;
 	}
 }
 
@@ -469,7 +469,7 @@ int mkdir_fs(char *name, uint16_t permission) {
 	if (parent->mkdir) {
 		ret = parent->mkdir(parent, f_path, permission);
 	} else {
-		ret = -EINVAL;
+		ret = -EROFS;
 	}
 
 	free(path);