SOURCES: cpio-lfs.patch - updated (see bugzilla.redhat.com #144688).

pluto pluto at pld-linux.org
Tue Sep 27 01:32:12 CEST 2005


Author: pluto                        Date: Mon Sep 26 23:32:12 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated (see bugzilla.redhat.com #144688).

---- Files affected:
SOURCES:
   cpio-lfs.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/cpio-lfs.patch
diff -u SOURCES/cpio-lfs.patch:1.1 SOURCES/cpio-lfs.patch:1.2
--- SOURCES/cpio-lfs.patch:1.1	Sun Jan  9 16:26:00 2005
+++ SOURCES/cpio-lfs.patch	Tue Sep 27 01:32:07 2005
@@ -1,5 +1,50 @@
 --- cpio-2.6/src/util.c.orig	2004-09-08 12:44:49.000000000 +0200
 +++ cpio-2.6/src/util.c	2005-01-09 02:32:52.642458816 +0100
+@@ -207,7 +207,7 @@
+    Exit with an error if end of file is reached.  */
+ 
+ static int
+-disk_fill_input_buffer (int in_des, int num_bytes)
++disk_fill_input_buffer (int in_des, off_t num_bytes)
+ {
+   in_buff = input_buffer;
+   num_bytes = (num_bytes < DISK_IO_BLOCK_SIZE) ? num_bytes : DISK_IO_BLOCK_SIZE;
+@@ -227,9 +227,9 @@
+    When `out_buff' fills up, flush it to file descriptor OUT_DES.  */
+ 
+ void
+-tape_buffered_write (char *in_buf, int out_des, long num_bytes)
++tape_buffered_write (char *in_buf, int out_des, off_t num_bytes)
+ {
+-  register long bytes_left = num_bytes;	/* Bytes needing to be copied.  */
++  register off_t bytes_left = num_bytes;	/* Bytes needing to be copied.  */
+   register long space_left;	/* Room left in output buffer.  */
+ 
+   while (bytes_left > 0)
+@@ -254,9 +254,9 @@
+    When `out_buff' fills up, flush it to file descriptor OUT_DES.  */
+ 
+ void
+-disk_buffered_write (char *in_buf, int out_des, long num_bytes)
++disk_buffered_write (char *in_buf, int out_des, off_t num_bytes)
+ {
+-  register long bytes_left = num_bytes;	/* Bytes needing to be copied.  */
++  register off_t bytes_left = num_bytes;	/* Bytes needing to be copied.  */
+   register long space_left;	/* Room left in output buffer.  */
+ 
+   while (bytes_left > 0)
+@@ -407,9 +407,9 @@
+ write_nuls_to_file (long num_bytes, int out_des, 
+                     void (*writer) (char *in_buf, int out_des, long num_bytes))
+ {
+-  long	blocks;
++  off_t	blocks;
+   long	extra_bytes;
+-  long	i;
++  off_t	i;
+ 
+   blocks = num_bytes / 512;
+   extra_bytes = num_bytes % 512;
 @@ -428,10 +428,10 @@
     NUM_BYTES is the number of bytes to copy.  */
  
@@ -32,6 +77,19 @@
  
    original_num_bytes = num_bytes;
  
+@@ -476,10 +476,10 @@
+ 	  num_bytes : DISK_IO_BLOCK_SIZE))
+ 	  {
+ 	    if (rc > 0)
+-	      error (0, 0, _("File %s shrunk by %ld bytes, padding with zeros"),
++	      error (0, 0, _("File %s shrunk by %lld bytes, padding with zeros"),
+ 				filename, num_bytes);
+ 	    else
+-	      error (0, 0, _("Read error at byte %ld in file %s, padding with zeros"),
++	      error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
+ 			original_num_bytes - num_bytes, filename);
+ 	    write_nuls_to_file (num_bytes, out_des, tape_buffered_write);
+ 	    break;
 @@ -505,12 +505,12 @@
     NUM_BYTES is the number of bytes to copy.  */
  
@@ -49,9 +107,27 @@
    int rc;
  
    original_num_bytes = num_bytes;
+@@ -520,10 +520,10 @@
+ 	if (rc = disk_fill_input_buffer (in_des, num_bytes))
+ 	  {
+ 	    if (rc > 0)
+-	      error (0, 0, _("File %s shrunk by %ld bytes, padding with zeros"),
++	      error (0, 0, _("File %s shrunk by %lld bytes, padding with zeros"),
+ 				filename, num_bytes);
+ 	    else
+-	      error (0, 0, _("Read error at byte %ld in file %s, padding with zeros"),
++	      error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
+ 			original_num_bytes - num_bytes, filename);
+ 	    write_nuls_to_file (num_bytes, out_des, disk_buffered_write);
+ 	    break;
 --- cpio-2.6/src/extern.h.lfs	2004-10-14 16:18:34.000000000 -0500
 +++ cpio-2.6/src/extern.h	2004-10-14 16:20:43.000000000 -0500
-@@ -164,9 +164,9 @@
+@@ -161,13 +161,13 @@
+ void tape_empty_output_buffer P_((int out_des));
+ void disk_empty_output_buffer P_((int out_des));
+ void swahw_array P_((char *ptr, int count));
+-void tape_buffered_write P_((char *in_buf, int out_des, long num_bytes));
++void tape_buffered_write P_((char *in_buf, int out_des, off_t num_bytes));
  void tape_buffered_read P_((char *in_buf, int in_des, long num_bytes));
  int tape_buffered_peek P_((char *peek_buf, int in_des, int num_bytes));
  void tape_toss_input P_((int in_des, long num_bytes));
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/cpio-lfs.patch?r1=1.1&r2=1.2&f=u




More information about the pld-cvs-commit mailing list