summaryrefslogtreecommitdiff
path: root/camlibs/directory/directory.c
Commit message (Collapse)AuthorAgeFilesLines
* directory: enable storage_info_func on any platformPino Toscano2020-10-241-1/+1
| | | | | | | Now that a POSIX function (statvfs) is used, it is possible to unconditionally enable storage_info_func on any platform. The build system already checks for the availability of statvfs, so there should be no problems using it when available.
* directory: use statvfs instead of statfsPino Toscano2020-10-241-6/+3
| | | | | | | | | | | statfs is a non-portable function available only on few OSes (Linux for example). Because of this, the storage_info_func provides results only on Linux. Switch it to statvfs instead: it is a POSIX function, so portable and supposedly available on any POSIX platform. Switch the build system bits from statfs to statvs, removing any statfs leftover. The used APIs of statfs are available as the same when using statvfs.
* mime type update for CR3Jiri Machalek2020-10-131-0/+1
|
* Remove trailing whitespace from all *.h and *.c files.Siim Meerits2020-07-271-12/+12
|
* BSD_SOURCE -> DEFAULT_SPURCEMarcus Meissner2018-06-201-1/+1
|
* Use off_t when calculating read sizeØrjan Eide2018-03-271-1/+1
| | | | | | When reading large files, above 4GiB size, get_file_func() would eventually calculate a toread value of 0, when reaching size % 4GiB == 0, and spin forever reading nothing.
* remove probably unistd.h include , or protected by ifdef forMarcus Meissner2016-01-031-1/+0
| | | | | | building better with Visual C https://github.com/gphoto/libgphoto2/issues/33
* removed copyright umlauts and replaced other umlautsMarcus Meissner2014-06-271-1/+1
| | | | | | | by international spelling git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15027 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: "Daniel P. Berrange" <dan@berrange.com>Marcus Meissner2014-04-111-2/+2
| | | | | | | | | | Many calls of gp_file_* functions are passing a 'unsigned char *' rather than the 'char *' they expect. Add explicit casts to silence the compiler. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14900 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: "Daniel P. Berrange" <berrange@redhat.com>Marcus Meissner2014-04-111-1/+1
| | | | | | | | | | A great many functions have variables which are set to some value, but never read thereafter. All these variables can be removed with no functional impact. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14896 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: "Daniel P. Berrange" <dan@berrange.com>Marcus Meissner2014-04-111-0/+2
| | | | | | | | | | The _get_path method in the directory driver does not check the return value of _get_mountpoint causing it to use potentially uninitialized data. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14894 67ed7778-7388-44ab-90cf-0a291f65f57c
* win32 fixes. Marcus Meissner2014-02-221-0/+5
| | | | | | | use stat instead of lstat git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14777 67ed7778-7388-44ab-90cf-0a291f65f57c
* avoid leaking directory handle (Coverity)Marcus Meissner2014-01-061-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14661 67ed7778-7388-44ab-90cf-0a291f65f57c
* updated fsf addressMarcus Meissner2014-01-011-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14608 67ed7778-7388-44ab-90cf-0a291f65f57c
* added NRW nikon filesMarcus Meissner2013-08-241-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14508 67ed7778-7388-44ab-90cf-0a291f65f57c
* free buf in errorpathMarcus Meissner2013-05-011-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14376 67ed7778-7388-44ab-90cf-0a291f65f57c
* added _BSD_SOURCE or _POSIX_C_SOURCE for -ansi buildingMarcus Meissner2013-02-201-0/+3
| | | | | | | replaced // comments with /* */ comments git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14246 67ed7778-7388-44ab-90cf-0a291f65f57c
* added oggMarcus Meissner2012-02-011-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13853 67ed7778-7388-44ab-90cf-0a291f65f57c
* added mp3, mp4Marcus Meissner2012-02-011-0/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13851 67ed7778-7388-44ab-90cf-0a291f65f57c
* added .rw2 file typeMarcus Meissner2011-12-011-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13784 67ed7778-7388-44ab-90cf-0a291f65f57c
* set mtime also during get()Marcus Meissner2011-06-051-5/+9
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13648 67ed7778-7388-44ab-90cf-0a291f65f57c
* added srwMarcus Meissner2011-05-201-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13634 67ed7778-7388-44ab-90cf-0a291f65f57c
* add some more file extensionsMarcus Meissner2011-05-201-0/+9
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13632 67ed7778-7388-44ab-90cf-0a291f65f57c
* added .gf1Marcus Meissner2011-02-211-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13532 67ed7778-7388-44ab-90cf-0a291f65f57c
* added srw and thm as new mimetypesMarcus Meissner2011-01-071-0/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13479 67ed7778-7388-44ab-90cf-0a291f65f57c
* Changed the GP_MIME_AVCHD MIME type to an officially-registered oneDan Fandrich2010-11-011-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13375 67ed7778-7388-44ab-90cf-0a291f65f57c
* added avhd video supportMarcus Meissner2010-09-191-0/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13324 67ed7778-7388-44ab-90cf-0a291f65f57c
* Replace all %m format stringsHans Ulrich Niedermann2010-02-011-6/+12
| | | | | | | | | | | | | | %m is a glibc extension and can be replaced by %s and strerror(errno). On systems not supporting %m, the output formerly contained a literal %m, which will now be the real error message. We also explititly save errno in a temporary variable saved_errno now to make sure that e.g. the _() translation calls do not modify errno before errno is used to determine the corresponding error message string. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12677 67ed7778-7388-44ab-90cf-0a291f65f57c
* Batch commit from weekend work:Marcus Meissner2009-02-161-1/+1
| | | | | | | | | | | | | | - removed "type" from CameraFile handling: - all put_file functions and hooks get "type" as argument now - added type to the set_file_info_noop call - started removal of "name" from CameraFile - generate new filename from original filename + camerafile type + mimetype - new gp_camera_autodetect() helper function - adapted all drivers. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11818 67ed7778-7388-44ab-90cf-0a291f65f57c
* * removed CameraFileInfoFile.name, adjusted usersMarcus Meissner2009-01-251-6/+1
| | | | | | | | | | and callers. * added filename argument to put_file_func, set_info_noop and set_file_noop functions. adjusted all camlibs git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11773 67ed7778-7388-44ab-90cf-0a291f65f57c
* disable more info.name handlingMarcus Meissner2009-01-101-1/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11684 67ed7778-7388-44ab-90cf-0a291f65f57c
* GPPortInfo struct abstracted into a private struct.Marcus Meissner2008-03-151-117/+83
| | | | | | | | | | - libgphoto2_port rewritten for new GPPortInfo. - camlibs/directory and camlibs/ptp2 adjusted. - libgphoto2/ adjusted for the changed GPPortInfo list handling. - configure.ac adjusted, NEWS adjusted git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10990 67ed7778-7388-44ab-90cf-0a291f65f57c
* need to use strcasecmp instead of stricmpMarcus Meissner2008-01-171-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10934 67ed7778-7388-44ab-90cf-0a291f65f57c
* unbreak build without libexif.Hubert Figuiere2007-12-051-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10890 67ed7778-7388-44ab-90cf-0a291f65f57c
* use direct UNIX I/O, but in 64kb blocks to allow progress.Marcus Meissner2007-10-271-18/+49
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10824 67ed7778-7388-44ab-90cf-0a291f65f57c
* * camlibs/directory/directory.c: added more RAW types.Hubert Figuiere2007-04-081-0/+8
| | | | | | | | Should fix bug #1696551 http://gphoto.org/bugs/?id=1696551 git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10075 67ed7778-7388-44ab-90cf-0a291f65f57c
* added get storage information based on statfs()Marcus Meissner2007-01-171-0/+66
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9893 67ed7778-7388-44ab-90cf-0a291f65f57c
* * camlibs/directory/directory.c (file_list_func): ignore entriesHubert Figuiere2007-01-031-30/+36
| | | | | | | | | that start with '.' (folder_list_func): ignore entries that start with '.' Some code style cleaning. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9848 67ed7778-7388-44ab-90cf-0a291f65f57c
* Consistently use #include <gphoto2/gphoto2-foo.h> everywhere.Hans Ulrich Niedermann2006-09-281-4/+4
| | | | | | | | | | This moves the header files to a new subdirectory gphoto2 in both libgphoto2 and libphoto2_port/libgphoto2. All references are adapted appropriately. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9221 67ed7778-7388-44ab-90cf-0a291f65f57c
* * directory.c: Added more extensions as file types.Hubert Figuiere2006-06-051-1/+7
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8840 67ed7778-7388-44ab-90cf-0a291f65f57c
* use static fsfuncsMarcus Meissner2006-03-191-12/+13
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8630 67ed7778-7388-44ab-90cf-0a291f65f57c
* use the name "Mass Storage Camera" to avoid clientMarcus Meissner2005-08-171-0/+5
| | | | | | | hacks against "Directory Browse" git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8215 67ed7778-7388-44ab-90cf-0a291f65f57c
* has GP_PORT_DISK, remove some no longer available operations.Marcus Meissner2005-08-161-7/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8213 67ed7778-7388-44ab-90cf-0a291f65f57c
* mark the UNIX / as empty ...Marcus Meissner2005-08-151-8/+17
| | | | | | | | If someone erroneously opens it the camera client should not traverse the whole unix fs. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8211 67ed7778-7388-44ab-90cf-0a291f65f57c
* - dropped strange symlink handlingMarcus Meissner2005-08-141-142/+64
| | | | | | | - fixed all other non-base accessor functions git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8210 67ed7778-7388-44ab-90cf-0a291f65f57c
* drop fprintfsMarcus Meissner2005-08-141-6/+0
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8209 67ed7778-7388-44ab-90cf-0a291f65f57c
* support GP_PORT_DISK ports with their directories .Marcus Meissner2005-08-141-34/+95
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8208 67ed7778-7388-44ab-90cf-0a291f65f57c
* keep namespace clear: rename GP_SYSTEM_* to gp_system_*Hans Ulrich Niedermann2005-06-111-32/+32
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8070 67ed7778-7388-44ab-90cf-0a291f65f57c
* aftermath of build system updateHans Ulrich Niedermann2005-04-151-5/+5
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@7850 67ed7778-7388-44ab-90cf-0a291f65f57c
* Update Lutz's emailArnaud Launay2003-07-131-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6576 67ed7778-7388-44ab-90cf-0a291f65f57c