diff options
Diffstat (limited to 'rbutil/sansapatcher/sansaio-win32.c')
-rw-r--r-- | rbutil/sansapatcher/sansaio-win32.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/rbutil/sansapatcher/sansaio-win32.c b/rbutil/sansapatcher/sansaio-win32.c index 7335ab614c..e9b8819f19 100644 --- a/rbutil/sansapatcher/sansaio-win32.c +++ b/rbutil/sansapatcher/sansaio-win32.c | |||
@@ -37,22 +37,23 @@ | |||
37 | 37 | ||
38 | #include "sansaio.h" | 38 | #include "sansaio.h" |
39 | 39 | ||
40 | static int lock_volume(HANDLE hDisk) | 40 | static int lock_volume(HANDLE hDisk) |
41 | { | 41 | { |
42 | DWORD dummy; | 42 | DWORD dummy; |
43 | 43 | ||
44 | return DeviceIoControl(hDisk, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, | 44 | return DeviceIoControl(hDisk, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, |
45 | &dummy, NULL); | 45 | &dummy, NULL); |
46 | } | 46 | } |
47 | 47 | ||
48 | static int unlock_volume(HANDLE hDisk) | 48 | static int unlock_volume(HANDLE hDisk) |
49 | { | 49 | { |
50 | DWORD dummy; | 50 | DWORD dummy; |
51 | 51 | ||
52 | return DeviceIoControl(hDisk, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0, | 52 | return DeviceIoControl(hDisk, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0, |
53 | &dummy, NULL); | 53 | &dummy, NULL); |
54 | } | 54 | } |
55 | 55 | ||
56 | #ifndef RBUTIL | ||
56 | void print_error(char* msg) | 57 | void print_error(char* msg) |
57 | { | 58 | { |
58 | char* pMsgBuf; | 59 | char* pMsgBuf; |
@@ -65,7 +66,7 @@ void print_error(char* msg) | |||
65 | printf(pMsgBuf); | 66 | printf(pMsgBuf); |
66 | LocalFree(pMsgBuf); | 67 | LocalFree(pMsgBuf); |
67 | } | 68 | } |
68 | 69 | #endif | |
69 | int sansa_open(struct sansa_t* sansa, int silent) | 70 | int sansa_open(struct sansa_t* sansa, int silent) |
70 | { | 71 | { |
71 | DISK_GEOMETRY_EX diskgeometry_ex; | 72 | DISK_GEOMETRY_EX diskgeometry_ex; |