commit 7c5fda3fbada772e53e0c347621921a8111738c0
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Feb 11 22:47:57 2010 +0200

    Fix inode number typing.
    
    * src/copyin.c (create_defered_links): Use ino_t for
    inode numbers.
    (create_defered_links_to_skipped): Likewise.
    (process_copy_in): Add typecast to inode fprintf argument.
    * src/copyout.c (count_defered_links_to_dev_ino)
    (writeout_other_defers): Use ino_t for inode numbers.
    * src/copypass.c (link_to_maj_min_ino): Likewise.
    * src/util.c (struct inode_val): Likewise.
    (find_inode_file, add_inode): Likewise.
    * src/extern.h (link_to_maj_min_ino)
    (find_inode_file, add_inode): Change signature.

Index: cpio-2.9/src/copyin.c
===================================================================
--- cpio-2.9.orig/src/copyin.c	2011-07-13 14:17:44.751735011 +0200
+++ cpio-2.9/src/copyin.c	2011-07-13 14:17:44.767735575 +0200
@@ -258,7 +258,7 @@
 {
   struct deferment *d;
   struct deferment *d_prev;
-  int	ino;
+  ino_t	ino;
   int 	maj;
   int   min;
   int 	link_res;
@@ -306,7 +306,7 @@
 {
   struct deferment *d;
   struct deferment *d_prev;
-  int	ino;
+  ino_t	ino;
   int 	maj;
   int   min;
   if (file_hdr->c_filesize == 0)
@@ -1438,8 +1438,8 @@
 	  struct cpio_file_stat *h;
 	  h = &file_hdr;
 	  fprintf (stderr, 
-		"magic = 0%o, ino = %d, mode = 0%o, uid = %d, gid = %d\n",
-		h->c_magic, h->c_ino, h->c_mode, h->c_uid, h->c_gid);
+		"magic = 0%o, ino = %ld, mode = 0%o, uid = %d, gid = %d\n",
+		h->c_magic, (long)h->c_ino, h->c_mode, h->c_uid, h->c_gid);
 	  fprintf (stderr, 
 		"nlink = %d, mtime = %d, filesize = %d, dev_maj = 0x%x\n",
 		h->c_nlink, h->c_mtime, h->c_filesize, h->c_dev_maj);
Index: cpio-2.9/src/copyout.c
===================================================================
--- cpio-2.9.orig/src/copyout.c	2007-06-28 10:54:43.000000000 +0200
+++ cpio-2.9/src/copyout.c	2011-07-13 14:17:44.768735610 +0200
@@ -110,7 +110,7 @@
 count_defered_links_to_dev_ino (struct cpio_file_stat *file_hdr)
 {
   struct deferment *d;
-  int	ino;
+  ino_t	ino;
   int 	maj;
   int   min;
   int 	count;
@@ -167,7 +167,7 @@
 {
   struct deferment *d;
   struct deferment *d_prev;
-  int	ino;
+  ino_t	ino;
   int 	maj;
   int   min;
   ino = file_hdr->c_ino;
Index: cpio-2.9/src/copypass.c
===================================================================
--- cpio-2.9.orig/src/copypass.c	2011-07-13 14:17:44.653731556 +0200
+++ cpio-2.9/src/copypass.c	2011-07-13 14:17:44.768735610 +0200
@@ -385,7 +385,7 @@
 
 int
 link_to_maj_min_ino (char *file_name, int st_dev_maj, int st_dev_min,
-		     int st_ino)
+		     ino_t st_ino)
 {
   int	link_res;
   char *link_name;
Index: cpio-2.9/src/extern.h
===================================================================
--- cpio-2.9.orig/src/extern.h	2011-07-13 14:17:44.653731556 +0200
+++ cpio-2.9/src/extern.h	2011-07-13 14:17:44.768735610 +0200
@@ -120,7 +120,7 @@
 /* copypass.c */
 void process_copy_pass (void);
 int link_to_maj_min_ino (char *file_name, int st_dev_maj, 
-			 int st_dev_min, int st_ino);
+			 int st_dev_min, ino_t st_ino);
 int link_to_name (char *link_name, char *link_target);
 
 /* dirname.c */
@@ -170,9 +170,9 @@
                            time_t old_file_mtime);
 void create_all_directories (char *name);
 void prepare_append (int out_file_des);
-char *find_inode_file (unsigned long node_num,
+char *find_inode_file (ino_t node_num,
 		       unsigned long major_num, unsigned long minor_num);
-void add_inode (unsigned long node_num, char *file_name,
+void add_inode (ino_t node_num, char *file_name,
 	        unsigned long major_num, unsigned long minor_num);
 int open_archive (char *file);
 void tape_offline (int tape_des);
Index: cpio-2.9/src/util.c
===================================================================
--- cpio-2.9.orig/src/util.c	2011-07-13 14:17:44.670732155 +0200
+++ cpio-2.9/src/util.c	2011-07-13 14:17:44.769735646 +0200
@@ -691,7 +691,7 @@
 
 struct inode_val
 {
-  unsigned long inode;
+  ino_t inode;
   unsigned long major_num;
   unsigned long minor_num;
   char *file_name;
@@ -718,7 +718,7 @@
 }
 
 char *
-find_inode_file (unsigned long node_num, unsigned long major_num,
+find_inode_file (ino_t node_num, unsigned long major_num,
 		 unsigned long minor_num)
 {
   struct inode_val sample;
@@ -737,7 +737,7 @@
 /* Associate FILE_NAME with the inode NODE_NUM.  (Insert into hash table.)  */
 
 void
-add_inode (unsigned long node_num, char *file_name, unsigned long major_num,
+add_inode (ino_t node_num, char *file_name, unsigned long major_num,
 	   unsigned long minor_num)
 {
   struct inode_val *temp;
