+
+/**
+ * Write data to the block device.
+ *
+ * This function will write \a size bytes to block \a idx starting at
+ * address \a offset inside the block.
+ *
+ * \note Partial block writes are supported only if the device is opened in
+ * buffered mode. You can use kblock_buffered() to check if the device
+ * has an internal cache or not.
+ *
+ * \note If the device is opened in buffered mode, this function will use
+ * efficiently and trasparently the cache provided.
+ * In order to be sure that all modifications are actually written
+ * to the device you have to call kblock_flush().
+ *
+ * \param b KBlock device.
+ * \param idx the block number where you want to write.
+ * \param buf a pointer to the data to be written.
+ * \param offset the offset inside the block from which data writing will start.
+ * \param size the size of data to be written.
+ *
+ * \return the number of bytes written.
+ *
+ * \sa kblock_read(), kblock_flush(), kblock_buffered().
+ */