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

Unified Diff: src/platform/vboot_reference/utility/kernel_utility.cc

Issue 2322003: Cleanup option parsing for firmware signing utility. (Closed) Base URL: ssh://git@gitrw.chromium.org/chromiumos
Patch Set: Created 10 years, 7 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 | « src/platform/vboot_reference/utility/firmware_utility.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/utility/kernel_utility.cc
diff --git a/src/platform/vboot_reference/utility/kernel_utility.cc b/src/platform/vboot_reference/utility/kernel_utility.cc
index a75e4fbb878c6f6a48f43fdf99ca9f50c137b348..40688cdc19cd493407e2234e109ba2e031a9f5d6 100644
--- a/src/platform/vboot_reference/utility/kernel_utility.cc
+++ b/src/platform/vboot_reference/utility/kernel_utility.cc
@@ -7,7 +7,6 @@
#include "kernel_utility.h"
-#include <errno.h>
#include <getopt.h>
#include <stdio.h>
#include <stdint.h> // Needed for UINT16_MAX.
@@ -23,7 +22,6 @@ extern "C" {
#include "utility.h"
}
-extern int errno;
using std::cerr;
namespace vboot_reference {
@@ -160,7 +158,6 @@ bool KernelUtility::ParseCmdLineOptions(int argc, char* argv[]) {
}
break;
case OPT_KERNEL_SIGN_ALGORITHM:
- errno = 0;
kernel_sign_algorithm_ = strtol(optarg, &e, 0);
if (!*optarg || (e && *e)) {
cerr << "Invalid argument to --"
@@ -170,7 +167,6 @@ bool KernelUtility::ParseCmdLineOptions(int argc, char* argv[]) {
}
break;
case OPT_KERNEL_KEY_VERSION:
- errno = 0;
kernel_key_version_ = strtol(optarg, &e, 0);
if (!*optarg || (e && *e)) {
cerr << "Invalid argument to --"
@@ -180,7 +176,6 @@ bool KernelUtility::ParseCmdLineOptions(int argc, char* argv[]) {
}
break;
case OPT_KERNEL_VERSION:
- errno = 0;
kernel_version_ = strtol(optarg, &e, 0);
if (!*optarg || (e && *e)) {
cerr << "Invalid argument to --"
« no previous file with comments | « src/platform/vboot_reference/utility/firmware_utility.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698