summaryrefslogtreecommitdiff
path: root/libgphoto2_port/usbscsi
Commit message (Collapse)AuthorAgeFilesLines
* Factor out i18n stuff into separate i18n.h filesHans Ulrich Niedermann2021-10-251-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out the i18n definitions into i18n.h include files: One include file each for libgphoto2 and for libgphoto2_port. This removes the complete #ifdef ENABLE_NLS # include <libintl.h> # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define _(String) (String) # define N_(String) (String) #endif block (which in some occasions defines even more macros) and replaces it with a single line #include "libgphoto2/i18n.h" for camlibs and libgphoto2 itself and with #include "libgphoto2_port/i18n.h" for iolibs and libgphoto2_port itself. This gives us two central locations to change the defintions.
* Fix typo in error messageRyan Schmidt2020-08-201-1/+1
|
* Remove trailing whitespace from all *.h and *.c files.Siim Meerits2020-07-271-5/+5
|
* Help editors treat as Makefiles all our Makefile-files filesHans Ulrich Niedermann2016-10-281-0/+2
|
* remove more unistd.h inclusions that are not neededMarcus Meissner2016-01-031-1/+0
|
* use gp_system_*dir functions instead of bare *dir functionsMarcus Meissner2016-01-031-8/+8
| | | | to help with https://github.com/gphoto/libgphoto2/issues/33
* use _DEFAULT_SOURCE instead of _BSD_SOURCEMarcus Meissner2015-10-281-1/+1
|
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-221-7/+4
| | | | | | | | | | | | | here are the logging cleanup patches for the remaining libgphoto_port backend libs, that I announced earlier. 14 and 15 are equivalent to 3,4,5 as before. 16 removes 4 left instances of _(...) macro usage in log messages. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15106 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-221-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) introduce C_PARAMS and C_PARAMS_MSG along the lines of C_MEM 2) replace CHECK_NULL with C_PARAMS 3) replace the pattern if ( something ) return GP_ERROR_BAD_PARAMETERS; with C_PARAMS ( !something ); I went over the whole patch again to check that each 'something' condition is really inverted, so I dare to suggest you don't have to do that again ;). 4) replaced CHECK_LIST and CHECK_INDEX_RANGE with simple one-line C_PARAMS(...) expressions 5) a couple of hunks look like this - if (!inet_aton (buffer, &inp)) { - fprintf(stderr,"failed to scan for addr in %s\n", buffer); - return GP_ERROR_BAD_PARAMETERS; - } + C_PARAMS_MSG (inet_aton (buffer, &inp), so some 'lost' error messages get now properly piped into the gp_log mechanism. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15103 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-211-4/+2
| | | | | | | | | 2) don't check the pointer for NULL before calling free(), because free() checks it again. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15097 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-211-5/+2
| | | | | | | | | | | here is a patch for (mostly) consistent usage of a generalized C_MEM macro for checking the return values of memory allocating functions, i.e. malloc, calloc, realloc and strdup. It is the C_MEM from libusb1.c, moved to gphoto2-port-log.h. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15096 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: "Daniel P. Berrange" <berrange@redhat.com>Marcus Meissner2014-04-111-1/+1
| | | | | | | | | The gp_port_usbscsi_get_usb_id method discards const-ness for the return value of gp_port_usbscsi_resolve_symlink. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14889 67ed7778-7388-44ab-90cf-0a291f65f57c
* updated fsf addressMarcus Meissner2014-01-011-2/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14611 67ed7778-7388-44ab-90cf-0a291f65f57c
* avoid leak on error pathMarcus Meissner2013-09-031-1/+4
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14541 67ed7778-7388-44ab-90cf-0a291f65f57c
* if locking constants are not defined, define them. (MacOS)Marcus Meissner2013-06-291-0/+12
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14470 67ed7778-7388-44ab-90cf-0a291f65f57c
* use the port timeout, not the fixed 1.5 secondsMarcus Meissner2013-04-131-1/+5
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14340 67ed7778-7388-44ab-90cf-0a291f65f57c
* added #define _BSD_SOURCE where necessary to fix strict ansi buildsMarcus Meissner2013-02-191-0/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14242 67ed7778-7388-44ab-90cf-0a291f65f57c
* autocheck for sys/file.h and flockMarcus Meissner2013-02-191-2/+10
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14241 67ed7778-7388-44ab-90cf-0a291f65f57c
* usbscsi: Switch from lockdev to flockHans de Goede2012-09-191-67/+40
| | | | | | | | | | | | | | | | | | | | | Currently there are 2 problems with the lockdev usage in usbscsi: 1) It breaks usbscsi completely due to a missing symbol when dlopening usbscsi.so, which is caused by libgphoto2_port/usbscsi/Makefile-files not adding $(SERIAL_LIBS) to usbscsi_la_LIBADD 2) lockdev uses /var/lock/lockdev, which by default is: drwxrwxr-x. 2 root lock 40 Sep 19 22:49 /var/lock/lockdev So despite our udev rules, gphoto using apps need to run as root (or group lockdev) to be able to work with usbscsi port devices I've decided to fix 2) by moving to flock, lockdev makes sense for serial ports, since other programs may be trying to access them at the same time, for usbscsi however we only need to coordinate with other apps also using libgphoto2, and flock then suffices, is much simpler and does not have the rights issues of lockdev. This fix for 2), also fixes 1) by simply no longer needing lockdev. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14114 67ed7778-7388-44ab-90cf-0a291f65f57c
* usbscsi: Increase the timeoutHans de Goede2012-09-191-1/+1
| | | | | | | | This is necessary for some ax203 devices where the spi flashing is offloaded to the firmware, and this can take (much) longer then our old timeout. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14108 67ed7778-7388-44ab-90cf-0a291f65f57c
* move sense handling to one layer upMarcus Meissner2011-01-291-23/+0
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13502 67ed7778-7388-44ab-90cf-0a291f65f57c
* some small enhancements, init buffers, report senseMarcus Meissner2011-01-251-3/+28
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13488 67ed7778-7388-44ab-90cf-0a291f65f57c
* try to support old style kernels where sgX was a directoryMarcus Meissner2010-12-251-9/+9
| | | | | | | and not a symlink git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13448 67ed7778-7388-44ab-90cf-0a291f65f57c
* add a regexp matcher for usbscsi:.*Marcus Meissner2010-12-251-0/+7
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13447 67ed7778-7388-44ab-90cf-0a291f65f57c
* added missing $(INTLLIBS)Marcus Meissner2010-05-281-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13066 67ed7778-7388-44ab-90cf-0a291f65f57c
* header presence checksMarcus Meissner2010-04-211-3/+9
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13013 67ed7778-7388-44ab-90cf-0a291f65f57c
* include limits.hMarcus Meissner2010-04-211-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13011 67ed7778-7388-44ab-90cf-0a291f65f57c
* added scsi/sg.h autoconf checkingMarcus Meissner2010-04-111-2/+10
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12992 67ed7778-7388-44ab-90cf-0a291f65f57c
* actually build shared libsMarcus Meissner2010-03-301-9/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12873 67ed7778-7388-44ab-90cf-0a291f65f57c
* makefile.am not used hereMarcus Meissner2010-03-291-13/+0
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12861 67ed7778-7388-44ab-90cf-0a291f65f57c
* fixed build with TRUNKMarcus Meissner2010-03-292-10/+12
| | | | | | | fixed memleak git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12857 67ed7778-7388-44ab-90cf-0a291f65f57c
* addedMarcus Meissner2010-03-291-0/+14
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12856 67ed7778-7388-44ab-90cf-0a291f65f57c
* Add ax203 camlib for ax203 based picture framesHans de Goede2010-03-292-0/+396
This makes it possible to download pictures from / upload pictures to ax203 based picture frames It consists of 2 parts: 1) an ax203 camlib, ax203 access, image table parsing, and decompress / compress code. 2) usbscsi port driver, this is a *Linux only* (for now) port driver for accessing devices which require sending custom scsi commands to an usb mass storage device (using the /dev/sg# device under Linux). git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12854 67ed7778-7388-44ab-90cf-0a291f65f57c