* frontends/command-line/actions.c:
* frontends/command-line/foreach.c:
* frontends/command-line/main.c: Print directory names at
each step of the recursion when using '--list-folders --recurse'.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2392 67ed7778-7388-44ab-90cf-0a291f65f57c
* command-line/actions.c:
* command-line/actions.h:
* command-line/foreach.c:
* command-line/main.c: The --recurse option should now work
with --get-all-thumbnails, --get-all-images, --get-all-raw-data,
--list-files and --list-folders.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2390 67ed7778-7388-44ab-90cf-0a291f65f57c
* include/Makefile.am
* include/gphoto2-port-result.h
* libgphoto2_port/Makefile.am
* libgphoto2_port/result.c: New
* include/gphoto2-port-debug.h: Define debug levels here
* include/gphoto2-port.h: Clean up
* libgphoto2_port/debug.c: Check if history is big enough for message
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2379 67ed7778-7388-44ab-90cf-0a291f65f57c
* test/gphoto2-port-test.c: Renamed into
* test/test-gp-port.c
* test/Makefile.am: New
* Makefile.am: Add test to SUBDIRS
* acconfig.h: #undef HAVE_LOCKDEV
* configure.in: Check for lockdev and use it if available
* serial/Makefile.am: -llockdev if that is available
* serial/unix.c: Use lockdev if available
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2361 67ed7778-7388-44ab-90cf-0a291f65f57c
serial.c :
* made new function called canon_usb_camera_init() that takes care of
the init-dialogue with canon USB cameras with error-checking (not
complete, I need to get USB sniffing working in order to figure out
what to do in different situations).
* made canon_serial_init() return GP_ERROR or GP_OK (same return values,
just use defines instead of hard coded values).
* added other error checks to canon_serial_init().
* improved USB settings code in canon_serial_init().
maybe the USB parts of serial.c should be moved to a new file called
usb.c and the init routine could be called canon_usb_init()?
canon.c:camera_init() already distinguishes USB from serial and could
easily call canon_usb_init() instead if it is a USB camera.
canon.c :
* improved debug output produced by :
check_readiness()
is_thumbnail()
is_image()
is_movie()
* check return value of psa50_get_file() before acting further on
images (instead of trying to set attributes even if retreival of the
file failed).
* some other cleanups and error checkings.
psa50.c :
* added a define called BULK_READ_SIZE, needed since some USB things
need to be done with the same buffer size and buffer size is not
always passed between functions. even if the size was passed all over
a define still seems like the right thing to use since it should be
the same for multiple operations (get file, get thumbnail ...). maybe
the define should be in a .h file instead of psa50.c though.
* major cleanups to psa50_usb_dialogue(). added lots of error checking,
debug output (tell me if you think it is overkill to map commands to
strings, but i think it really eases debugging).
* changed the following routines to return GP_OK or GP_ERROR instead of
hard coded values. also changed what was expected as return where
these functions were called.
psa50_get_owner_name()
psa50_set_owner_name()
psa50_get_time()
* rewrote big parts of psa50_get_file_usb(). made much simpler and
probably less buggy (had hacks to avoid segfaults when reading
thumbnails etc.). i am a bit worried that i might have broken fetching
of files that are an exact multiple of BULK_READ_SIZE in size. i think
the code is correct but have not been able to try since i do not have
a flash reader and therefore cannot place a file matching these
criterias on the flash. this is the code i am talking about :
changed :
size=0x2000;
...
if ((total-expect) <= 0x2000)
size=total-expect;
else
size=0x2000;
to :
size = BULK_READ_SIZE;
...
if ((total-expect) < size)
size=total-expect;
as i said, the code seems correct to me but all code has bugs...
* rewrote the 'dump data to file if exif-parsing fails' in
psa50_get_thumbnail() to include the name of the thumbnail in the dump
file name and also open it with O_EXCL and mode 0600 to prevent
security issues (if root for example downloads files from the camera
in /tmp where a malicious user has placed a symlink
'canon-death-dump.dat -> /etc/passwd').
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2338 67ed7778-7388-44ab-90cf-0a291f65f57c
with code that chose the width and height using the data sent by the camera
in the image data header (first six bytes which starts with ffc2)
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2334 67ed7778-7388-44ab-90cf-0a291f65f57c