Some .c files changed, so update the file checksums for them in the
.spdx file to keep things up to date for a release.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Again, code scanners really don't like C string functions, and warn
about the potential for a buffer to possibly be too big for a snprintf()
call as the checking wasn't quite correct. Fix the check for a buffer
overflow up better and handle any potential issues that checking tools
could come up with.
No real functional change as the sysfs path should be just fine. And
really, this is all just userspace code...
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
We "know" the sysfs attribute is not going to be bigger than the buffer,
but the thousands of "ooh, a strcpy() call is bad for you!" scanning
tools do not. So to shut them up, use strncpy() just to make things
quiet and for us to stop getting foolish reports.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
There is a new file in the repo, and the checksums have changed in many
others, so update the .spdx file to reflect this.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
That's our defined style and that we've been using in the majority of
the codebase.
Disable clang-format on a couple of sections, where it gets a silly
moment and insists on reformatting everything.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Throw clang into the matrix, so we get a bit of extra coverage. As
evidenced by the disabled warning - it does catch extra issues.
Currently enabled only for 64bit builds, since fiddling with environment
variables and cross-files is more tricky than I can be asked atm x-D
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The meson build system can create and change into the directory on its
own. Drop the manual steps.
Silly copy/paste left over from another project this file originates.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
I've introduced the container an year or so ago, to avoid the manual
pacman.conf fiddle. Although the last few months it wasn't quite working
as expected due to expired publishing tokens et al.
With that fixed we can use it \o/
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Add support for parsing the Class-specific VC Interrupt Endpoint
Descriptor as described in UVC 1.1 spec 3.8.2.2.
Sample output, including the preceding endpoint descriptor:
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 8
bMaxBurst 0
VideoControl Endpoint Descriptor:
bLength 5
bDescriptorType 37
bDescriptorSubtype 3 (EP_INTERRUPT)
wMaxTransferSize 16
Signed-off-by: Torleiv Sundre <torleiv@huddly.com>
The lists were never being cleaned up when finished, so properly walk
them and free the allocated the memory that was allocated.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The list.h code is REALLY old, from a very old kernel version. Import
the CCAN version instead, and move the code to use it. This is in
anticipation of fixing up the memory leaks in this area.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add Miguel's copyright information as he was the original committer of
the file to Linux. Also remove the unneeded Documentation/ entry as
that makes no sense in this project.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It will help enforce the style defined in .clang-format, only for newly
introduced changes. Pre-existing style issues will not be flagged,
unless the lines are changed with given commit.
If a particular section needs to be ignored, it should be wrapped in
clang-format off/on section.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
We all have things larger than 80 columns these days. If this gets too
out of hand, we can reduce it later.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Most editors support the config format out of the box and with some
patches in the works, it's great to have something in-tree to avoid
(further) mixing the style.
The format is sufficient to handle basic indentation size/style and line
length. More elaborate style tracking can be done with clang-format...
incoming with a later patch.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The former is clang-only, which has been clean for a while. While the
latter is gone with the hash tables removal as of earlier commits.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This seems like a premature ahead-of-time optimisation, which actually
hurts both code/binary size while providing no performance benefit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This seems like a premature ahead-of-time optimisation, which actually
hurts both code/binary size while providing no performance benefit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This seems like a premature ahead-of-time optimisation, which actually
hurts both code/binary size while providing no performance benefit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Now that the man pages moved around, and we flushed out the remaining
copyright/license file descriptions, update the .spdx file with all of
the latest information.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add a workflow to check for issues reported by reuse-tool. The version
installed is picked from usbutils.spdx, so we get consistent results.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Move the files into designated place, so they're easier to find and
reason with.
While in here, simplify the install_man() call to only include the
strings. Meson will convert them to files() and deduce the correct path
based on the file extension.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The actions design in codeql.yml is Lucas' so credit him. The main.yml
file is based on our joint work.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The usbhid-dump repo was imported a while ago, while the upstream
repository has become dormant. Just remove the .gitmodules file.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The usbhid-dump project effectively lives in this repo (it was a git
module ages ago), so there's little point in the separate build file(s).
People can still build usbhid-dump alone, as below:
ninja -C builddir/ usbhid-dump
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Now that we have more license and copyright information, update the
usbutils.spdx file to reflect this information.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Now that the build/test scripts use this license, it needs to be added
to the repo to make REUSE happy.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Seemingly the CodeQL folks push 1-2 releases a week and the knock on
affect is that dependabot will open PRs every week.
Just move to monthly checks/updates.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
With the API fixed and most data annotated as read-only, we can flip the
warning back on.
In theory all the arrays in usb-spec.h can be make constant, although
atm the entries have link to other (hashed) entries and is populated at
program startup.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>