You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.2 KiB
56 lines
2.2 KiB
10 years ago
|
diff -up fakeroot-1.20.2/faked.c.inttypes fakeroot-1.20.2/faked.c
|
||
|
--- fakeroot-1.20.2/faked.c.inttypes 2014-10-05 17:16:00.000000000 +0200
|
||
|
+++ fakeroot-1.20.2/faked.c 2015-06-17 11:29:01.335799421 +0200
|
||
|
@@ -125,7 +125,7 @@
|
||
11 years ago
|
#ifdef FAKEROOT_DB_PATH
|
||
|
# include <dirent.h>
|
||
|
#endif
|
||
|
-
|
||
|
+#include <inttypes.h>
|
||
|
#ifndef FAKEROOT_FAKENET
|
||
|
# define FAKE_KEY msg_key
|
||
|
#else /* FAKEROOT_FAKENET */
|
||
10 years ago
|
@@ -614,10 +614,10 @@ int save_database(const uint32_t remote)
|
||
11 years ago
|
(uint64_t) i->buf.mode,(uint64_t) i->buf.uid,(uint64_t) i->buf.gid,
|
||
|
(uint64_t) i->buf.nlink,(uint64_t) i->buf.rdev,path);
|
||
|
#else
|
||
|
- fprintf(f,"dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n",
|
||
|
- (uint64_t) i->buf.dev,(uint64_t) i->buf.ino,(uint64_t) i->buf.mode,
|
||
|
- (uint64_t) i->buf.uid,(uint64_t) i->buf.gid,(uint64_t) i->buf.nlink,
|
||
|
- (uint64_t) i->buf.rdev);
|
||
|
+ fprintf(f,"dev=%" PRIx64 ",ino=%" PRIu64 ",mode=%" PRIo32 ",uid=%" PRIu32 ",gid=%" PRIu32 ",nlink=%" PRIu32",rdev=%" PRIu64 "\n",
|
||
|
+ i->buf.dev, i->buf.ino, i->buf.mode,
|
||
|
+ i->buf.uid, i->buf.gid, i->buf.nlink,
|
||
|
+ i->buf.rdev);
|
||
|
#endif
|
||
|
}
|
||
|
|
||
10 years ago
|
@@ -655,7 +655,7 @@ int load_database(const uint32_t remote)
|
||
11 years ago
|
stdev = path_st.st_dev;
|
||
|
stino = path_st.st_ino;
|
||
|
#else
|
||
|
- r=scanf("dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n",
|
||
|
+ r=scanf("dev=%" PRIx64 ",ino=%" PRIu64 ",mode=%" PRIo64 ",uid=%" PRIu64 ",gid=%"PRIu64 ",nlink=%" PRIu64 ",rdev=%" PRIu64 "\n",
|
||
|
&stdev, &stino, &stmode, &stuid, &stgid, &stnlink, &strdev);
|
||
|
if (r != 7)
|
||
|
break;
|
||
10 years ago
|
@@ -682,13 +682,13 @@ int load_database(const uint32_t remote)
|
||
11 years ago
|
/* */
|
||
|
/*********************************/
|
||
|
void debug_stat(const struct fakestat *st){
|
||
|
- fprintf(stderr,"dev:ino=(%llx:%lli), mode=0%lo, own=(%li,%li), nlink=%li, rdev=%lli\n",
|
||
|
+ fprintf(stderr,"dev:ino=(%" PRIx64 ":%" PRIx64 "), mode=0%" PRIo32 ", own=(%" PRIi32 ",%" PRIi32 "), nlink=%" PRIi32 ", rdev=%" PRIi64 "\n",
|
||
|
st->dev,
|
||
|
st->ino,
|
||
|
- (long)st->mode,
|
||
|
- (long)st->uid,
|
||
|
- (long)st->gid,
|
||
|
- (long)st->nlink,
|
||
|
+ st->mode,
|
||
|
+ st->uid,
|
||
|
+ st->gid,
|
||
|
+ st->nlink,
|
||
|
st->rdev);
|
||
|
}
|
||
|
|