BREW2/macusb patch
Nathan Hjelm <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <[email protected]> |
Attached is a patch for native/usb/macbuild.sh and phones/com_brew.py. Changes: native/usb/macbuild.sh: - Now uses libusb-config to find libusb (it was written for a reason ;) ) phones/com_brew.py: - In brew2 a filehandle of 0 is not actually an error (a response beginning with 0x13 is an error). At least this is the case on the lg- vx8700. -Nathan Hjelm ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ BitPim-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bitpim-devel
bitpim_brew2_macusb.diff
(application/octet-stream, 1.5 KB)
Index: native/usb/macbuild.sh
===================================================================
--- native/usb/macbuild.sh (revision 4218)
+++ native/usb/macbuild.sh (working copy)
@@ -3,7 +3,7 @@
swig -version 2>&1 | grep Version
-swig -python -I/usr/local/include libusb.i
+swig -python `libusb-config --cflags` libusb.i
-gcc -Wall -O2 -bundle -undefined suppress -flat_namespace -I $INCLUDEDIR -I /usr/local/include -o _libusb.so libusb_wrap.c -L/usr/local/lib -lusb -framework Python
+gcc -Wall -O2 -bundle -undefined suppress -flat_namespace -I $INCLUDEDIR -I /usr/local/include -o _libusb.so libusb_wrap.c `libusb-config --libs` `libusb-config --cflags` -framework Python
Index: phones/com_brew.py
===================================================================
--- phones/com_brew.py (revision 4218)
+++ phones/com_brew.py (working copy)
@@ -889,8 +889,6 @@
handle=self.openfile(name, p_brew.new_fileopen_mode_write, p_brew.new_fileopen_flag_existing)
else:
handle=self.openfile(name, p_brew.new_fileopen_mode_write, p_brew.new_fileopen_flag_create)
- if not handle:
- raise BrewNoSuchFileException
try:
remain=size
pos=0
@@ -934,8 +932,6 @@
desc="Reading "+file
data=cStringIO.StringIO()
handle=self.openfile(file, p_brew.new_fileopen_mode_read)
- if not handle:
- raise BrewNoSuchFileException
try:
filesize=node['size']
read=0