Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1595)

Unified Diff: bootstat.h

Issue 6870023: Add "bootstat --output-dir" option. Base URL: ssh://gitrw.chromium.org:9222/bootstat.git@master
Patch Set: Get bootstat.c to where it actually compiles. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile ('k') | bootstat.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bootstat.h
diff --git a/bootstat.h b/bootstat.h
index d6b13d225e61fd0bbcb5f25c4c662281991eaaff..532a6da80bf2a65788f24a34d287ba19ba93c6e1 100644
--- a/bootstat.h
+++ b/bootstat.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -26,6 +26,8 @@ extern "C" {
//
#define BOOTSTAT_MAX_EVENT_LEN 64
+// bootstat_log()
+//
// Log an event. Event names should be composed of characters drawn
// from this subset of 7-bit ASCII: Letters (upper- or lower-case),
// digits, dot ('.'), dash ('-'), and underscore ('_'). Case is
@@ -36,6 +38,23 @@ extern "C" {
// conventions to prevent name collisions.
extern void bootstat_log(const char* event_name);
+// bootstat_set_output_directory()
+//
+// Change the default directory into which bootstat_log() writes
+// timestamp files. The input parameter is the directory path.
+// If the input parameter is NULL, the output directory is set
+// back to the initial default directory.
+//
+// bootstat_set_output_directory() checks its input path for
+// appropriate permissions when called. If permissions to the
+// selected output directory are subsequently lost, bootstat_log()
+// fails silently. The caller is responsible for selecting a
+// directory that is not subject to change.
+//
+// Returns 0 on success. On failure, returns -1, with errno set as
+// for the access(2) system call.
+extern int bootstat_set_output_directory(const char*);
+
#if defined(__cplusplus)
}
#endif
« no previous file with comments | « Makefile ('k') | bootstat.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698