diff options
author | Elliott Hughes <enh@google.com> | 2009-10-07 17:24:39 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2009-10-07 17:24:39 -0700 |
commit | c500be926cf07c43aeb828ae86b04b856c6b7c63 (patch) | |
tree | 2ac9f713aed23d5d3c8bbaadf21c8ec30e29c371 /fastboot/usb_linux.c | |
parent | b4add9b74525210478bac702d27fdaf9cf7ab18f (diff) | |
download | system_core-c500be926cf07c43aeb828ae86b04b856c6b7c63.zip system_core-c500be926cf07c43aeb828ae86b04b856c6b7c63.tar.gz system_core-c500be926cf07c43aeb828ae86b04b856c6b7c63.tar.bz2 |
Fix flashstation breakage.
We need to reset 'writable' each time round the loop (i.e. for each device).
Diffstat (limited to 'fastboot/usb_linux.c')
-rw-r--r-- | fastboot/usb_linux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fastboot/usb_linux.c b/fastboot/usb_linux.c index 088c23a..2ce53eb 100644 --- a/fastboot/usb_linux.c +++ b/fastboot/usb_linux.c @@ -203,7 +203,7 @@ static usb_handle *find_usb_device(const char *base, ifc_match_func callback) DIR *busdir, *devdir; struct dirent *de; int fd; - int writable = 1; + int writable; busdir = opendir(base); if(busdir == 0) return 0; @@ -222,6 +222,7 @@ static usb_handle *find_usb_device(const char *base, ifc_match_func callback) sprintf(devname, "%s/%s", busname, de->d_name); // DBG("[ scanning %s ]\n", devname); + writable = 1; if((fd = open(devname, O_RDWR)) < 0) { // Check if we have read-only access, so we can give a helpful // diagnostic like "adb devices" does. |