diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2022-04-14 22:22:22 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2022-04-14 22:22:46 +0200 |
commit | 8a6ceff3762784d99f57e2f7f20149f97b6d82c7 (patch) | |
tree | 0ca938d476fc296aa90603570a70a6fb17dc524d /utils/sansapatcher | |
parent | cc2f36492666be11da12890b35303a63e3aced87 (diff) | |
download | rockbox-8a6ceff3762784d99f57e2f7f20149f97b6d82c7.tar.gz rockbox-8a6ceff3762784d99f57e2f7f20149f97b6d82c7.zip |
rbutil: Fix sansapatcher bootloader install on Windows.
During bootloader installation sansapatcher disk access is accidentially
set up twice. This is not a problem except on Windows, which will abort
with a "permission denied" error.
This is basically the same problem as for ipodpatcher bootloader install.
Change-Id: I03220e17d0e00a15fff23c02aba7da93d4781964
Diffstat (limited to 'utils/sansapatcher')
-rw-r--r-- | utils/sansapatcher/sansaio-posix.c | 1 | ||||
-rw-r--r-- | utils/sansapatcher/sansaio-win32.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/utils/sansapatcher/sansaio-posix.c b/utils/sansapatcher/sansaio-posix.c index 44c4dcc95c..5625ec35a4 100644 --- a/utils/sansapatcher/sansaio-posix.c +++ b/utils/sansapatcher/sansaio-posix.c | |||
@@ -110,6 +110,7 @@ int sansa_reopen_rw(struct sansa_t* sansa) | |||
110 | int sansa_close(struct sansa_t* sansa) | 110 | int sansa_close(struct sansa_t* sansa) |
111 | { | 111 | { |
112 | close(sansa->dh); | 112 | close(sansa->dh); |
113 | sansa->dh = -1; | ||
113 | return 0; | 114 | return 0; |
114 | } | 115 | } |
115 | 116 | ||
diff --git a/utils/sansapatcher/sansaio-win32.c b/utils/sansapatcher/sansaio-win32.c index ee6a8cd93d..be250136f9 100644 --- a/utils/sansapatcher/sansaio-win32.c +++ b/utils/sansapatcher/sansaio-win32.c | |||
@@ -147,6 +147,7 @@ int sansa_close(struct sansa_t* sansa) | |||
147 | { | 147 | { |
148 | unlock_volume(sansa->dh); | 148 | unlock_volume(sansa->dh); |
149 | CloseHandle(sansa->dh); | 149 | CloseHandle(sansa->dh); |
150 | sansa->dh = INVALID_HANDLE_VALUE; | ||
150 | return 0; | 151 | return 0; |
151 | } | 152 | } |
152 | 153 | ||