336 |
336 |
struct HCHead *head;
|
337 |
337 |
struct HCLeaf *item;
|
338 |
338 |
struct dirent *den;
|
339 |
|
int desc = 0;
|
|
339 |
size_t desc = 0;
|
340 |
340 |
|
341 |
341 |
if (hc == NULL || hc->host == NULL)
|
342 |
342 |
return(opendir(path));
|
... | ... | |
355 |
355 |
}
|
356 |
356 |
}
|
357 |
357 |
if (hcc_get_descriptor(hc, desc, HC_DESC_DIR)) {
|
358 |
|
fprintf(stderr, "hc_opendir: remote reused active descriptor %d\n",
|
|
358 |
fprintf(stderr, "hc_opendir: remote reused active descriptor %zd\n",
|
359 |
359 |
desc);
|
360 |
360 |
return(NULL);
|
361 |
361 |
}
|
... | ... | |
406 |
406 |
return(readdir(dir));
|
407 |
407 |
|
408 |
408 |
trans = hcc_start_command(hc, HC_READDIR);
|
409 |
|
hcc_leaf_int32(trans, LC_DESCRIPTOR, (int)dir);
|
|
409 |
hcc_leaf_int32(trans, LC_DESCRIPTOR, (size_t)dir);
|
410 |
410 |
if ((head = hcc_finish_command(trans)) == NULL)
|
411 |
411 |
return(NULL);
|
412 |
412 |
if (head->error)
|
413 |
413 |
return(NULL); /* XXX errno */
|
414 |
|
den = hcc_get_descriptor(hc, (int)dir, HC_DESC_DIR);
|
|
414 |
den = hcc_get_descriptor(hc, (size_t)dir, HC_DESC_DIR);
|
415 |
415 |
if (den == NULL)
|
416 |
416 |
return(NULL); /* XXX errno */
|
417 |
417 |
if (den->d_name)
|
... | ... | |
476 |
476 |
|
477 |
477 |
if (hc == NULL || hc->host == NULL)
|
478 |
478 |
return(closedir(dir));
|
479 |
|
den = hcc_get_descriptor(hc, (int)dir, HC_DESC_DIR);
|
|
479 |
den = hcc_get_descriptor(hc, (size_t)dir, HC_DESC_DIR);
|
480 |
480 |
if (den) {
|
481 |
481 |
free(den);
|
482 |
|
hcc_set_descriptor(hc, (int)dir, NULL, HC_DESC_DIR);
|
|
482 |
hcc_set_descriptor(hc, (size_t)dir, NULL, HC_DESC_DIR);
|
483 |
483 |
|
484 |
484 |
trans = hcc_start_command(hc, HC_CLOSEDIR);
|
485 |
|
hcc_leaf_int32(trans, LC_DESCRIPTOR, (int)dir);
|
|
485 |
hcc_leaf_int32(trans, LC_DESCRIPTOR, (size_t)dir);
|
486 |
486 |
if ((head = hcc_finish_command(trans)) == NULL)
|
487 |
487 |
return(-1);
|
488 |
488 |
if (head->error)
|
489 |
|
-- cpdup-1.11/cpdup.c.explicit_sizes 2008-05-24 13:21:36.000000000 -0400
|
|
489 |
++ cpdup-1.11/cpdup.c 2008-06-11 14:49:59.000000000 -0400
|
... | ... | |
304 |
304 |
* make any required connections.
|
305 |
305 |
*/
|
306 |
306 |
if (src && (ptr = strchr(src, ':')) != NULL) {
|
307 |
|
asprintf(&SrcHost.host, "%*.*s", ptr - src, ptr - src, src);
|
|
307 |
asprintf(&SrcHost.host, "%*.*s", (int)(ptr - src), (int)(ptr - src), src);
|
308 |
308 |
src = ptr + 1;
|
309 |
309 |
if (UseCpFile) {
|
310 |
310 |
fprintf(stderr, "The cpignore options are not currently supported for remote sources\n");
|
... | ... | |
318 |
318 |
exit(1);
|
319 |
319 |
}
|
320 |
320 |
if (dst && (ptr = strchr(dst, ':')) != NULL) {
|
321 |
|
asprintf(&DstHost.host, "%*.*s", ptr - dst, ptr - dst, dst);
|
|
321 |
asprintf(&DstHost.host, "%*.*s", (int)(ptr - dst), (int)(ptr - dst), dst);
|
322 |
322 |
dst = ptr + 1;
|
323 |
323 |
if (UseFSMIDOpt) {
|
324 |
324 |
fprintf(stderr, "The FSMID options are not currently supported for remote targets\n");
|
325 |
|
-- cpdup-1.11/fsmid.c.explicit_sizes 2008-05-22 19:05:08.000000000 -0400
|
|
325 |
++ cpdup-1.11/fsmid.c 2008-06-11 15:07:50.000000000 -0400
|
... | ... | |
35 |
35 |
|
36 |
36 |
for (node = FSMIDBase; node; node = node->fid_Next) {
|
37 |
37 |
if (node->fid_Accessed && node->fid_Code) {
|
38 |
|
fprintf(fo, "%016llx %d %s\n",
|
39 |
|
node->fid_Code,
|
|
38 |
fprintf(fo, "%016llx %zd %s\n",
|
|
39 |
(long long unsigned)node->fid_Code,
|
40 |
40 |
strlen(node->fid_Name),
|
41 |
41 |
node->fid_Name
|
42 |
42 |
);
|