AU: Timestamp logs at startup.
This will allow logs to be rotated by init/chromeos-cleanup-logs (separate CL).
BUG=5527
TEST=tested on device, chrome://system
Change-Id: I844ebd198510a8f600afa99f840624b2e65d1584
Review URL: http://codereview.chromium.org/4771007
diff --git a/utils.cc b/utils.cc
index 162fe7b..359b6b8 100644
--- a/utils.cc
+++ b/utils.cc
@@ -301,6 +301,11 @@
return 0 == lstat(path, &stbuf);
}
+bool IsSymlink(const char* path) {
+ struct stat stbuf;
+ return lstat(path, &stbuf) == 0 && S_ISLNK(stbuf.st_mode) != 0;
+}
+
std::string TempFilename(string path) {
static const string suffix("XXXXXX");
CHECK(StringHasSuffix(path, suffix));