Subversion Repositories freemyipod

Rev

Rev 803 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 803 Rev 804
Line 22... Line 22...
22
 
22
 
23
 
23
 
24
#define WIN32_LEAN_AND_MEAN
24
#define WIN32_LEAN_AND_MEAN
25
#define _WIN32_WINNT 0x500
25
#define _WIN32_WINNT 0x500
26
#include <windows.h>
26
#include <windows.h>
27
#include <ntddscsi.h>
-
 
28
#include <stdbool.h>
27
#include <stdbool.h>
29
#include <inttypes.h>
28
#include <inttypes.h>
-
 
29
#include <ddk/ntddscsi.h>
-
 
30
#include "build/version.h"
30
 
31
 
31
 
32
 
32
struct scsi_cmd
33
struct scsi_cmd
33
{
34
{
34
    SCSI_PASS_THROUGH_DIRECT sptd;
35
    SCSI_PASS_THROUGH_DIRECT sptd;
Line 203... Line 204...
203
    return usage("Unknown command for device type type ipod6g: %s", argv[3], argc, argv);
204
    return usage("Unknown command for device type type ipod6g: %s", argv[3], argc, argv);
204
}
205
}
205
 
206
 
206
int main(int argc, char const* const* argv)
207
int main(int argc, char const* const* argv)
207
{
208
{
-
 
209
    printf("iPodSCSI v. " VERSION " r" VERSION_SVN " - Copyright 2011 by Michael Sparmann (TheSeven)\r\n"
-
 
210
           "This is free software; see the source for copying conditions.  There is NO\r\n"
-
 
211
           "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n"
-
 
212
           "\r\n");
208
    if (argc < 4) return usage("Not enough arguments specified", NULL, argc, argv);
213
    if (argc < 4) return usage("Not enough arguments specified", NULL, argc, argv);
209
 
214
 
210
    if (strlen(argv[1]) != 2 || argv[1][1] != ':') return usage("Bad drive letter: %s", argv[1], argc, argv);
215
    if (strlen(argv[1]) != 2 || argv[1][1] != ':') return usage("Bad drive letter: %s", argv[1], argc, argv);
211
    devname[4] = argv[1][0];
216
    devname[4] = argv[1][0];
212
    SetLastError(0);
217
    SetLastError(0);