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

Side by Side Diff: tpmd/unix/tpmd.c

Issue 1519032: Fix bug that was revealed by arm cross-compilation. (Closed)
Patch Set: Created 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Software-based Trusted Platform Module (TPM) Emulator 1 /* Software-based Trusted Platform Module (TPM) Emulator
2 * Copyright (C) 2004-2010 Mario Strasser <mast@gmx.net> 2 * Copyright (C) 2004-2010 Mario Strasser <mast@gmx.net>
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published 5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License, 6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version. 7 * or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 printf(" u : unix socket name to use (default: %s)\n", opt_socket_name); 164 printf(" u : unix socket name to use (default: %s)\n", opt_socket_name);
165 printf(" o : effective user the application should run as\n"); 165 printf(" o : effective user the application should run as\n");
166 printf(" g : effective group the application should run as\n"); 166 printf(" g : effective group the application should run as\n");
167 printf(" h : print this help message\n"); 167 printf(" h : print this help message\n");
168 printf(" startup mode : must be 'clear', " 168 printf(" startup mode : must be 'clear', "
169 "'save' (default) or 'deactivated\n"); 169 "'save' (default) or 'deactivated\n");
170 } 170 }
171 171
172 static void parse_options(int argc, char **argv) 172 static void parse_options(int argc, char **argv)
173 { 173 {
174 char c; 174 int c;
175 struct passwd *pwd; 175 struct passwd *pwd;
176 struct group *grp; 176 struct group *grp;
177 opt_uid = getuid(); 177 opt_uid = getuid();
178 opt_gid = getgid(); 178 opt_gid = getgid();
179 info("parsing options"); 179 info("parsing options");
180 while ((c = getopt (argc, argv, "dfs:u:o:g:c:h")) != -1) { 180 while ((c = getopt (argc, argv, "dfs:u:o:g:c:h")) != -1) {
181 debug("handling option '-%c'", c); 181 debug("handling option '-%c'", c);
182 switch (c) { 182 switch (c) {
183 case 'd': 183 case 'd':
184 opt_debug = 1; 184 opt_debug = 1;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 if (!opt_foreground) daemonize(); 487 if (!opt_foreground) daemonize();
488 /* open random device */ 488 /* open random device */
489 init_random(); 489 init_random();
490 /* start main processing loop */ 490 /* start main processing loop */
491 main_loop(); 491 main_loop();
492 info("stopping TPM Emulator daemon"); 492 info("stopping TPM Emulator daemon");
493 close(rand_fh); 493 close(rand_fh);
494 closelog(); 494 closelog();
495 return EXIT_SUCCESS; 495 return EXIT_SUCCESS;
496 } 496 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698