C23 treats the return values of strrchr() and strchr() as const char *
when the input string is const-qualified. Update local variables to use
const char * where appropriate to avoid discarded-qualifier warnings and
build failures with -std=gnu23.
No functional change intended.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The linux-hotplug mechanism has been replaced by udev and hwdb for
quite some time now, so we can remove the support for packaging
libgphoto2 with linux-hotplug.
For a rough idea of the timeline of linux-hotplug being replaced,
the last release of hotplug appears to have been in March of 2004:
https://sourceforge.net/projects/linux-hotplug/files/
and the Fedora 5 (released March 20, 2006) release notes
mention the hotplug package having been removed.
While adding support for "make rpm" appeared to be a good idea in the
early 2000s, it really is not and only clutters up the build system.
At least the libgphoto2_port translation cannot have worked in the
rpm package since at least 5255d80210
from 2007-10-28, so it is a good guess that this has not really been
in use.
The gphoto2 device database (gp2ddb) was originally intended to
replace the device lists in the camlib code by a device list
maintained in a text file outside of the camlib C code.
This device list file could then be changed without
recompiling camlibs, at the cost of adding a simple gp2ddb
to internal binary representation compiler to libgphoto2.
This would have allowed a user to very easily add a new camera
model to the list of camera models supported by a specific
camlib, as long as that new camera model uses the same
protocol as already supported camera models do.
As the gp2ddb idea has never been developed any further in the
15 yearns since my initial commit from 2006, this idea appears
to be obsolete and can thus be removed from the codebase.
Since commit 1455cf8dbfd0 ("driver core: emit uevents when
device is bound to a driver") the kernel started emitting
"bind" and "unbind" uevents which confuse the libgphoto2
udev rules.
This caused ID_GPHOTO2 and GPHOTO2_DRIVER udev properties not being set
on devices, causing them not to be visible to user-space that uses those
properties (such as gvfs' gphoto2 backend).
See https://github.com/systemd/systemd/issues/8221
Convert bash scripts to more generic shell scripts. This removes the
strict bash dependency and the scripts should now run with any posix
shell. Also fix the issues reported by shellcheck while at it.
print-camera-list.c: In function 'ddb_delayed_head':
print-camera-list.c:887:2: error: too many arguments to function 'gpi_enum_to_string'
gpi_enum_to_string(a->device_type,
^~~~~~~~~~~~~~~~~~
In file included from ../../libgphoto2_port/gphoto2/gphoto2-port-info-list.h:63:0,
from ../../gphoto2/gphoto2-abilities-list.h:30,
from ../../gphoto2/gphoto2-camera.h:50,
from print-camera-list.c:53:
../../libgphoto2_port/gphoto2/gphoto2-port-log.h:185:3: note: declared here
gpi_enum_to_string(const unsigned int _enum,
^~~~~~~~~~~~~~~~~~
print-camera-list.c:897:2: error: too many arguments to function 'gpi_enum_to_string'
gpi_enum_to_string(a->status,
^~~~~~~~~~~~~~~~~~
In file included from ../../libgphoto2_port/gphoto2/gphoto2-port-info-list.h:63:0,
from ../../gphoto2/gphoto2-abilities-list.h:30,
from ../../gphoto2/gphoto2-camera.h:50,
from print-camera-list.c:53:
../../libgphoto2_port/gphoto2/gphoto2-port-log.h:185:3: note: declared here
gpi_enum_to_string(const unsigned int _enum,
^~~~~~~~~~~~~~~~~~
Fixes: 43d9449161 ("New syntax for print-camera-list's udev output")
References: https://github.com/gphoto/libgphoto2/issues/109
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
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
AM_CPPFLAGS and CPPFLAGS are used both during build, so
no need to use merge them together in configure.
also move the -I$(xx) stuff into Makefile* to avoid
shell expansion issues.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14269 67ed7778-7388-44ab-90cf-0a291f65f57c
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
Add support for printing udev rules for usbdiskdirect port cameras
(such as the st2205). Note that the udev rule applies to the /dev/sdx
node instead of to the /dev/usb/.... one, as that is the one which needs
to get its acl's set properly to allow users access.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12777 67ed7778-7388-44ab-90cf-0a291f65f57c