[iphonedisk] r102 committed - Include timestamps in getattr for the loopback imlpementation of FsSer...

0 views
Skip to first unread message

iphon...@googlecode.com

unread,
Oct 10, 2010, 2:03:09 AM10/10/10
to iphon...@googlegroups.com
Revision: 102
Author: allen.porter
Date: Sat Oct 9 23:02:04 2010
Log: Include timestamps in getattr for the loopback imlpementation of
FsService.

http://code.google.com/p/iphonedisk/source/detail?r=102

Modified:
/trunk/test/loopback_fs_service.cc

=======================================
--- /trunk/test/loopback_fs_service.cc Sat Oct 9 22:21:58 2010
+++ /trunk/test/loopback_fs_service.cc Sat Oct 9 23:02:04 2010
@@ -30,10 +30,13 @@
if (res == -1) {
rpc->SetFailed(strerror(errno));
} else {
- response->mutable_stat()->set_size(stbuf.st_size);
- response->mutable_stat()->set_blocks(stbuf.st_blocks);
- response->mutable_stat()->set_mode(stbuf.st_mode);
- response->mutable_stat()->set_nlink(stbuf.st_nlink);
+ proto::Stat* stat = response->mutable_stat();
+ stat->set_size(stbuf.st_size);
+ stat->set_blocks(stbuf.st_blocks);
+ stat->set_mode(stbuf.st_mode);
+ stat->set_nlink(stbuf.st_nlink);
+ stat->mutable_mtime()->set_tv_sec(stbuf.st_mtimespec.tv_sec);
+ stat->mutable_mtime()->set_tv_nsec(stbuf.st_mtimespec.tv_nsec);
}
done->Run();
}

Reply all
Reply to author
Forward
0 new messages