/* @fh: file handle @attributes: attributes for newly created file Returns: 0 for success  */
static int efi_create_file(struct file_handle *fh, u64 attributes)
/* @fh: file handle @attributes: attributes for newly created file Returns: 0 for success  */
static int efi_create_file(struct file_handle *fh, u64 attributes)
{
	loff_t actwrite;
	void *buffer = &actwrite;
	if (attributes & EFI_FILE_DIRECTORY)
		return fs_mkdir(fh->path);
	else
		return fs_write(fh->path, map_to_sysmem(buffer), 0, 0,
				&actwrite);
}