Commit 87524f37 authored by Andreas Henriksson's avatar Andreas Henriksson

New upstream version 2.33.1

parents 20b360c3 539fb3c7
......@@ -175,6 +175,7 @@ CONTRIBUTORS:
Chris MacGregor <chrismacgregor@google.com>
Chris Metcalf <cmetcalf@mellanox.com>
Chris Morin <chris.morin2@gmail.com>
Christian Hesse <mail@eworm.de>
Christian von Roques <roques@juliet.ka.sub.org>
Christian Wiese <chris@opensde.org>
Christophe Blaess <Christophe@Blaess.fr>
......@@ -333,6 +334,7 @@ CONTRIBUTORS:
Jason Borden <jborden@bluehost.com>
Jason Vas Dias <jvdias@redhat.com>
Jean-Loup 'clippix' Bogalho <clippix@lse.epita.fr>
Jean-Philippe ROMAIN <jean-philippe.romain@st.com>
Jeff Mahoney <jeffm@suse.com>
Jens Kristian Søgaard <jens@mermaidconsulting.dk>
Jeremy Fitzhardinge <jeremy@suite.sw.oz.au>
......@@ -350,6 +352,7 @@ CONTRIBUTORS:
John Keeping <john.keeping@lineone.net>
John Lindgren <john.lindgren@tds.net>
John Paul Morrison <jmorriso@rflab.ee.ubc.ca>
John W Higgins <wishdev@gmail.com>
John W. Linville <linville@tuxdriver.com>
Jonathan Liu <net147@gmail.com>
Jon Grant <jg@jguk.org>
......@@ -473,6 +476,7 @@ CONTRIBUTORS:
Nik Nyby <nikolas@gnu.org>
Nikolay Sivov <nsivov@codeweavers.com>
Nilgün Belma Bugüner <nilgun@buguner.name.tr>
Noel Cragg <noel@squeezehead.com>
Norbert Buchmuller <norbi@nix.hu>
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Oliver Falk <oliver@linux-kernel.at>
......@@ -487,6 +491,7 @@ CONTRIBUTORS:
Patrice Dumas <pertusus@free.fr>
Patrick Plagwitz <patrick.plagwitz@fau.de>
Patrick Steinhardt <ps@pks.im>
Paul Asmuth <paul@asmuth.com>
Paul Eggert <eggert@cs.ucla.edu>
Paul Fox <pgf@laptop.org>
Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
......@@ -584,6 +589,7 @@ CONTRIBUTORS:
Serge Hallyn <serge.hallyn@ubuntu.com>
Sergei Antonov <saproj@gmail.com>
Sergey Gusarov <laborer2008@gmail.com>
Seth Girvan <snth@snthhacks.com>
Sevan Janiyan <venture37@geeklan.co.uk>
sgargel <sgargel@yahoo.it>
Shachar Shemesh <shachar@debian.org>
......@@ -621,6 +627,7 @@ CONTRIBUTORS:
Thierry Reding <thierry.reding@avionic-design.de>
Thierry Vignaud <thierry.vignaud@gmail.com>
Thomas Bächler <thomas@archlinux.org>
Thomas Deutschmann <whissi@gentoo.org>
Thomas Fehr <fehr@suse.de>
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas Schwinge <thomas@codesourcery.com>
......
See version control history.
http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=log;h=2.33
http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=log;h=2.33.1
util-linux 2.33.1 Release Notes
===============================
agetty:
- Return old behavior with empty logname [Stanislav Brabec]
- fix output of escaped characters [Christian Hesse]
- fix portability issues [Samuel Thibault]
build-sys:
- do not require crypt() [Karel Zak]
- do not require dirfd() [Karel Zak]
- make fdisk, sfdisk, cfdisk optional (enabled by default) [Carlos Santos]
chmem:
- add initilizer [clang] [Sami Kerola]
choom:
- fix negative adjust score usage [Karel Zak]
dmesg:
- correct "-n, --console-level level" example in manual page [Jean-Philippe ROMAIN]
docs:
- add link to mail list archive [Sami Kerola]
- update AUTHORS file [Karel Zak]
fstrim:
- Add Documentation key to fstrim.service [Andreas Henriksson]
- fix usage() [Karel Zak]
include/c:
- re-add type checking in container_of() [Ruediger Meier]
libblkid:
- (ntfs) fix compiler warning [-Wpedantic] [Karel Zak]
- fix detection of dm-integrity superblock [Milan Broz]
- stratis correct byte order [Tony Asleson]
libmount:
- (umount) make mnt_stat_mountpoin() usable for relative paths [Karel Zak]
libuuid:
- fix man page typos [Seth Girvan]
mkswap:
- fix page size warning message [Noel Cragg]
- use dd(1) in example rather than fallocate(1) [Karel Zak]
po:
- merge changes [Karel Zak]
- update es.po (from translationproject.org) [Antonio Ceballos Roa]
- update sv.po (from translationproject.org) [Sebastian Rasmussen]
setarch:
- fix obscure sparc32bash use-case [Karel Zak]
tests:
- check for tar and {b,g}zip [Karel Zak]
- enlarge backing file for fstab-btrfs [Karel Zak]
- make lsns-netnsid portable [Karel Zak]
- run oids test only when uuidgen tool was built [Thomas Deutschmann]
umount:
- fix --quiet [Karel Zak]
uuidd:
- Add Documentation key to uuidd.service [Andreas Henriksson]
......@@ -158,8 +158,8 @@ check_PROGRAMS = test_blkdev$(EXEEXT) test_canonicalize$(EXEEXT) \
@USE_PLYMOUTH_SUPPORT_TRUE@am__append_2 = lib/plymouth-ctrl.c
@HAVE_LANGINFO_FALSE@am__append_3 = lib/langinfo.c
@HAVE_CPU_SET_T_TRUE@am__append_4 = lib/cpuset.c
@HAVE_OPENAT_TRUE@am__append_5 = lib/path.c lib/procutils.c \
@HAVE_OPENAT_TRUE@ lib/sysfs.c
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@am__append_5 = lib/path.c \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ lib/procutils.c lib/sysfs.c
# tinfo or ncurses are optional
@HAVE_TINFO_TRUE@am__append_6 = $(TINFO_LIBS)
@HAVE_TINFO_TRUE@am__append_7 = $(TINFO_CFLAGS)
......@@ -170,8 +170,9 @@ check_PROGRAMS = test_blkdev$(EXEEXT) test_canonicalize$(EXEEXT) \
@LINUX_TRUE@ test_sysfs \
@LINUX_TRUE@ test_pager
@HAVE_OPENAT_TRUE@am__append_12 = test_procutils test_path
@HAVE_CPU_SET_T_TRUE@@HAVE_OPENAT_TRUE@am__append_13 = lib/cpuset.c
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@am__append_12 = test_procutils \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ test_path
@HAVE_CPU_SET_T_TRUE@@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@am__append_13 = lib/cpuset.c
@HAVE_CPU_SET_T_TRUE@@LINUX_TRUE@am__append_14 = lib/cpuset.c
@LINUX_TRUE@am__append_15 = test_linux_version
@BUILD_LIBUUID_TRUE@am__append_16 = \
......@@ -1056,9 +1057,10 @@ am__libcommon_la_SOURCES_DIST = lib/blkdev.c lib/canonicalize.c \
@USE_PLYMOUTH_SUPPORT_TRUE@ lib/libcommon_la-plymouth-ctrl.lo
@HAVE_LANGINFO_FALSE@am__objects_4 = lib/libcommon_la-langinfo.lo
@HAVE_CPU_SET_T_TRUE@am__objects_5 = lib/libcommon_la-cpuset.lo
@HAVE_OPENAT_TRUE@am__objects_6 = lib/libcommon_la-path.lo \
@HAVE_OPENAT_TRUE@ lib/libcommon_la-procutils.lo \
@HAVE_OPENAT_TRUE@ lib/libcommon_la-sysfs.lo
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@am__objects_6 = \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ lib/libcommon_la-path.lo \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ lib/libcommon_la-procutils.lo \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ lib/libcommon_la-sysfs.lo
am_libcommon_la_OBJECTS = lib/libcommon_la-blkdev.lo \
lib/libcommon_la-canonicalize.lo lib/libcommon_la-crc32.lo \
lib/libcommon_la-crc32c.lo lib/libcommon_la-env.lo \
......@@ -1256,8 +1258,9 @@ pylibmount_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
@BUILD_KILL_TRUE@am__EXEEXT_13 = kill$(EXEEXT)
@HAVE_CPU_SET_T_TRUE@@LINUX_TRUE@am__EXEEXT_14 = test_cpuset$(EXEEXT)
@LINUX_TRUE@am__EXEEXT_15 = test_sysfs$(EXEEXT) test_pager$(EXEEXT)
@HAVE_OPENAT_TRUE@am__EXEEXT_16 = test_procutils$(EXEEXT) \
@HAVE_OPENAT_TRUE@ test_path$(EXEEXT)
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@am__EXEEXT_16 = \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ test_procutils$(EXEEXT) \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ test_path$(EXEEXT)
@LINUX_TRUE@am__EXEEXT_17 = test_linux_version$(EXEEXT)
@BUILD_LIBUUID_TRUE@am__EXEEXT_18 = test_uuid_parser$(EXEEXT)
@BUILD_LIBBLKID_TESTS_TRUE@@BUILD_LIBBLKID_TRUE@am__EXEEXT_19 = test_blkid_cache$(EXEEXT) \
......@@ -2809,12 +2812,13 @@ test_pager_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_pager_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
am__test_path_SOURCES_DIST = lib/path.c lib/fileutils.c lib/cpuset.c
@HAVE_CPU_SET_T_TRUE@@HAVE_OPENAT_TRUE@am__objects_33 = lib/test_path-cpuset.$(OBJEXT)
@HAVE_OPENAT_TRUE@am_test_path_OBJECTS = lib/test_path-path.$(OBJEXT) \
@HAVE_OPENAT_TRUE@ lib/test_path-fileutils.$(OBJEXT) \
@HAVE_OPENAT_TRUE@ $(am__objects_33)
@HAVE_CPU_SET_T_TRUE@@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@am__objects_33 = lib/test_path-cpuset.$(OBJEXT)
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@am_test_path_OBJECTS = lib/test_path-path.$(OBJEXT) \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ lib/test_path-fileutils.$(OBJEXT) \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ $(am__objects_33)
test_path_OBJECTS = $(am_test_path_OBJECTS)
@HAVE_OPENAT_TRUE@test_path_DEPENDENCIES = $(am__DEPENDENCIES_2)
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@test_path_DEPENDENCIES = \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ $(am__DEPENDENCIES_2)
test_path_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_path_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
......@@ -2823,8 +2827,7 @@ test_pathnames_OBJECTS = $(am_test_pathnames_OBJECTS)
test_pathnames_LDADD = $(LDADD)
test_pathnames_DEPENDENCIES = $(am__DEPENDENCIES_1)
am__test_procutils_SOURCES_DIST = lib/procutils.c
@HAVE_OPENAT_TRUE@am_test_procutils_OBJECTS = \
@HAVE_OPENAT_TRUE@ lib/test_procutils-procutils.$(OBJEXT)
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@am_test_procutils_OBJECTS = lib/test_procutils-procutils.$(OBJEXT)
test_procutils_OBJECTS = $(am_test_procutils_OBJECTS)
test_procutils_LDADD = $(LDADD)
test_procutils_DEPENDENCIES = $(am__DEPENDENCIES_1)
......@@ -4007,12 +4010,13 @@ test_colors_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_COLORS
test_colors_LDADD = $(LDADD) libtcolors.la
test_randutils_SOURCES = lib/randutils.c
test_randutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_RANDUTILS
@HAVE_OPENAT_TRUE@test_procutils_SOURCES = lib/procutils.c
@HAVE_OPENAT_TRUE@test_procutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_PROCUTILS
@HAVE_OPENAT_TRUE@test_path_SOURCES = lib/path.c lib/fileutils.c \
@HAVE_OPENAT_TRUE@ $(am__append_13)
@HAVE_OPENAT_TRUE@test_path_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_PATH
@HAVE_OPENAT_TRUE@test_path_LDADD = $(LDADD)
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@test_procutils_SOURCES = lib/procutils.c
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@test_procutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_PROCUTILS
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@test_path_SOURCES = lib/path.c \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ lib/fileutils.c \
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@ $(am__append_13)
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@test_path_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_PATH
@HAVE_DIRFD_TRUE@@HAVE_OPENAT_TRUE@test_path_LDADD = $(LDADD)
@LINUX_TRUE@test_cpuset_SOURCES = lib/cpuset.c
@LINUX_TRUE@test_cpuset_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_CPUSET
@LINUX_TRUE@test_sysfs_SOURCES = lib/sysfs.c lib/path.c \
util-linux 2.33.1: Jan 9 2019
* see Documentation/releases/v2.33.1-ReleaseNotes or the complete changelog at
https://www.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.1-ChangeLog
util-linux 2.33: Nov 6 2018
* see Documentation/releases/v2.33-ReleaseNotes or the complete changelog at
https://www.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33-ChangeLog
......
......@@ -7,8 +7,9 @@
MAILING LIST:
E-MAIL: util-linux@vger.kernel.org
URL: http://vger.kernel.org/vger-lists.html#util-linux
E-MAIL: util-linux@vger.kernel.org
URL: http://vger.kernel.org/vger-lists.html#util-linux
ARCHIVE: https://lore.kernel.org/util-linux/
The mailing list will reject email messages that contain:
- more than 100K characters
......
This diff is collapsed.
......@@ -29,7 +29,7 @@ PACKAGE_VERSION_RELEASE=$(echo $PACKAGE_VERSION | awk -F. '{
dnl libblkid version
LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
LIBBLKID_DATE="06-Nov-2018"
LIBBLKID_DATE="09-Jan-2019"
LIBBLKID_LT_MAJOR=1
LIBBLKID_LT_MINOR=1
LIBBLKID_LT_MICRO=0
......@@ -594,10 +594,7 @@ AS_IF([test x"$have_dirfd" = xno], [
#include <dirent.h>])
])
AS_CASE([$have_dirfd:$have_ddfd],
[no:no],
[AC_MSG_ERROR([cannot find a method to get filedescriptor of directory])]
)
AM_CONDITIONAL([HAVE_DIRFD], [test "x$have_dirfd" = xyes -o "x$have_ddfd" = xyes])
AC_MSG_CHECKING([whether program_invocation_short_name is defined])
......@@ -784,6 +781,7 @@ AC_CHECK_DECLS([CPU_ALLOC], [], [], [[
# on Solaris, you can't mix and match standards, since we use c99
# aparently at this stage, XOPEN_SOURCE will conflict. As workaround,
# check for crypt.h and use that without XOPEN_SOURCE.
have_crypt=no
AC_CHECK_HEADERS([crypt.h])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_CRYPT_H
......@@ -808,8 +806,9 @@ char *c = crypt("abc","pw");
]])],[
AC_DEFINE([HAVE_LIBCRYPT], [1], [Do we need -lcrypt?])
have_libcrypt=yes
have_crypt=yes
],[
AC_MSG_ERROR([crypt() is not available])
AC_MSG_WARN([crypt() is not available])
])
])
AM_CONDITIONAL([HAVE_LIBCRYPT], [test "x$have_libcrypt" = xyes])
......@@ -1065,6 +1064,7 @@ AC_ARG_ENABLE([libblkid],
)
UL_BUILD_INIT([libblkid])
UL_REQUIRES_HAVE([libblkid], [openat], [openat functions])
UL_REQUIRES_HAVE([libblkid], [dirfd,ddfd], [dirfd or ddfd function])
AC_SUBST([LIBBLKID_DATE])
AC_SUBST([LIBBLKID_VERSION])
AC_SUBST([LIBBLKID_VERSION_INFO])
......@@ -1086,6 +1086,7 @@ AC_ARG_ENABLE([libmount],
UL_BUILD_INIT([libmount])
UL_REQUIRES_BUILD([libmount], [libblkid])
UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
UL_REQUIRES_HAVE([libmount], [dirfd,ddfd], [dirfd or ddfd function])
AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes])
AS_IF([test "x$build_libmount" = xyes], [
......@@ -1152,21 +1153,31 @@ AC_SUBST([LIBFDISK_VERSION_INFO])
AC_DEFINE_UNQUOTED([LIBFDISK_VERSION], ["$LIBFDISK_VERSION"], [libfdisk version string])
UL_BUILD_INIT([fdisk], [check])
AC_ARG_ENABLE([fdisks],
AS_HELP_STRING([--disable-fdisks], [do not build fdisk(8), sfdisk(8) and cfdisk(8)]),
[], [UL_DEFAULT_ENABLE([fdisks], [check])]
)
enable_fdisk=$enable_fdisks
enable_sfdisk=$enable_fdisks
enable_cfdisk=$enable_fdisks
UL_BUILD_INIT([fdisk])
UL_REQUIRES_HAVE([fdisk], [openat], [openat functions])
UL_REQUIRES_HAVE([fdisk], [dirfd,ddfd], [dirfd or ddfd function])
UL_REQUIRES_BUILD([fdisk], [libfdisk])
UL_REQUIRES_BUILD([fdisk], [libsmartcols])
AM_CONDITIONAL([BUILD_FDISK], [test "x$build_fdisk" = xyes])
UL_BUILD_INIT([sfdisk], [check])
UL_BUILD_INIT([sfdisk])
UL_REQUIRES_HAVE([sfdisk], [openat], [openat functions])
UL_REQUIRES_HAVE([sfdisk], [dirfd,ddfd], [dirfd or ddfd function])
UL_REQUIRES_BUILD([sfdisk], [libfdisk])
UL_REQUIRES_BUILD([sfdisk], [libsmartcols])
AM_CONDITIONAL([BUILD_SFDISK], [test "x$build_sfdisk" = xyes])
UL_BUILD_INIT([cfdisk], [check])
UL_BUILD_INIT([cfdisk])
UL_REQUIRES_BUILD([cfdisk], [libfdisk])
UL_REQUIRES_BUILD([cfdisk], [libsmartcols])
UL_REQUIRES_HAVE([cfdisk], [open_memstream], [open_memstream function])
......@@ -1628,6 +1639,7 @@ AC_ARG_ENABLE([switch_root],
UL_BUILD_INIT([switch_root])
UL_REQUIRES_LINUX([switch_root])
UL_REQUIRES_HAVE([switch_root], [openat], [openat function])
UL_REQUIRES_HAVE([switch_root], [dirfd,ddfd], [dirfd or ddfd function])
AM_CONDITIONAL([BUILD_SWITCH_ROOT], [test "x$build_switch_root" = xyes])
......@@ -1874,6 +1886,7 @@ AC_ARG_ENABLE([newgrp],
[], [UL_DEFAULT_ENABLE([newgrp], [no])]
)
UL_BUILD_INIT([newgrp])
UL_REQUIRES_HAVE([newgrp], [crypt], [crypt function])
AM_CONDITIONAL([BUILD_NEWGRP], [test "x$build_newgrp" = xyes])
......@@ -1970,6 +1983,7 @@ AC_ARG_ENABLE([sulogin],
[], [UL_DEFAULT_ENABLE([sulogin], [check])]
)
UL_BUILD_INIT([sulogin])
UL_REQUIRES_HAVE([sulogin], [crypt], [crypt function])
UL_REQUIRES_HAVE([sulogin], [shadow_h], [shadow.h header])
AM_CONDITIONAL([BUILD_SULOGIN], [test "x$build_sulogin" = xyes])
......
......@@ -124,10 +124,12 @@ e.g.\& using a command like
.nf
.RS
# fallocate \-\-length 8GiB swapfile
# dd if=/dev/zero of=swapfile bs=1MiB count=$((8*1024))
.RE
.fi
to create 8GiB swapfile.
Note that a swap file must not contain any holes. Using
.BR cp (1)
to create the file is not acceptable. Neither is use of
......
......@@ -82,7 +82,7 @@ static void init_signature_page(struct mkswap_control *ctl)
if (ctl->user_pagesize != kernel_pagesize)
warnx(_("Using user-specified page size %d, "
"instead of the system value %d"),
ctl->pagesize, kernel_pagesize);
ctl->user_pagesize, kernel_pagesize);
ctl->pagesize = ctl->user_pagesize;
} else
ctl->pagesize = kernel_pagesize;
......
......@@ -141,8 +141,8 @@
*/
#ifndef container_of
#define container_of(ptr, type, member) __extension__ ({ \
void *__mptr = (void *)(ptr); \
((type *)(__mptr - offsetof(type, member))); })
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#endif
#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
......
......@@ -108,6 +108,7 @@ int ul_path_write_string(struct path_cxt *pc, const char *str, const char *path)
int ul_path_writef_string(struct path_cxt *pc, const char *str, const char *path, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
int ul_path_write_s64(struct path_cxt *pc, int64_t num, const char *path);
int ul_path_write_u64(struct path_cxt *pc, uint64_t num, const char *path);
int ul_path_writef_u64(struct path_cxt *pc, uint64_t num, const char *path, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
......
......@@ -48,10 +48,12 @@ libcommon_la_SOURCES += lib/cpuset.c
endif
if HAVE_OPENAT
if HAVE_DIRFD
libcommon_la_SOURCES += lib/path.c
libcommon_la_SOURCES += lib/procutils.c
libcommon_la_SOURCES += lib/sysfs.c
endif
endif
noinst_LTLIBRARIES += libtcolors.la
libtcolors_la_CFLAGS = $(AM_CFLAGS)
......@@ -96,9 +98,11 @@ check_PROGRAMS += \
endif
if HAVE_OPENAT
if HAVE_DIRFD
check_PROGRAMS += test_procutils
check_PROGRAMS += test_path
endif
endif
test_ttyutils_SOURCES = lib/ttyutils.c
test_ttyutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_TTYUTILS
......@@ -126,11 +130,10 @@ test_randutils_SOURCES = lib/randutils.c
test_randutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_RANDUTILS
if HAVE_OPENAT
if HAVE_DIRFD
test_procutils_SOURCES = lib/procutils.c
test_procutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_PROCUTILS
endif
if HAVE_OPENAT
test_path_SOURCES = lib/path.c lib/fileutils.c
if HAVE_CPU_SET_T
test_path_SOURCES += lib/cpuset.c
......@@ -138,6 +141,7 @@ endif
test_path_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM_PATH
test_path_LDADD = $(LDADD)
endif
endif
if LINUX
test_cpuset_SOURCES = lib/cpuset.c
......
......@@ -834,6 +834,28 @@ int ul_path_writef_string(struct path_cxt *pc, const char *str, const char *path
return ul_path_write_string(pc, str, p);
}
int ul_path_write_s64(struct path_cxt *pc, int64_t num, const char *path)
{
char buf[sizeof(stringify_value(LLONG_MAX))];
int rc, errsv;
int fd, len;
fd = ul_path_open(pc, O_WRONLY|O_CLOEXEC, path);
if (fd < 0)
return -errno;
len = snprintf(buf, sizeof(buf), "%" PRId64, num);
if (len < 0 || (size_t) len >= sizeof(buf))
rc = len < 0 ? -errno : -E2BIG;
else
rc = write_all(fd, buf, len);
errsv = errno;
close(fd);
errno = errsv;
return rc;
}
int ul_path_write_u64(struct path_cxt *pc, uint64_t num, const char *path)
{
char buf[sizeof(stringify_value(ULLONG_MAX))];
......
......@@ -193,7 +193,7 @@ static int probe_integrity(blkid_probe pr, const struct blkid_idmag *mag)
if (sb == NULL)
return errno ? -errno : 1;
if (sb->version != 1)
if (sb->version !=1 && sb->version != 2)
return 1;
blkid_probe_sprintf_version(pr, "%u", sb->version);
......
......@@ -75,10 +75,8 @@ struct file_attribute {
/* Windows 10 Creators edition has extended the cluster size limit to 2MB */
#define NTFS_MAX_CLUSTER_SIZE (2 * 1024 * 1024)
enum {
MFT_RECORD_ATTR_VOLUME_NAME = 0x60,
MFT_RECORD_ATTR_END = 0xffffffff
};
#define MFT_RECORD_ATTR_VOLUME_NAME 0x60
#define MFT_RECORD_ATTR_END 0xffffffff
static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
{
......@@ -190,9 +188,9 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
if (!attr_len)
break;
if (le32_to_cpu(attr->type) == MFT_RECORD_ATTR_END)
if (le32_to_cpu(attr->type) == (uint32_t) MFT_RECORD_ATTR_END)
break;
if (le32_to_cpu(attr->type) == MFT_RECORD_ATTR_VOLUME_NAME) {
if (le32_to_cpu(attr->type) == (uint32_t) MFT_RECORD_ATTR_VOLUME_NAME) {
unsigned int val_off = le16_to_cpu(attr->value_offset);
unsigned int val_len = le32_to_cpu(attr->value_len);
unsigned char *val = ((uint8_t *) attr) + val_off;
......
......@@ -83,9 +83,9 @@ static int probe_stratis(blkid_probe pr,
sizeof(stratis->pool_uuid));
blkid_probe_sprintf_value(pr, "BLOCKDEV_SECTORS", "%" PRIu64,
stratis->sectors);
le64_to_cpu(stratis->sectors));
blkid_probe_sprintf_value(pr, "BLOCKDEV_INITTIME", "%" PRIu64,
stratis->initialization_time);
le64_to_cpu(stratis->initialization_time));
return 0;
}
......
......@@ -126,7 +126,7 @@ static int fstype_cmp(const void *v1, const void *v2)
int mnt_stat_mountpoint(const char *target, struct stat *st)
{
#ifdef AT_NO_AUTOMOUNT
return fstatat(-1, target, st, AT_NO_AUTOMOUNT);
return fstatat(AT_FDCWD, target, st, AT_NO_AUTOMOUNT);
#else
return stat(target, st);
#endif
......
......@@ -47,8 +47,8 @@ be used, for instance, to generate unique HTTP cookies across multiple
web servers without communication between the servers, and without fear
of a name clash.
.SH "CONFORMING TO"
This library generates UUIDs compatible OSF DCE 1.1, and hash based UUIDs V3 and
V5 compatible with RFC-4122.
This library generates UUIDs compatible with OSF DCE 1.1, and hash based UUIDs
V3 and V5 compatible with RFC-4122.
.SH AUTHOR
Theodore Y.\& Ts'o
.SH AVAILABILITY
......
......@@ -70,14 +70,14 @@ The
.B uuid_generate_time
function forces the use of the alternative algorithm which uses the
current time and the local ethernet MAC address (if available).
This algorithm used to be the default one used to generate UUID, but
This algorithm used to be the default one used to generate UUIDs, but
because of the use of the ethernet MAC address, it can leak
information about when and where the UUID was generated. This can cause
privacy problems in some applications, so the
.B uuid_generate
function only uses this algorithm if a high-quality source of
randomness is not available. To guarantee uniqueness of UUIDs generated
by concurrently running processes, the uuid library uses global
by concurrently running processes, the uuid library uses a global
clock state counter (if the process has permissions to gain exclusive access
to this file) and/or the
.B uuidd
......@@ -90,7 +90,7 @@ whether the UUID has been generated in a safe manner, use
.sp
The
.B uuid_generate_time_safe
is similar to
function is similar to
.BR uuid_generate_time ,
except that it returns a value which denotes whether any of the synchronization
mechanisms (see above) has been used.
......@@ -116,8 +116,8 @@ The newly created UUID is returned in the memory location pointed to by
.B uuid_generate_time_safe
returns zero if the UUID has been generated in a safe manner, \-1 otherwise.
.SH "CONFORMING TO"
This library generates UUIDs compatible OSF DCE 1.1, and hash based UUIDs V3 and
V5 compatible with RFC-4122.
This library generates UUIDs compatible with OSF DCE 1.1, and hash based UUIDs
V3 and V5 compatible with RFC-4122.
.SH AUTHOR
Theodore Y.\& Ts'o
.SH AVAILABILITY
......
......@@ -53,8 +53,8 @@ stored in the location pointed to by
.IR uu ,
otherwise \-1 is returned.
.SH "CONFORMING TO"
This library parses UUIDs compatible OSF DCE 1.1, and hash based UUIDs V3 and
V5 compatible with RFC-4122.
This library parses UUIDs compatible with OSF DCE 1.1, and hash based UUIDs V3
and V5 compatible with RFC-4122.
.SH AUTHOR
Theodore Y.\& Ts'o
.SH AVAILABILITY
......
......@@ -45,7 +45,7 @@ The
.B uuid_unparse
function converts the supplied UUID
.I uu
from the binary representation into a 36-byte string (plus tailing '\e0')
from the binary representation into a 36-byte string (plus trailing '\e0')
of the form 1b4e28ba\-2fa1\-11d2\-883f\-0016d3cca427 and stores this
value in the character string pointed to by
.IR out .
......
[Unit]
Description=Daemon for generating UUIDs
Documentation=man:uuidd(8)
Requires=uuidd.socket
[Service]
......
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
......@@ -354,7 +354,7 @@ static void __attribute__((__noreturn__)) usage(void)
int main(int argc, char **argv)
{
struct chmem_desc _desc = { }, *desc = &_desc;
struct chmem_desc _desc = { 0 }, *desc = &_desc;
int cmd = CMD_NONE, zone_id = -1;
char *zone = NULL;
int c, rc;
......
......@@ -74,7 +74,7 @@ static int get_score_adj(struct path_cxt *pc)
static int set_score_adj(struct path_cxt *pc, int adj)
{
return ul_path_write_u64(pc, adj, "oom_score_adj");
return ul_path_write_s64(pc, adj, "oom_score_adj");
}
int main(int argc, char **argv)
......
......@@ -100,7 +100,7 @@ output.
For example,
.B \-n 1
or
.B \-n alert
.B \-n emerg
prevents all messages, except emergency (panic) messages, from appearing on
the console. All levels of messages are still written to
.IR /proc/kmsg ,
......
......@@ -323,7 +323,7 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_(" -l, --length <num> the number of bytes to discard\n"), out);
fputs(_(" -m, --minimum <num> the minimum extent length to discard\n"), out);
fputs(_(" -v, --verbose print number of discarded bytes\n"), out);
fputs(_(" -d, --dry-run does everything, but trim\n"), out);
fputs(_(" -n, --dry-run does everything, but trim\n"), out);
fputs(USAGE_SEPARATOR, out);
printf(USAGE_HELP_OPTIONS(21));
......