From 09564691509d8f0992857937cad0f2a2cc9a6e4e Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Wed, 13 Mar 2019 19:43:25 +0200 Subject: [PATCH] abolish ino32_t all processes already have 64-bit inodes --- include/protocols/dumprestore.h | 2 +- include/sys/dirent.h | 2 +- include/sys/fs/dv_node.h | 2 +- include/sys/fs/sdev_impl.h | 2 +- include/sys/fs/tmpnode.h | 2 +- include/sys/fs/ufs_filio.h | 2 +- include/sys/stat.h | 2 +- include/sys/statfs.h | 4 ++-- include/sys/types32.h | 1 - include/sys/ustat.h | 2 +- kernel/syscall/utssys.c | 2 +- share/man/man3head/types32.h.3head | 2 +- share/man/man4/ufsdump.4 | 4 ++-- usr/src/cmd/backup/dump/dumptape.c | 4 ++-- 14 files changed, 16 insertions(+), 17 deletions(-) diff --git a/include/protocols/dumprestore.h b/include/protocols/dumprestore.h index 29b3b309b7..260639dafc 100644 --- a/include/protocols/dumprestore.h +++ b/include/protocols/dumprestore.h @@ -125,7 +125,7 @@ union u_spcl { time32_t c_ddate; /* date of this dump */ int32_t c_volume; /* dump volume number */ daddr32_t c_tapea; /* logical block of this record */ - ino32_t c_inumber; /* number of inode */ + uint32_t c_inumber; /* number of inode */ int32_t c_magic; /* magic number (see above) */ int32_t c_checksum; /* record checksum */ struct dinode c_dinode; /* ownership and mode of inode */ diff --git a/include/sys/dirent.h b/include/sys/dirent.h index 22d4702a20..4219b2b5f0 100644 --- a/include/sys/dirent.h +++ b/include/sys/dirent.h @@ -53,7 +53,7 @@ typedef struct dirent { /* kernel's view of user ILP32 dirent */ typedef struct dirent32 { - ino32_t d_ino; /* "inode number" of entry */ + ino_t d_ino; /* "inode number" of entry */ off_t d_off; /* offset of disk directory entry */ uint16_t d_reclen; /* length of this record */ char d_name[1]; /* name of file */ diff --git a/include/sys/fs/dv_node.h b/include/sys/fs/dv_node.h index cc888a51fc..b6083a1a79 100644 --- a/include/sys/fs/dv_node.h +++ b/include/sys/fs/dv_node.h @@ -121,7 +121,7 @@ struct devfs_data { /* dv_fid overlays the fid structure (for VFS_VGET) */ struct dv_fid { uint16_t dvfid_len; - ino32_t dvfid_ino; + uint32_t dvfid_ino; int32_t dvfid_gen; }; diff --git a/include/sys/fs/sdev_impl.h b/include/sys/fs/sdev_impl.h index f2a94985fe..7b9156751d 100644 --- a/include/sys/fs/sdev_impl.h +++ b/include/sys/fs/sdev_impl.h @@ -319,7 +319,7 @@ struct sdev_data { */ struct sdev_fid { uint16_t sdevfid_len; - ino32_t sdevfid_ino; + uint32_t sdevfid_ino; int32_t sdevfid_gen; }; diff --git a/include/sys/fs/tmpnode.h b/include/sys/fs/tmpnode.h index b8478c7c8d..5e7e32a80b 100644 --- a/include/sys/fs/tmpnode.h +++ b/include/sys/fs/tmpnode.h @@ -142,7 +142,7 @@ struct tdirent { */ struct tfid { uint16_t tfid_len; - ino32_t tfid_ino; + uint32_t tfid_ino; int32_t tfid_gen; }; diff --git a/include/sys/fs/ufs_filio.h b/include/sys/fs/ufs_filio.h index 127a197217..5126aa10bd 100644 --- a/include/sys/fs/ufs_filio.h +++ b/include/sys/fs/ufs_filio.h @@ -53,7 +53,7 @@ struct fioio { #if defined(_SYSCALL32) struct fioio32 { - ino32_t fio_ino; /* input : inode number */ + ino_t fio_ino; /* input : inode number */ int32_t fio_gen; /* input : generation number */ int32_t fio_fd; /* output: readonly file descriptor */ }; diff --git a/include/sys/stat.h b/include/sys/stat.h index e72ac19656..d65affc5da 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -246,7 +246,7 @@ int lstat64(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD); struct stat32 { dev32_t st_dev; int32_t st_pad1[3]; - ino32_t st_ino; + ino_t st_ino; mode32_t st_mode; nlink32_t st_nlink; uid32_t st_uid; diff --git a/include/sys/statfs.h b/include/sys/statfs.h index 6f3d275d44..87cff18f0f 100644 --- a/include/sys/statfs.h +++ b/include/sys/statfs.h @@ -63,8 +63,8 @@ struct statfs32 { int32_t f_frsize; int32_t f_blocks; int32_t f_bfree; - ino32_t f_files; - ino32_t f_ffree; + ino_t f_files; + ino_t f_ffree; char f_fname[6]; char f_fpack[6]; }; diff --git a/include/sys/types32.h b/include/sys/types32.h index 4d9bd5d692..f30973d423 100644 --- a/include/sys/types32.h +++ b/include/sys/types32.h @@ -46,7 +46,6 @@ extern "C" { */ typedef uint32_t caddr32_t; typedef int32_t daddr32_t; -typedef uint32_t ino32_t; typedef int32_t blkcnt32_t; typedef uint32_t fsblkcnt32_t; typedef uint32_t fsfilcnt32_t; diff --git a/include/sys/ustat.h b/include/sys/ustat.h index 53857bff2d..cf247c0edc 100644 --- a/include/sys/ustat.h +++ b/include/sys/ustat.h @@ -54,7 +54,7 @@ struct ustat { struct ustat32 { daddr32_t f_tfree; /* total free */ - ino32_t f_tinode; /* total inodes free */ + ino_t f_tinode; /* total inodes free */ char f_fname[6]; /* filsys name */ char f_fpack[6]; /* filsys pack name */ }; diff --git a/kernel/syscall/utssys.c b/kernel/syscall/utssys.c index 10b3d078ad..be3487e559 100644 --- a/kernel/syscall/utssys.c +++ b/kernel/syscall/utssys.c @@ -125,7 +125,7 @@ utssys_ustat32(dev_t dev, struct ustat32 *cbuf) return (EOVERFLOW); ust32.f_tfree = (daddr32_t)fsbc64; - ust32.f_tinode = (ino32_t)stvfs.f_ffree; + ust32.f_tinode = (ino_t)stvfs.f_ffree; cp = stvfs.f_fstr; cp2 = ust32.f_fname; diff --git a/share/man/man3head/types32.h.3head b/share/man/man3head/types32.h.3head index 066f121cdd..4b17242d6b 100644 --- a/share/man/man3head/types32.h.3head +++ b/share/man/man3head/types32.h.3head @@ -34,7 +34,7 @@ l l l . \fBtypedef\fR \fBuint32_t\fR \fBfsfilcnt32_t\fR \fBtypedef\fR \fBint32_t\fR \fBgid32_t\fR \fBtypedef\fR \fBint32_t\fR \fBid32_t\fR -\fBtypedef\fR \fBuint32_t\fR \fBino32_t\fR +\fBtypedef\fR \fBuint32_t\fR \fBtypedef\fR \fBint32_t\fR \fBkey32_t\fR \fBtypedef\fR \fBuint32_t\fR \fBmajor32_t\fR \fBtypedef\fR \fBuint32_t\fR \fBminor32_t\fR diff --git a/share/man/man4/ufsdump.4 b/share/man/man4/ufsdump.4 index 601224dc9f..f717426790 100644 --- a/share/man/man4/ufsdump.4 +++ b/share/man/man4/ufsdump.4 @@ -111,7 +111,7 @@ union u_spcl { time32_t c_ddate; int32_t c_volume; daddr32_t c_tapea; - ino32_t c_inumber; + ino_t c_inumber; int32_t c_magic; int32_t c_checksum; struct dinode c_dinode; @@ -140,7 +140,7 @@ time32_t c_date; time32_t c_ddate; int32_t c_volume; daddr32_t c_tapea; -ino32_t c_inumber; +ino_t c_inumber; int32_t c_magic; int32_t c_checksum; struct dinode c_dinode; diff --git a/usr/src/cmd/backup/dump/dumptape.c b/usr/src/cmd/backup/dump/dumptape.c index f94dd1e5d7..2504365a69 100644 --- a/usr/src/cmd/backup/dump/dumptape.c +++ b/usr/src/cmd/backup/dump/dumptape.c @@ -649,7 +649,7 @@ spclrec() flags = BUF_SPCLREC; spcl.c_tapea = *tapea; /* LINTED for now, max inode # is 2**31 (ufs max size is 4TB) */ - spcl.c_inumber = (ino32_t)ino; + spcl.c_inumber = (uint32_t)ino; spcl.c_magic = (tp_bsize == TP_BSIZE_MIN) ? NFS_MAGIC : MTB_MAGIC; spcl.c_checksum = 0; ip = (int32_t *)&spcl; @@ -812,7 +812,7 @@ void dospcl(ino_t inumber) { /* LINTED for now, max inode # is 2**31 (ufs max size is 1TB) */ - spcl.c_inumber = (ino32_t)inumber; + spcl.c_inumber = (uint32_t)inumber; slp->sl_req->br_dblk = 0; bcopy((char *)&spcl, (char *)slp->sl_req->br_spcl, tp_bsize); } -- 2.11.4.GIT