[BusyBox] minor bug in CVS checkout

Paul van Gool paul.vangool at rinconnetworks.com
Thu Dec 4 23:09:58 UTC 2003


Hi,

I checked out a copy of busybox last week (1.00pre3) and found a bug that
only accours if you enable 'ar' but disable 'tar', 'dpkg', and 'cpio'.

Busybody then uses data_extract_regular_file() in archival/ar.c. That fails
to compile. The following diff is needed for it to compile:

@@ -57,11 +57,11 @@ static void data_extract_regular_file(ar
        file_header_t *file_header;
        int dst_fd;
 
        file_header = archive_handle->file_header;
        dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT);
-       bb_copyfd_eof(archive_handle->src_fd, dst_fd, file_header->size);
+       bb_copyfd_size(archive_handle->src_fd, dst_fd, file_header->size);
        close(dst_fd);
 
        chmod(file_header->name, file_header->mode);
        chown(file_header->name, file_header->uid, file_header->gid);

I checked CVS just now and didn't see a fix for it yet.

Thanks.

Paul
-- 
Paul van Gool                                               Rincon Networks
paul.vangool at rinconnetworks.com                              (805)-705-1442



More information about the busybox mailing list