Find a file
Jan Höppner f5f43aae6f partitions/ibm: Replace strncpy() and improve readability
strncpy() is deprecated and needs to be replaced. The volume label
information strings are not nul-terminated and strncpy() can simply be
replaced with memcpy().

To enhance the readability of find_label() alongside this change, the
following improvements are made:
- Introduce the array dasd_vollabels[] containing all information
  necessary for the label detection.
- Provide a helper function to obtain an index value corresponding to a
  volume label type. This allows the use of a switch statement to reduce
  indentation levels.
- The 'temp' variable is used to check against valid volume label types.
  In the good case, this variable already contains the volume label type
  making it unnecessary to copy the information again from e.g.
  label->vol.vollbl. Remove the 'temp' variable and the second copy as
  all information are already provided.
- Remove the 'found' variable and replace it with early returns

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20230915131001.697070-3-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-10-04 08:04:08 -06:00
arch Misc fixes: 2023-09-17 11:13:37 -07:00
block partitions/ibm: Replace strncpy() and improve readability 2023-10-04 08:04:08 -06:00
certs
crypto
Documentation Driver core fix for 6.6-rc2 2023-09-16 11:26:52 -07:00
drivers aoe: replace strncpy with strscpy 2023-10-03 18:23:48 -06:00
fs stat: remove no-longer-used helper macros 2023-09-17 10:46:12 -07:00
include badblocks: add more helper structure and routines in badblocks.h 2023-09-26 00:44:33 -06:00
init
io_uring io_uring/net: fix iter retargeting for selected buf 2023-09-14 10:12:55 -06:00
ipc
kernel Fix a performance regression on large SMT systems, an Intel SMT4 2023-09-17 11:10:23 -07:00
lib linux-kselftest-kunit-6.6-rc2 2023-09-12 09:05:49 -07:00
LICENSES
mm vm: fix move_vma() memory accounting being off 2023-09-16 15:23:31 -07:00
net kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg(). 2023-09-14 10:43:51 +02:00
rust
samples
scripts Kbuild fixes for v6.6 2023-09-16 15:27:00 -07:00
security selinux: fix handling of empty opts in selinux_fs_context_submount() 2023-09-12 17:31:08 -04:00
sound
tools Fix a cold functions related false-positive objtool warning 2023-09-17 10:59:37 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS This pull-request renames the genpd subsystem to pmdomain. 2023-09-13 14:18:19 -07:00
Makefile Linux 6.6-rc2 2023-09-17 14:40:24 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.