diff options
author | Lassi Marttala <lassi.lm.marttala@partner.bmw.com> | 2012-03-14 13:12:28 +0100 |
---|---|---|
committer | Christian Muck <christian.muck@bmw.de> | 2012-04-04 14:28:45 +0200 |
commit | d7ddd0ff6684c5b22d1405cd6e3b85b339c4db6a (patch) | |
tree | ff816b8aee895d5d2b5d83de6c6a0c5c4bd9ae38 /src/lib | |
parent | d1973737681ef555010fa6047175c49638a53b00 (diff) | |
download | DLT-daemon-d7ddd0ff6684c5b22d1405cd6e3b85b339c4db6a.tar.gz |
GDLT-2: Change to gzip wrapper format. Change file signature creation to
account for file size, as inode number maybe duplicate when deleting and
creating new files.
Signed-off-by: Christian Muck <christian.muck@bmw.de>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/dlt_filetransfer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/dlt_filetransfer.c b/src/lib/dlt_filetransfer.c index 359ad2c..f8294c3 100644 --- a/src/lib/dlt_filetransfer.c +++ b/src/lib/dlt_filetransfer.c @@ -84,8 +84,12 @@ unsigned long getFilesize(const char* file){ */ unsigned long getFileSerialNumber(const char* file){ struct stat st; + unsigned long ret; stat(file, &st); - return (unsigned long)st.st_ino; + ret = st.st_ino; + ret = ret << (sizeof(ret)*8)/2; + ret |= st.st_size; + return ret; } //!Returns the creation date of a file |