summaryrefslogtreecommitdiff
path: root/src/udev/scsi_id
AgeCommit message (Collapse)AuthorFilesLines
2018-09-10udev/scsi_id: drop never used code blocksYu Watanabe1-15/+0
2018-09-10udev/scsi_id: coding style fixesYu Watanabe1-6/+3
2018-09-10udev/scsi_id: drop unused udev structYu Watanabe3-122/+71
2018-08-23udev: move udev cleanup functions from udev-util.h to udev.hYu Watanabe1-0/+1
2018-07-23tree-wide: drop empty lines in commentsYu Watanabe3-3/+0
2018-06-19scsi_id: Fixup prefix for pre-SPC inquiry replyHannes Reinecke1-2/+2
The prefix for EMC Symmetrix pre-SPC VPD inquiry reply is always SCSI_ID_NAA, so we need to hardcode it to avoid false values here. Signed-off-by: Hannes Reinecke <hare@suse.com>
2018-06-14Drop more license boilerplateZbigniew Jędrzejewski-Szmek3-36/+0
$ git grep -e 'This program is free software' -l |grep -v LICENSE | \ xargs perl -i -0pe 's/ \* This program.*?for more details.\s*\*\n( \* You should have.*licenses.>.\n)?//gms' For some reason they were missed previously. All those files seem to have proper SDPX tags.
2018-06-14tree-wide: use proper unicode © instead of (C) where we canLennart Poettering3-4/+4
Let's use a proper unicode copyright symbol where we can, it's prettier. This important patch is very important.
2018-06-08scsi_id: use _cleanup_free_ on buffer allocated by get_file_optionsFilipe Brandenburger1-3/+2
This simplifies the code a bit and hopefully fixes Coverity finding CID 1382966. There was not actually a resource leak here (Coverity seemed to be confused by thinking log_oom() could actually return 0), but the fix doesn't hurt and should make this code more resilient to future refactorings. Tested: builds fine, manually called scsi_id, seems to work ok.
2018-04-25tree-wide: drop redundant _cleanup_ macros (#8810)Lennart Poettering1-3/+2
This drops a good number of type-specific _cleanup_ macros, and patches all users to just use the generic ones. In most recent code we abstained from defining type-specific macros, and this basically removes all those added already, with the exception of the really low-level ones. Having explicit macros for this is not too useful, as the expression without the extra macro is generally just 2ch wider. We should generally emphesize generic code, unless there are really good reasons for specific code, hence let's follow this in this case too. Note that _cleanup_free_ and similar really low-level, libc'ish, Linux API'ish macros continue to be defined, only the really high-level OO ones are dropped. From now on this should really be the rule: for really low-level stuff, such as memory allocation, fd handling and so one, go ahead and define explicit per-type macros, but for high-level, specific program code, just use the generic _cleanup_() macro directly, in order to keep things simple and as readable as possible for the uninitiated. Note that before this patch some of the APIs (notable libudev ones) were already used with the high-level macros at some places and with the generic _cleanup_ macro at others. With this patch we hence unify on the latter.
2018-04-19tree-wide: drop spurious newlines (#8764)Lennart Poettering1-1/+0
Double newlines (i.e. one empty lines) are great to structure code. But let's avoid triple newlines (i.e. two empty lines), quadruple newlines, quintuple newlines, …, that's just spurious whitespace. It's an easy way to drop 121 lines of code, and keeps the coding style of our sources a bit tigther.
2018-03-16udev: use startswith() instead of the combination of strneq() and strlen() ↵Yu Watanabe1-3/+2
(#8459)
2017-12-25tree-wide: use EXIT_SUCCESS/EXIT_FAILURE in exit() where we canLennart Poettering1-3/+3
2017-11-20tree-wide: adjust fall through comments so that gcc is happyShawn Landden1-1/+1
Distcc removes comments, making the comment silencing not work. I know there was a decision against a macro in commit ec251fe7d5bc24b5d38b0853bc5969f3a0ba06e2
2017-11-19Add SPDX license identifiers to source files under the GPLZbigniew Jędrzejewski-Szmek4-0/+4
2017-10-04tree-wide: use IN_SET macro (#6977)Yu Watanabe1-8/+5
2017-10-02tree-wide: use IN_SET where possibleAndreas Rammhold1-1/+1
In addition to the changes from #6933 this handles cases that could be matched with the included cocci file.
2017-08-02scsi_id: add missing options to getopt_long() (#6501)Jan Synacek1-1/+1
2017-07-18build-sys: drop gitignore patterns for in-tree buildsZbigniew Jędrzejewski-Szmek1-1/+0
... and other autotools-generated files.
2017-07-18build-sys: drop automake supportZbigniew Jędrzejewski-Szmek1-1/+0
v2: - also mention m4
2017-05-07Rip out setting of the log level from udev_new and put it in a new functionZbigniew Jędrzejewski-Szmek1-0/+2
This function is internal to systemd code, so external users of libudev will not see those log messages. I think this is better. If we want to allow that, the function could be put in libudev and exported. v2: check that the string is more than one char before stripping quotes
2017-04-04tree-wide: standardize on $(PACKAGE_VERSION) for the version stringZbigniew Jędrzejewski-Szmek1-1/+1
We defined both $(VERSION) and $(PACKAGE_VERSION) with the same contents. $(PACKAGE_VERSION) is slightly more descriptive, so settle on that, and drop the other define.
2016-02-20tree-wide: place #pragma once at the same place everywhereLennart Poettering2-4/+4
Usually, we place the #pragma once before the copyright blurb in header files, but in a few cases we didn't. Move those around, so that we do the same thing everywhere.
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack4-8/+0
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2015-12-07udev/scsi_id: fix some strange indentationZbigniew Jędrzejewski-Szmek2-69/+68
2015-12-07udev: add emacs header lineZbigniew Jędrzejewski-Szmek4-0/+8
Otherwise emacs wants to use 2-space indentation and other attrocities.
2015-11-17tree-wide: group include of libudev.h with sd-*Thomas Hindoe Paaboel Andersen2-2/+4
2015-11-16tree-wide: sort includesThomas Hindoe Paaboel Andersen2-4/+2
Sort the includes accoding to the new coding style.
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering1-0/+1
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2-19/+23
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-09-09tree-wide: replace while(1) by for(;;) everywhereLennart Poettering1-1/+1
Another Coccinelle script.
2015-09-09tree-wide: update empty-if coccinelle script to cover empty-while and moreLennart Poettering2-12/+7
Let's also clean up single-line while and for blocks.
2015-09-09tree-wide: drop {} from one-line if blocksLennart Poettering1-2/+1
Patch via coccinelle.
2015-04-11shared: add random-util.[ch]Ronny Chevalier1-0/+1
2015-01-23#pragma once here and thereZbigniew Jędrzejewski-Szmek2-0/+4
2015-01-05udevadm,..: make --help output of udev tools more like the output of the ↵Lennart Poettering1-13/+15
various other tools
2015-01-01udev: improve help/usage for some more programsRobert Milasan1-1/+1
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2-4/+4
If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
2014-11-13udev: switch to systemd logging functionsKay Sievers1-11/+0
2014-11-01scsi_id: fix usage spellingJoe Lawrence1-2/+2
s/threat/treat/g
2014-10-30util: unify how we see srand()Lennart Poettering1-1/+1
2014-08-11build-sys: add missing makefile symlinksLennart Poettering1-0/+1
2014-08-11udev: never bypass our own logging framework and call vsyslog() directly ↵Lennart Poettering2-6/+8
from udev tools
2014-02-24Remove dead lines in various placesZbigniew Jędrzejewski-Szmek1-1/+0
As pointed-out by clang -Wunreachable-code. No behaviour changes.
2014-02-13everywhere: always use O_CLOEXEC where it makes senseLennart Poettering1-2/+2
2014-01-31use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH1-8/+8
In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
2013-12-24log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering2-38/+38
including it in the log strings
2013-12-18udevadm,scsi_id: add short options to help strings and to the man pageZbigniew Jędrzejewski-Szmek1-14/+19
Also clean things up a bit here and there.
2013-12-18scsi_id: cleanupZbigniew Jędrzejewski-Szmek2-79/+71
Remove -i option which would case exit(1) to happen. Remove some unused code. Convert to bool where appropriate. Simplify things a bit. Always free everything. https://bugzilla.redhat.com/show_bug.cgi?id=1043304
2013-12-14Add more _printf_'s for format-nonliteralsThomas Hindoe Paaboel Andersen1-0/+1
Clang is a bit more strict wrt format-nonliterals: http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking Adding these extra printf attributes also makes gcc able to find more problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c Some parts looked intetional about breaking the format-nonliteral check. I added some supression for warnings there.