mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Use uint64_t instead of ino_t
POSIX defines ino_t to be of an unsigned integer type, and searching around the net didn't tell me of any definitions conflicting that. So every ino_t can be represented in an uint64_t. (Assuming that is the largest integer type in use for an inode number, but I'm sure that assumption will hold for a while) (dev_t, on the other hand, is a bit messier. Still figuring out what to do with that.)
This commit is contained in:
parent
a61c784b8c
commit
cabb55290d
3 changed files with 3 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ AC_CHECK_HEADERS(
|
||||||
|
|
||||||
# Check for typedefs, structures, and compiler characteristics.
|
# Check for typedefs, structures, and compiler characteristics.
|
||||||
AC_TYPE_INT64_T
|
AC_TYPE_INT64_T
|
||||||
|
AC_TYPE_UINT64_T
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
AC_STRUCT_ST_BLOCKS
|
AC_STRUCT_ST_BLOCKS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ static dev_t curdev; /* current device we're scanning on */
|
||||||
/* Populates the struct dir item with information from the stat struct. Sets
|
/* Populates the struct dir item with information from the stat struct. Sets
|
||||||
* everything necessary for output_dir.item() except FF_ERR and FF_EXL. */
|
* everything necessary for output_dir.item() except FF_ERR and FF_EXL. */
|
||||||
static void stat_to_dir(struct dir *d, struct stat *fs) {
|
static void stat_to_dir(struct dir *d, struct stat *fs) {
|
||||||
d->ino = fs->st_ino;
|
d->ino = (uint64_t)fs->st_ino;
|
||||||
d->dev = fs->st_dev;
|
d->dev = fs->st_dev;
|
||||||
|
|
||||||
if(S_ISREG(fs->st_mode))
|
if(S_ISREG(fs->st_mode))
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
struct dir {
|
struct dir {
|
||||||
struct dir *parent, *next, *prev, *sub, *hlnk;
|
struct dir *parent, *next, *prev, *sub, *hlnk;
|
||||||
int64_t size, asize;
|
int64_t size, asize;
|
||||||
ino_t ino;
|
uint64_t ino;
|
||||||
int items;
|
int items;
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue