~ubuntu-branches/ubuntu/utopic/libisofs/utopic

« back to all changes in this revision

Viewing changes to libisofs/hfsplus.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2014-01-13 13:44:08 UTC
  • mfrom: (0.1.18) (9.1.17 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140113134408-o3ya40g619yz0n02
Tags: 1.3.4-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        return ISO_SUCCESS;
129
129
    }
130
130
 
131
 
    ret = str2ucs(t->input_charset, name, &ucs_name);
 
131
    ret = str2utf16be(t->input_charset, name, &ucs_name);
132
132
    if (ret < 0) {
133
133
        iso_msg_debug(t->image->id, "Can't convert %s", name);
134
134
        return ret;
477
477
int hfsplus_writer_compute_data_blocks(IsoImageWriter *writer)
478
478
{
479
479
    Ecma119Image *t;
480
 
    uint32_t i, link_blocks, hfsp_curblock;
481
 
    uint32_t block_fac, cat_node_size, block_size;
 
480
    uint32_t i, hfsp_curblock;
 
481
    uint32_t block_fac, block_size;
482
482
 
483
483
    if (writer == NULL) {
484
484
        return ISO_OUT_OF_MEM;
487
487
    t = writer->target;
488
488
    block_size = t->hfsp_block_size;
489
489
    block_fac = t->hfsp_iso_block_fac;
490
 
    cat_node_size = t->hfsp_cat_node_size;
491
490
 
492
491
    iso_msg_debug(t->image->id, "(b) curblock=%d, nodes =%d", t->curblock, t->hfsp_nnodes);
493
492
    t->hfsp_part_start = t->curblock * block_fac;
500
499
    t->hfsp_catalog_file_start = hfsp_curblock;
501
500
 
502
501
/* 
503
 
    hfsp_curblock += (t->hfsp_nnodes * cat_node_size + block_size - 1) / block_size;
 
502
    hfsp_curblock += (t->hfsp_nnodes * t->hfsp_cat_node_size + block_size - 1) / block_size;
504
503
*/
505
504
    hfsp_curblock += 2 * t->hfsp_nnodes;
506
505
 
509
508
 
510
509
    iso_msg_debug(t->image->id, "(d) hfsp_curblock=%d, nodes =%d", hfsp_curblock, t->hfsp_nnodes);
511
510
 
512
 
    link_blocks = 0;
513
511
    for (i = 0; i < t->hfsp_nleafs; i++)
514
512
      if (t->hfsp_leafs[i].unix_type == UNIX_SYMLINK)
515
513
        {
1227
1225
    char *orig_dest, *orig_start, *orig_end;
1228
1226
    char *hfsp_dest, *hfsp_start, *hfsp_end;
1229
1227
    int ret = 0;
1230
 
    unsigned int comp_len, orig_len, hfsp_len, hfsp_comp_len;
 
1228
    unsigned int comp_len, orig_len, hfsp_len;
1231
1229
 
1232
1230
    if (target->hfsp_leafs[link_idx].node->type != LIBISO_SYMLINK)
1233
1231
        return ISO_SUCCESS;
1271
1269
        hfsp_end = strchr(hfsp_start, '/');
1272
1270
        if (hfsp_end == NULL)
1273
1271
            hfsp_end = hfsp_start + strlen(hfsp_start);
1274
 
        hfsp_comp_len = hfsp_end - hfsp_start;
1275
1272
 
1276
1273
        if (comp_len == 0 || (comp_len == 1 && orig_start[0] == '.'))
1277
1274
   continue;