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

Side by Side Diff: bootstat.c

Issue 3129002: Create a bootstat library for external C and C++ programs (Closed) Base URL: ssh://gitrw.chromium.org/bootstat.git
Patch Set: Fix whitespace issue found by presubmit check Created 10 years, 4 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 unified diff | Download patch
« no previous file with comments | « bootstat.h ('k') | bootstat_log.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Implementation of the 'bootstat' command, part of the Chromium OS
6 // 'bootstat' facility. The command provides a command line wrapper
7 // around the key functionality declared in "bootstat.h"
8
5 #include <stdio.h> 9 #include <stdio.h>
6 #include <stdlib.h> 10 #include <stdlib.h>
7 #include <string.h> 11 #include <string.h>
8 12
9 #include <libgen.h> 13 #include <libgen.h>
10 14
11 #include "bootstat.h" 15 #include "bootstat.h"
12 16
13 static void usage(char *cmd) 17 static void usage(char* cmd)
14 { 18 {
15 fprintf(stderr, "usage: %s <event-name>\n", basename(strdup(cmd))); 19 fprintf(stderr, "usage: %s <event-name>\n", basename(strdup(cmd)));
16 exit(EXIT_FAILURE); 20 exit(EXIT_FAILURE);
17 } 21 }
18 22
19 23
20 int main(int argc, char *argv[]) 24 int main(int argc, char* argv[])
21 { 25 {
22 if (argc != 2) 26 if (argc != 2)
23 usage(argv[0]); 27 usage(argv[0]);
24 28
25 bootstat_log(argv[1]); 29 bootstat_log(argv[1]);
26 return EXIT_SUCCESS; 30 return EXIT_SUCCESS;
27 } 31 }
OLDNEW
« no previous file with comments | « bootstat.h ('k') | bootstat_log.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698