-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
corrected construction of '..' directory entry
- Loading branch information
Showing
10 changed files
with
243 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/* | ||
* ebiso.c | ||
* | ||
* Version: 0.1.3 | ||
* Version: 0.1.4 | ||
* | ||
* Release date: 21.10.2015 | ||
* Release date: 25.10.2015 | ||
* | ||
* Copyright 2015 Vladimir (sodoma) Gozora <[email protected]> | ||
* | ||
|
@@ -129,6 +129,7 @@ int main(int argc, char *argv[]) { | |
list->dir_id = 1; | ||
list->parent_id = 1; | ||
list->next = (struct file_list_t*) malloc(sizeof(struct file_list_t)); | ||
ISO_data.dir_count = 1; | ||
rr_list = list->next; | ||
memset(rr_list, 0, sizeof(struct file_list_t)); | ||
|
||
|
@@ -162,7 +163,7 @@ int main(int argc, char *argv[]) { | |
} | ||
|
||
/* Create initial file structure */ | ||
if ((rv = list_create(ISO_data.work_dir, &rr_list)) != E_OK) | ||
if ((rv = list_create(ISO_data.work_dir, &rr_list, &ISO_data)) != E_OK) | ||
goto cleanup; | ||
|
||
/* Remove possible duplicates */ | ||
|
@@ -233,11 +234,16 @@ int main(int argc, char *argv[]) { | |
cleanup: | ||
|
||
list_clean(list); | ||
free(terminator); | ||
free(path_table_LSB); | ||
free(path_table_MSB); | ||
free(header); | ||
free(boot_descriptor); | ||
if (terminator != NULL) | ||
free(terminator); | ||
if (path_table_LSB != NULL) | ||
free(path_table_LSB); | ||
if (path_table_MSB != NULL) | ||
free(path_table_MSB); | ||
if (header != NULL) | ||
free(header); | ||
if (boot_descriptor != NULL) | ||
free(boot_descriptor); | ||
|
||
return rv; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/* | ||
* ebiso.h | ||
* | ||
* Version: 0.1.3 | ||
* Version: 0.1.4 | ||
* | ||
* Release date: 21.10.2015 | ||
* Release date: 25.10.2015 | ||
* | ||
* Copyright 2015 Vladimir (sodoma) Gozora <[email protected]> | ||
* | ||
|
@@ -33,7 +33,7 @@ | |
#include <getopt.h> | ||
|
||
#define PROGNAME "ebiso" | ||
#define VERSION "0.1.3" | ||
#define VERSION "0.1.4" | ||
|
||
#ifdef DEBUG | ||
static void disp_level(struct file_list_t *list_to_display, int level); | ||
|
@@ -57,7 +57,7 @@ enum msg_l { | |
|
||
extern void filename_rename_duplicates(struct file_list_t *list); | ||
|
||
extern int list_create(const char *dirname, struct file_list_t **flist); | ||
extern int list_create(const char *dirname, struct file_list_t **flist, struct ISO_data_t *ISO_data); | ||
extern void list_clean(struct file_list_t *list_to_clean); | ||
|
||
extern uint32_t iso9660_header(void **header, struct file_list_t file_list, struct ISO_data_t ISO_data); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/* | ||
* globals.h | ||
* | ||
* Version: 0.4.0 | ||
* Version: 0.4.1 | ||
* | ||
* Release date: 20.10.2015 | ||
* Release date: 25.10.2015 | ||
* | ||
* Copyright 2015 Vladimir (sodoma) Gozora <[email protected]> | ||
* | ||
|
@@ -44,8 +44,9 @@ | |
#define PT_RECORD_LEN 0x8 | ||
#define ARR_PREALLOC 20 | ||
#define RRIP_INIT_FIELDS rrip_RR | rrip_PX | rrip_TF | rrip_NM | ||
//#define RRIP_INIT_FIELDS rrip_RR | rrip_PX | rrip_TF | ||
//#define RRIP_INIT_FIELDS rrip_RR | ||
//#define RRIP_INIT_FIELDS rrip_NM | ||
//#define RRIP_INIT_FIELDS rrip_TF | rrip_PX | ||
|
||
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/* | ||
* iso9660.h | ||
* | ||
* Version: 0.2.0 | ||
* Version: 0.2.1 | ||
* | ||
* Release date: 20.10.2015 | ||
* Release date: 25.10.2015 | ||
* | ||
* Copyright 2015 Vladimir (sodoma) Gozora <[email protected]> | ||
* | ||
|
@@ -47,9 +47,19 @@ enum rrip_fields_t { | |
rrip_NM = 1 << 4 | ||
} rrip_fields_t; | ||
|
||
struct iso9660_data_t { | ||
char mdate_time[7]; | ||
uint64_t LBA; | ||
uint64_t data_len; | ||
uint32_t volume_seq_number; | ||
uint8_t flags; | ||
uint8_t name_len; | ||
uint8_t ext_attr_record; | ||
} iso9660_data_t; | ||
|
||
extern int option_on_off(uint32_t option2check, enum opt_l option); | ||
extern int write_files(struct file_list_t *file_list, FILE *dest); | ||
extern struct file_list_t *list_search(struct file_list_t *file_list, char *needle); | ||
extern struct file_list_t *list_search_name(struct file_list_t *file_list, char *needle); | ||
extern int CE_assign_LBA(struct CE_list_t *CE_list, struct file_list_t *file_list, uint32_t *LBA); | ||
extern int CEarr_init_list(struct CE_list_t *CE_list, int arr_prealloc); | ||
extern void CEarr_destroy_list(struct CE_list_t *CE_list); | ||
|
@@ -65,7 +75,8 @@ uint8_t do_pad(uint8_t len, enum pad_list_t type); | |
/* el_torito.c */ | ||
void iso9660_cp2heap(void **dest, const void *source, long int size, uint32_t *dest_size); | ||
|
||
static uint32_t construct_dir_record(struct file_list_t *file_list, void **directory_table_output, enum segment_list_t type); | ||
static uint32_t construct_dir_record(struct file_list_t *file_list, struct file_list_t **parent_index, void **directory_table_output, enum segment_list_t type); | ||
static int construct_iso9660_record(void **output, struct iso9660_data_t data, uint32_t *size); | ||
static uint64_t get_int32_LSB_MSB(uint64_t input); | ||
static uint32_t get_int16_LSB_MSB(uint32_t input); | ||
static int blocks_count(int size); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/* | ||
* list.h | ||
* | ||
* Version: 0.1.1 | ||
* Version: 0.1.2 | ||
* | ||
* Release date: 20.09.2015 | ||
* Release date: 25.09.2015 | ||
* | ||
* Copyright 2015 Vladimir (sodoma) Gozora <[email protected]> | ||
* | ||
|
@@ -30,9 +30,8 @@ | |
extern uint8_t filename_convert_name(char *input, char *output, enum conv_type_l type); | ||
|
||
/* ebiso.c */ | ||
int list_create(const char *dirname, struct file_list_t **flist); | ||
int list_create(const char *dirname, struct file_list_t **flist, struct ISO_data_t *ISO_data); | ||
void list_clean(struct file_list_t *list_to_clean); | ||
|
||
/* iso9660.c */ | ||
struct file_list_t *list_search(struct file_list_t *file_list, char *needle); | ||
|
||
struct file_list_t *list_search_name(struct file_list_t *file_list, char *needle); |
Oops, something went wrong.