summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2012-08-27 19:07:05 +0200
committerYorhel <git@yorhel.nl>2012-08-27 19:12:13 +0200
commitcabb55290dd33131b62549c5499cc77e6edb0ccf (patch)
treed2fcadf2b33d43e098f2182bfc7d6cf8965431cb /src
parenta61c784b8c0d5595a85fb3b0233b2cc75e14716c (diff)
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.)
Diffstat (limited to 'src')
-rw-r--r--src/dir_scan.c2
-rw-r--r--src/global.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dir_scan.c b/src/dir_scan.c
index e7ee5d8..4b07ed5 100644
--- a/src/dir_scan.c
+++ b/src/dir_scan.c
@@ -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
* everything necessary for output_dir.item() except FF_ERR and FF_EXL. */
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;
if(S_ISREG(fs->st_mode))
diff --git a/src/global.h b/src/global.h
index e1f273e..7737204 100644
--- a/src/global.h
+++ b/src/global.h
@@ -61,7 +61,7 @@
struct dir {
struct dir *parent, *next, *prev, *sub, *hlnk;
int64_t size, asize;
- ino_t ino;
+ uint64_t ino;
int items;
dev_t dev;
unsigned char flags;