static struct file_operations yaffs_file_operations = {
-#if CONFIG_YAFFS_USE_GENERIC_RW
+#ifdef CONFIG_YAFFS_USE_GENERIC_RW
read: generic_file_read,
write: generic_file_write,
#else
T((KERN_DEBUG"yaffs_commit_write returning %d\n",nWritten));
- return nWritten /* != nBytes ? -ENOMEM : 0 */ ;
+ return nWritten;
}
}
+
static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, loff_t *pos)
{
yaffs_Object *obj;
}
}
- return nWritten;
+ return nWritten != n ? -ENOSPC : nWritten;
}