Introduce EXT4_BLOCK_ZERO macro to initialize ext4_block
[lwext4.git] / lwext4 / ext4_xattr.h
index f03bae3383064902df84e8054543654d3c5ba37b..46df6f56ac7db29f8f24b03771edd57cac0162f3 100644 (file)
@@ -46,25 +46,28 @@ int ext4_fs_get_xattr_ref(struct ext4_fs *fs, struct ext4_inode_ref *inode_ref,
 void ext4_fs_put_xattr_ref(struct ext4_xattr_ref *ref);
 
 int ext4_fs_set_xattr(struct ext4_xattr_ref *ref, uint8_t name_index,
-                     char *name, size_t name_len, void *data, size_t data_size,
-                     bool replace);
+                     const char *name, size_t name_len, const void *data,
+                     size_t data_size, bool replace);
 
 int ext4_fs_remove_xattr(struct ext4_xattr_ref *ref, uint8_t name_index,
-                        char *name, size_t name_len);
+                        const char *name, size_t name_len);
 
 int ext4_fs_get_xattr(struct ext4_xattr_ref *ref, uint8_t name_index,
-                     char *name, size_t name_len, void *buf, size_t buf_size,
-                     size_t *size_got);
+                     const char *name, size_t name_len, void *buf,
+                     size_t buf_size, size_t *data_size);
 
 void ext4_fs_xattr_iterate(struct ext4_xattr_ref *ref,
-                          int(iter)(struct ext4_xattr_ref *ref,
+                          int (*iter)(struct ext4_xattr_ref *ref,
                                     struct ext4_xattr_item *item));
 
 void ext4_fs_xattr_iterate_reset(struct ext4_xattr_ref *ref);
 
-char *ext4_extract_xattr_name(char *full_name, size_t full_name_len,
+const char *ext4_extract_xattr_name(const char *full_name, size_t full_name_len,
                              uint8_t *name_index, size_t *name_len);
 
+const char *ext4_get_xattr_name_prefix(uint8_t name_index,
+                                       size_t *ret_prefix_len);
+
 #endif
 /**
  * @}