diff options
author | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-05-12 09:01:38 +0000 |
---|---|---|
committer | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-05-12 09:01:38 +0000 |
commit | f1e72cf029f28a337679ca787003c54d5c1e2bde (patch) | |
tree | 837d1267ff9693d9304a261097c686a5eb8bf50a /src/jtag/parport.c | |
parent | 342d77e881ae148aafe0372482fde9c9f0de2520 (diff) |
- restored tabs and formatting
git-svn-id: svn://svn.berlios.de/openocd/trunk@657 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/parport.c')
-rw-r--r-- | src/jtag/parport.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/jtag/parport.c b/src/jtag/parport.c index e56d65c6..e9934974 100644 --- a/src/jtag/parport.c +++ b/src/jtag/parport.c @@ -276,26 +276,26 @@ int parport_register_commands(struct command_context_s *cmd_ctx) #if PARPORT_USE_GIVEIO == 1 int parport_get_giveio_access() { - HANDLE h; - OSVERSIONINFO version; - - version.dwOSVersionInfoSize = sizeof version; - if (!GetVersionEx( &version )) { - errno = EINVAL; - return -1; - } - if (version.dwPlatformId != VER_PLATFORM_WIN32_NT) - return 0; - - h = CreateFile( "\\\\.\\giveio", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); - if (h == INVALID_HANDLE_VALUE) { - errno = ENODEV; - return -1; - } - - CloseHandle( h ); - - return 0; + HANDLE h; + OSVERSIONINFO version; + + version.dwOSVersionInfoSize = sizeof version; + if (!GetVersionEx( &version )) { + errno = EINVAL; + return -1; + } + if (version.dwPlatformId != VER_PLATFORM_WIN32_NT) + return 0; + + h = CreateFile( "\\\\.\\giveio", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); + if (h == INVALID_HANDLE_VALUE) { + errno = ENODEV; + return -1; + } + + CloseHandle( h ); + + return 0; } #endif |