diff options
| -rw-r--r-- | packer/rdar.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/packer/rdar.c b/packer/rdar.c index ba67c69..1b7c9ce 100644 --- a/packer/rdar.c +++ b/packer/rdar.c @@ -48,7 +48,7 @@ struct idata_desc; * XXX: We encode it as a U16 so that we may bundle it * with the file data as binary. */ -#define RDAR_VERSION VERSION_U16(1, 0) /* v1.0 */ +#define RDAR_VERSION VERSION_U16(1, 1) /* v1.1 */ /* Fallback path if '-o' is not specified */ #define FALLBACK_OUTPUT_PATH "out.rdar" @@ -87,14 +87,16 @@ struct file_view { * file along with an offset to which it is located at * in the offset. * - * @magic: Format magic - * @path: File path - * @off: File data offset - * @flags: File flags - * @length: File length in bytes + * @magic: Format magic + * @desc_size: Data descriptor size + * @path: File path + * @off: File data offset + * @flags: File flags + * @length: File length in bytes */ struct data_desc { char magic[RDAR_MAGIC_LEN]; + uint16_t desc_size; char path[RDAR_MAX_PATHLEN]; off_t off; uint16_t flags; @@ -241,6 +243,7 @@ idata_from_file(const char *path, bool is_root) /* Initialize the data descriptor */ data_desc = &idata_desc->data; memcpy(data_desc->magic, RDAR_MAGIC, RDAR_MAGIC_LEN); + data_desc->desc_size = sizeof(struct data_desc); memcpy(data_desc->path, p, strlen(p)); data_desc->path[path_len] = '\0'; data_desc->flags = 0; |
