1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[iso] align to proposed libcdio fixes

This commit is contained in:
Pete Batard 2012-01-24 11:35:42 +00:00
parent ff070755d5
commit f55f31a166
5 changed files with 18 additions and 30 deletions

View file

@ -71,18 +71,6 @@ const char *psz_extract_dir = "D:/tmp/iso";
// TODO: Unicode support, timestamp preservation // TODO: Unicode support, timestamp preservation
static void udf_print_file_info(const udf_dirent_t *p_udf_dirent, const char* psz_dirname)
{
time_t mod_time = udf_get_modification_time(p_udf_dirent);
char psz_mode[11] = "invalid";
const char *psz_fname = psz_dirname?psz_dirname:udf_get_filename(p_udf_dirent);
/* Print directory attributes*/
uprintf("%s %4d %lu %s %s", udf_mode_string(udf_get_posix_filemode(p_udf_dirent), psz_mode),
udf_get_link_count(p_udf_dirent), (long unsigned int)udf_get_file_length(p_udf_dirent),
(*psz_fname?psz_fname:"/"), ctime(&mod_time));
}
static int udf_extract_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const char *psz_path) static int udf_extract_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const char *psz_path)
{ {
FILE *fd = NULL; FILE *fd = NULL;

View file

@ -727,14 +727,14 @@ struct udf_file_entry_s
udf_Uint64_t unique_ID; udf_Uint64_t unique_ID;
udf_Uint32_t i_extended_attr; udf_Uint32_t i_extended_attr;
udf_Uint32_t i_alloc_descs; udf_Uint32_t i_alloc_descs;
// udf_Uint8_t ext_attr[0]; /* The following union allows file entry reuse without worrying
/* This may look wasteful, but if we didn't do it here, an UDF block about overflows, by ensuring the struct is always the
would still need to be allocated for each fe before truncation. maximum possible size allowed by the specs: one UDF block. */
This also allows updates without worrying about overflows, as the union {
specs states that a file entry cannot be larger than a block */ udf_Uint8_t ext_attr[0];
// TODO: use an union with padding to UDF_BLOCKSIZE (2048) udf_Uint8_t alloc_descs[0];
// Also, define UDF_BLOCKSIZE in this file udf_Uint8_t pad_to_one_block[2048-176];
udf_Uint8_t ext_attr_alloc_descs[2048-176]; } u;
} GNUC_PACKED; } GNUC_PACKED;
typedef struct udf_file_entry_s udf_file_entry_t; typedef struct udf_file_entry_s udf_file_entry_t;

View file

@ -34,7 +34,7 @@
#define CEILING(x, y) ((x+(y-1))/y) #define CEILING(x, y) ((x+(y-1))/y)
#define GETICB(offset) \ #define GETICB(offset) \
&p_udf_fe->ext_attr_alloc_descs[offset] &p_udf_fe->u.alloc_descs[offset]
const char * const char *
udf_get_filename(const udf_dirent_t *p_udf_dirent) udf_get_filename(const udf_dirent_t *p_udf_dirent)

View file

@ -167,7 +167,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
{ {
/* The allocation descriptor field is filled with short_ad's. */ /* The allocation descriptor field is filled with short_ad's. */
udf_short_ad_t *p_ad = (udf_short_ad_t *) udf_short_ad_t *p_ad = (udf_short_ad_t *)
(p_udf_fe->ext_attr_alloc_descs + p_udf_fe->i_extended_attr); (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
*start = uint32_from_le(p_ad->pos); *start = uint32_from_le(p_ad->pos);
*end = *start + *end = *start +
@ -179,7 +179,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
{ {
/* The allocation descriptor field is filled with long_ad's */ /* The allocation descriptor field is filled with long_ad's */
udf_long_ad_t *p_ad = (udf_long_ad_t *) udf_long_ad_t *p_ad = (udf_long_ad_t *)
(p_udf_fe->ext_attr_alloc_descs + p_udf_fe->i_extended_attr); (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
*start = uint32_from_le(p_ad->loc.lba); /* ignore partition number */ *start = uint32_from_le(p_ad->loc.lba); /* ignore partition number */
*end = *start + *end = *start +
@ -190,7 +190,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
case ICBTAG_FLAG_AD_EXTENDED: case ICBTAG_FLAG_AD_EXTENDED:
{ {
udf_ext_ad_t *p_ad = (udf_ext_ad_t *) udf_ext_ad_t *p_ad = (udf_ext_ad_t *)
(p_udf_fe->ext_attr_alloc_descs + p_udf_fe->i_extended_attr); (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
*start = uint32_from_le(p_ad->ext_loc.lba); /* ignore partition number */ *start = uint32_from_le(p_ad->ext_loc.lba); /* ignore partition number */
*end = *start + *end = *start +

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 278 IDD_DIALOG DIALOGEX 12, 12, 206, 278
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.0.7.143" CAPTION "Rufus v1.0.7.144"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,236,50,14 DEFPUSHBUTTON "Start",IDC_START,94,236,50,14
@ -70,7 +70,7 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL,
"SysLink",WS_TABSTOP,46,47,114,9 "SysLink",WS_TABSTOP,46,47,114,9
LTEXT "Version 1.0.7 (Build 143)",IDC_STATIC,46,19,78,8 LTEXT "Version 1.0.7 (Build 144)",IDC_STATIC,46,19,78,8
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
@ -208,8 +208,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,7,143 FILEVERSION 1,0,7,144
PRODUCTVERSION 1,0,7,143 PRODUCTVERSION 1,0,7,144
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -226,13 +226,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "akeo.ie" VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.0.7.143" VALUE "FileVersion", "1.0.7.144"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.0.7.143" VALUE "ProductVersion", "1.0.7.144"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"