diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-02-11 22:47:57 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-02-11 22:47:57 +0200 |
commit | 7c5fda3fbada772e53e0c347621921a8111738c0 (patch) | |
tree | 035e80cc2e1b51b253f8416637ccc06163fa0646 /src | |
parent | 06bbe2bcfd87eab1217d37925ffcc6639b346809 (diff) | |
download | cpio-7c5fda3fbada772e53e0c347621921a8111738c0.tar.gz cpio-7c5fda3fbada772e53e0c347621921a8111738c0.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/copyin.c | 8 | ||||
-rw-r--r-- | src/copyout.c | 4 | ||||
-rw-r--r-- | src/copypass.c | 2 | ||||
-rw-r--r-- | src/extern.h | 6 | ||||
-rw-r--r-- | src/util.c | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/src/copyin.c b/src/copyin.c index fb591fc..2db6bb3 100644 --- a/src/copyin.c +++ b/src/copyin.c @@ -258,7 +258,7 @@ create_defered_links (struct cpio_file_stat *file_hdr) { struct deferment *d; struct deferment *d_prev; - int ino; + ino_t ino; int maj; int min; int link_res; @@ -306,7 +306,7 @@ create_defered_links_to_skipped (struct cpio_file_stat *file_hdr, { struct deferment *d; struct deferment *d_prev; - int ino; + ino_t ino; int maj; int min; if (file_hdr->c_filesize == 0) @@ -1460,8 +1460,8 @@ process_copy_in () 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); diff --git a/src/copyout.c b/src/copyout.c index ebfc263..7e6b624 100644 --- a/src/copyout.c +++ b/src/copyout.c @@ -110,7 +110,7 @@ static int 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 @@ writeout_other_defers (struct cpio_file_stat *file_hdr, int out_des) { struct deferment *d; struct deferment *d_prev; - int ino; + ino_t ino; int maj; int min; ino = file_hdr->c_ino; diff --git a/src/copypass.c b/src/copypass.c index 2a08a66..ab44c20 100644 --- a/src/copypass.c +++ b/src/copypass.c @@ -387,7 +387,7 @@ process_copy_pass () 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; diff --git a/src/extern.h b/src/extern.h index 142a567..a2a08b7 100644 --- a/src/extern.h +++ b/src/extern.h @@ -119,7 +119,7 @@ void process_copy_out (void); /* 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 */ @@ -169,9 +169,9 @@ void warn_if_file_changed (char *file_name, off_t old_file_size, 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); @@ -686,7 +686,7 @@ prepare_append (int out_file_des) struct inode_val { - unsigned long inode; + ino_t inode; unsigned long major_num; unsigned long minor_num; char *file_name; @@ -713,7 +713,7 @@ inode_val_compare (const void *val1, const void *val2) } 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; @@ -732,7 +732,7 @@ find_inode_file (unsigned long node_num, unsigned long major_num, /* 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; |