diff options
Diffstat (limited to '')
49 files changed, 214 insertions, 214 deletions
diff --git a/lib/pager.c b/lib/pager.c index 98814b5..db7a989 100644 --- a/lib/pager.c +++ b/lib/pager.c @@ -85,9 +85,7 @@ static int start_command(struct child_process *cmd) close(cmd->in); } - if (cmd->preexec_cb) - cmd->preexec_cb(); - + cmd->preexec_cb(); execvp(cmd->argv[0], (char *const*) cmd->argv); errexec(cmd->argv[0]); } @@ -142,7 +140,7 @@ static int finish_command(struct child_process *cmd) return wait_or_whine(cmd->pid); } -static void pager_preexec_less(void) +static void pager_preexec(void) { /* * Work around bug in "less" by not starting it until we @@ -242,11 +240,7 @@ static void __setup_pager(void) pager_argv[2] = pager; pager_process.argv = pager_argv; pager_process.in = -1; - - if (!strncmp(pager, "less", 4)) - pager_process.preexec_cb = pager_preexec_less; - else - pager_process.preexec_cb = NULL; + pager_process.preexec_cb = pager_preexec; if (start_command(&pager_process)) return; diff --git a/lib/terminal-colors.d.5 b/lib/terminal-colors.d.5 index 1de42f4..5712adb 100644 --- a/lib/terminal-colors.d.5 +++ b/lib/terminal-colors.d.5 @@ -4,10 +4,10 @@ .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-01-31 .\" Manual: File formats -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "TERMINAL\-COLORS.D" "5" "2024-01-31" "util\-linux 2.40" "File formats" +.TH "TERMINAL\-COLORS.D" "5" "2024-01-31" "util\-linux 2.40.1" "File formats" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/libblkid/docs/version.xml b/libblkid/docs/version.xml index 4bdd32f..0e1a032 100644 --- a/libblkid/docs/version.xml +++ b/libblkid/docs/version.xml @@ -1 +1 @@ -2.40 +2.40.1 diff --git a/libblkid/libblkid.3 b/libblkid/libblkid.3 index 0297e27..b605d8f 100644 --- a/libblkid/libblkid.3 +++ b/libblkid/libblkid.3 @@ -4,10 +4,10 @@ .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-01-31 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LIBBLKID" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LIBBLKID" "3" "2024-01-31" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/libblkid/meson.build b/libblkid/meson.build index 5a28bdf..73ea088 100644 --- a/libblkid/meson.build +++ b/libblkid/meson.build @@ -1,4 +1,9 @@ dir_libblkid = include_directories('.', 'src') +if not build_libblkid + blkid_dep = disabler() + blkid_static_dep = disabler() + subdir_done() +endif defs = configuration_data() defs.set('LIBBLKID_DATE', libblkid_date) @@ -131,27 +136,34 @@ if build_libblkid and not have_dirfd and not have_ddfd error('neither dirfd nor ddfd are available') endif +libblkid_link_depends = [] +libblkid_link_args = [] + +if cc.has_link_argument('-Wl,--version-script=@0@'.format(libblkid_sym_path)) + libblkid_link_depends += [libblkid_sym] + libblkid_link_args += ['-Wl,--version-script=@0@'.format(libblkid_sym_path)] +endif + lib_blkid = both_libraries( 'blkid', list_h, lib_blkid_sources, include_directories : [dir_include, dir_libblkid], - link_depends : libblkid_sym, + link_depends : libblkid_link_depends, version : libblkid_version, - link_args : ['-Wl,--version-script=@0@'.format(libblkid_sym_path)], + link_args : libblkid_link_args, link_with : lib_common, dependencies : build_libblkid ? [lib_econf] : disabler(), install : build_libblkid) blkid_dep = declare_dependency(link_with: lib_blkid, include_directories: '.') lib_blkid_static = lib_blkid.get_static_lib() +blkid_static_dep = declare_dependency(link_with: lib_blkid_static, include_directories: '.') -if build_libblkid - pkgconfig.generate(lib_blkid, - description : 'Block device id library', - subdirs : 'blkid', - version : pc_version) - if meson.version().version_compare('>=0.54.0') - meson.override_dependency('blkid', blkid_dep) - endif +pkgconfig.generate(lib_blkid, + description : 'Block device id library', + subdirs : 'blkid', + version : pc_version) +if meson.version().version_compare('>=0.54.0') + meson.override_dependency('blkid', blkid_dep) endif diff --git a/libblkid/src/config.c b/libblkid/src/config.c index 7b8b04f..66c1864 100644 --- a/libblkid/src/config.c +++ b/libblkid/src/config.c @@ -153,6 +153,8 @@ struct blkid_config *blkid_read_config(const char *filename) #else /* !HAVE_LIBECONF */ static econf_file *file = NULL; + char *line = NULL; + bool uevent = false; econf_err error; if (filename) { @@ -187,7 +189,6 @@ struct blkid_config *blkid_read_config(const char *filename) } } - bool uevent = false; if ((error = econf_getBoolValue(file, NULL, "SEND_UEVENT", &uevent))) { if (error != ECONF_NOKEY) { DBG(CONFIG, ul_debug("couldn't fetch SEND_UEVENT corrently: %s", econf_errString(error))); @@ -209,7 +210,6 @@ struct blkid_config *blkid_read_config(const char *filename) } } - char *line = NULL; if ((error = econf_getStringValue(file, NULL, "EVALUATE", &line))) { conf->nevals = 0; if (error != ECONF_NOKEY) { @@ -219,7 +219,7 @@ struct blkid_config *blkid_read_config(const char *filename) DBG(CONFIG, ul_debug("key CACHE_FILE not found, using built-in default ")); } } else { - if (*line && parse_evaluate(conf, line) == -1) + if (line && *line && parse_evaluate(conf, line) == -1) goto err; } @@ -238,8 +238,8 @@ dflt: if (f) fclose(f); #else - econf_free (file); - free (line); + econf_free(file); + free(line); #endif return conf; err: @@ -248,8 +248,8 @@ err: #ifndef HAVE_LIBECONF fclose(f); #else - econf_free (file); - free (line); + econf_free(file); + free(line); #endif return NULL; } diff --git a/libblkid/src/superblocks/bcache.c b/libblkid/src/superblocks/bcache.c index 47d9060..8ad2dc0 100644 --- a/libblkid/src/superblocks/bcache.c +++ b/libblkid/src/superblocks/bcache.c @@ -164,8 +164,6 @@ struct bcachefs_super_block { #define BCACHEFS_SECTOR_SIZE 512U /* maximum superblock size shift */ #define BCACHEFS_SB_MAX_SIZE_SHIFT 0x10U -/* maximum superblock size */ -#define BCACHEFS_SB_MAX_SIZE (1U << BCACHEFS_SB_MAX_SIZE_SHIFT) /* fields offset within super block */ #define BCACHEFS_SB_FIELDS_OFF offsetof(struct bcachefs_super_block, _start) /* tag value for members field */ @@ -360,9 +358,6 @@ static int probe_bcachefs(blkid_probe pr, const struct blkid_idmag *mag) sb_size = BCACHEFS_SB_FIELDS_OFF + BYTES(bcs); - if (sb_size > BCACHEFS_SB_MAX_SIZE) - return BLKID_PROBE_NONE; - if (bcs->layout.sb_max_size_bits > BCACHEFS_SB_MAX_SIZE_SHIFT) return BLKID_PROBE_NONE; diff --git a/libblkid/src/topology/ioctl.c b/libblkid/src/topology/ioctl.c index 3560a2f..7b15c9e 100644 --- a/libblkid/src/topology/ioctl.c +++ b/libblkid/src/topology/ioctl.c @@ -18,60 +18,38 @@ #include "topology.h" -/* - * ioctl topology values - */ -static const struct topology_val { - - long ioc; - - /* functions to set probing result */ - int (*set_ulong)(blkid_probe, unsigned long); - int (*set_int)(blkid_probe, int); - int (*set_u64)(blkid_probe, uint64_t); - -} topology_vals[] = { - { BLKALIGNOFF, NULL, blkid_topology_set_alignment_offset }, - { BLKIOMIN, blkid_topology_set_minimum_io_size }, - { BLKIOOPT, blkid_topology_set_optimal_io_size }, - { BLKPBSZGET, blkid_topology_set_physical_sector_size }, - { BLKGETDISKSEQ, .set_u64 = blkid_topology_set_diskseq }, - /* we read BLKSSZGET in topology.c */ -}; - static int probe_ioctl_tp(blkid_probe pr, const struct blkid_idmag *mag __attribute__((__unused__))) { - size_t i; - - for (i = 0; i < ARRAY_SIZE(topology_vals); i++) { - const struct topology_val *val = &topology_vals[i]; - int rc = 1; - union { - unsigned long ul; - int i; - uint64_t u64; - } data; - - if (ioctl(pr->fd, val->ioc, &data) == -1) - goto nothing; - - if (val->set_int) - rc = val->set_int(pr, data.i); - else if (val->set_ulong) - rc = val->set_ulong(pr, data.ul); - else - rc = val->set_u64(pr, data.u64); - - if (rc) - goto err; - } + uint64_t u64; + int s32; + + if (ioctl(pr->fd, BLKALIGNOFF, &s32) == -1) + return 1; + if (blkid_topology_set_alignment_offset(pr, s32)) + return -1; + + if (ioctl(pr->fd, BLKIOMIN, &s32) == -1) + return 1; + if (blkid_topology_set_minimum_io_size(pr, s32)) + return -1; + + if (ioctl(pr->fd, BLKIOOPT, &s32) == -1) + return 1; + if (blkid_topology_set_optimal_io_size(pr, s32)) + return -1; + + if (ioctl(pr->fd, BLKPBSZGET, &s32) == -1) + return 1; + if (blkid_topology_set_physical_sector_size(pr, s32)) + return -1; + + if (ioctl(pr->fd, BLKGETDISKSEQ, &u64) == -1) + return 1; + if (blkid_topology_set_physical_sector_size(pr, u64)) + return -1; return 0; -nothing: - return 1; -err: - return -1; } const struct blkid_idinfo ioctl_tp_idinfo = diff --git a/libfdisk/docs/version.xml b/libfdisk/docs/version.xml index 4bdd32f..0e1a032 100644 --- a/libfdisk/docs/version.xml +++ b/libfdisk/docs/version.xml @@ -1 +1 @@ -2.40 +2.40.1 diff --git a/libfdisk/meson.build b/libfdisk/meson.build index eaab9e1..57dda5c 100644 --- a/libfdisk/meson.build +++ b/libfdisk/meson.build @@ -60,8 +60,8 @@ lib_fdisk_static = static_library( 'fdisk_static', link_whole : lib__fdisk, link_with : [lib_common, - lib_blkid.get_static_lib(), lib_uuid.get_static_lib()], + dependencies : [blkid_static_dep], install : false) lib_fdisk = library( @@ -71,8 +71,8 @@ lib_fdisk = library( version : libfdisk_version, link_args : ['-Wl,--version-script=@0@'.format(libfdisk_sym_path)], link_with : [lib_common, - lib_blkid, lib_uuid], + dependencies : [blkid_dep], install : build_libfdisk) fdisk_dep = declare_dependency(link_with: lib_fdisk, include_directories: '.') diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index ecf0b36..5c00164 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -790,7 +790,7 @@ static void get_partition_table_geometry(struct fdisk_context *cxt, unsigned int *ph, unsigned int *ps) { unsigned char *bufp = cxt->firstsector; - struct { unsigned int c, h, o, v; } t[8]; + struct { unsigned int c, h, o, v; } t[8] = { 0 }; unsigned int n1, n2, n3, n4, n5, n6; const struct dos_partition *p; unsigned int c, h, s, l; diff --git a/liblastlog2/man/lastlog2.3 b/liblastlog2/man/lastlog2.3 index b2ac0d7..8f694fb 100644 --- a/liblastlog2/man/lastlog2.3 +++ b/liblastlog2/man/lastlog2.3 @@ -2,12 +2,12 @@ .\" Title: lastlog2 .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LASTLOG2" "3" "2024-03-20" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LASTLOG2" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/liblastlog2/man/ll2_import_lastlog.3 b/liblastlog2/man/ll2_import_lastlog.3 index 23231c4..b9b2412 100644 --- a/liblastlog2/man/ll2_import_lastlog.3 +++ b/liblastlog2/man/ll2_import_lastlog.3 @@ -2,12 +2,12 @@ .\" Title: ll2_import_lastlog .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LL2_IMPORT_LASTLOG" "3" "2024-03-20" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LL2_IMPORT_LASTLOG" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/liblastlog2/man/ll2_read_all.3 b/liblastlog2/man/ll2_read_all.3 index 753749f..336535b 100644 --- a/liblastlog2/man/ll2_read_all.3 +++ b/liblastlog2/man/ll2_read_all.3 @@ -2,12 +2,12 @@ .\" Title: ll2_read_all .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LL2_READ_ALL" "3" "2024-03-20" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LL2_READ_ALL" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/liblastlog2/man/ll2_read_entry.3 b/liblastlog2/man/ll2_read_entry.3 index 53f1e26..f0b1d1c 100644 --- a/liblastlog2/man/ll2_read_entry.3 +++ b/liblastlog2/man/ll2_read_entry.3 @@ -2,12 +2,12 @@ .\" Title: ll2_read_entry .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LL2_READ_ENTRY" "3" "2024-03-20" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LL2_READ_ENTRY" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/liblastlog2/man/ll2_remove_entry.3 b/liblastlog2/man/ll2_remove_entry.3 index 3cb444b..7529167 100644 --- a/liblastlog2/man/ll2_remove_entry.3 +++ b/liblastlog2/man/ll2_remove_entry.3 @@ -2,12 +2,12 @@ .\" Title: ll2_remove_entry .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LL2_REMOVE_ENTRY" "3" "2024-03-20" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LL2_REMOVE_ENTRY" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/liblastlog2/man/ll2_rename_user.3 b/liblastlog2/man/ll2_rename_user.3 index 7644838..a03b669 100644 --- a/liblastlog2/man/ll2_rename_user.3 +++ b/liblastlog2/man/ll2_rename_user.3 @@ -2,12 +2,12 @@ .\" Title: ll2_rename_user .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LL2_RENAME_USER" "3" "2024-03-20" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LL2_RENAME_USER" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/liblastlog2/man/ll2_update_login_time.3 b/liblastlog2/man/ll2_update_login_time.3 index ce08bc4..9e4805c 100644 --- a/liblastlog2/man/ll2_update_login_time.3 +++ b/liblastlog2/man/ll2_update_login_time.3 @@ -2,12 +2,12 @@ .\" Title: ll2_update_login_time .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LL2_UPDATE_LOGIN_TIME" "3" "2024-03-20" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LL2_UPDATE_LOGIN_TIME" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/liblastlog2/man/ll2_write_entry.3 b/liblastlog2/man/ll2_write_entry.3 index f16294a..dae05e3 100644 --- a/liblastlog2/man/ll2_write_entry.3 +++ b/liblastlog2/man/ll2_write_entry.3 @@ -2,12 +2,12 @@ .\" Title: ll2_write_entry .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "LL2_WRITE_ENTRY" "3" "2024-03-20" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "LL2_WRITE_ENTRY" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/libmount/docs/version.xml b/libmount/docs/version.xml index 4bdd32f..0e1a032 100644 --- a/libmount/docs/version.xml +++ b/libmount/docs/version.xml @@ -1 +1 @@ -2.40 +2.40.1 diff --git a/libmount/meson.build b/libmount/meson.build index d1262e7..6b16aab 100644 --- a/libmount/meson.build +++ b/libmount/meson.build @@ -1,3 +1,9 @@ +if not build_libmount + mount_dep = disabler() + mount_static_dep = disabler() + subdir_done() +endif + dir_libmount = include_directories('.', 'src') defs = configuration_data() @@ -70,16 +76,16 @@ lib__mount = static_library( '_mount', lib_mount_sources, include_directories : [dir_include, - dir_libmount, - dir_libblkid]) + dir_libmount], + dependencies : [blkid_dep]) lib_mount_static = static_library( 'mount_static', link_whole : lib__mount, - link_with : [lib_common, - lib_blkid.get_static_lib()], - dependencies : [realtime_libs], + link_with : [lib_common], + dependencies : [blkid_static_dep, realtime_libs], install : false) +mount_static_dep = declare_dependency(link_with: lib_mount_static, include_directories: '.') lib__mount_deps = [ lib_selinux, @@ -90,25 +96,21 @@ lib_mount = library( 'mount', link_whole : lib__mount, include_directories : [dir_include, - dir_libmount, - dir_libblkid], + dir_libmount], link_depends : libmount_sym, version : libmount_version, link_args : ['-Wl,--version-script=@0@'.format(libmount_sym_path)], - link_with : [lib_common, - lib_blkid], - dependencies : lib__mount_deps, + link_with : [lib_common], + dependencies : lib__mount_deps + blkid_dep, install : build_libmount) mount_dep = declare_dependency(link_with: lib_mount, include_directories: '.') -if build_libmount - pkgconfig.generate(lib_mount, - description : 'mount library', - subdirs : 'libmount', - version : pc_version) - if meson.version().version_compare('>=0.54.0') - meson.override_dependency('mount', mount_dep) - endif +pkgconfig.generate(lib_mount, + description : 'mount library', + subdirs : 'libmount', + version : pc_version) +if meson.version().version_compare('>=0.54.0') + meson.override_dependency('mount', mount_dep) endif libmount_tests = [ @@ -136,9 +138,9 @@ if program_tests exe = executable( test_name, 'src/' + libmount_test_src_override.get(libmount_test, libmount_test) + '.c', - include_directories : [dir_include, dir_libblkid], - link_with : [lib__mount, lib_common, lib_blkid_static], - dependencies : lib__mount_deps, + include_directories : [dir_include], + link_with : [lib__mount, lib_common], + dependencies : lib__mount_deps + blkid_static_dep, c_args : ['-DTEST_PROGRAM'], ) # the test-setup expects the helpers in the toplevel build-directory diff --git a/libmount/python/meson.build b/libmount/python/meson.build index e1a79d1..0957bca 100644 --- a/libmount/python/meson.build +++ b/libmount/python/meson.build @@ -1,9 +1,3 @@ -python_module = import('python') - -python = python_module.find_installation( - get_option('python'), - required : get_option('build-python'), - disabler : true) build_python = python.found() pylibmount_sources = ''' @@ -21,10 +15,9 @@ if build_python python.extension_module( 'pylibmount', pylibmount_sources, - include_directories : [dir_include, dir_libmount], + include_directories : [dir_include], subdir : 'libmount', - link_with : lib_mount, - dependencies : python.dependency(), + dependencies : [mount_dep, python.dependency()], c_args : [ '-Wno-cast-function-type', diff --git a/libmount/src/context.c b/libmount/src/context.c index 952287a..5206c1d 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -367,8 +367,7 @@ const char *mnt_context_get_writable_tabpath(struct libmnt_context *cxt) { assert(cxt); - context_init_paths(cxt, 1); - return cxt->utab_path; + return mnt_context_utab_writable(cxt) ? cxt->utab_path : NULL; } diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 478a9fd..f9d610f 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -546,9 +546,10 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type) cxt->syscall_status = 0; } - if (org_type && rc != 0) + if (org_type && rc != 0) { __mnt_fs_set_fstype_ptr(cxt->fs, org_type); - org_type = NULL; + org_type = NULL; + } if (rc == 0 && try_type && cxt->update) { struct libmnt_fs *fs = mnt_update_get_fs(cxt->update); diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index 79b6237..bf70ed2 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -267,6 +267,9 @@ static int lookup_umount_fs_by_statfs(struct libmnt_context *cxt, const char *tg * So, let's use statfs() if possible (it's bad idea for --lazy/--force * umounts as target is probably unreachable NFS, also for --detach-loop * as this additionally needs to know the name of the loop device). + * + * For the "umount --read-only" command, we need to read the mountinfo + * to obtain the mount source. */ if (mnt_context_is_restricted(cxt) || *tgt != '/' @@ -275,6 +278,7 @@ static int lookup_umount_fs_by_statfs(struct libmnt_context *cxt, const char *tg || mnt_context_is_lazy(cxt) || mnt_context_is_nocanonicalize(cxt) || mnt_context_is_loopdel(cxt) + || mnt_context_is_rdonly_umount(cxt) || mnt_safe_stat(tgt, &st) != 0 || !S_ISDIR(st.st_mode) || has_utab_entry(cxt, tgt)) return 1; /* not found */ diff --git a/libmount/src/fs.c b/libmount/src/fs.c index 79e32a1..26f2c69 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -1454,7 +1454,7 @@ int mnt_fs_get_attribute(struct libmnt_fs *fs, const char *name, * mnt_fs_get_comment: * @fs: fstab/mtab/mountinfo entry pointer * - * Returns: 0 on success, 1 when not found the @name or negative number in case of error. + * Returns: comment string */ const char *mnt_fs_get_comment(struct libmnt_fs *fs) { diff --git a/libmount/src/tab_update.c b/libmount/src/tab_update.c index 87512af..d44d190 100644 --- a/libmount/src/tab_update.c +++ b/libmount/src/tab_update.c @@ -982,9 +982,9 @@ int mnt_update_already_done(struct libmnt_update *upd) if (mnt_optstr_get_missing(fs->user_optstr, upd->fs->user_optstr, NULL) == 0) { upd->missing_options = 1; DBG(UPDATE, ul_debugobj(upd, " missing options detected")); - } - } else - rc = 1; + } else + rc = 1; + } } else if (upd->target) { /* umount */ diff --git a/libsmartcols/docs/version.xml b/libsmartcols/docs/version.xml index 4bdd32f..0e1a032 100644 --- a/libsmartcols/docs/version.xml +++ b/libsmartcols/docs/version.xml @@ -1 +1 @@ -2.40 +2.40.1 diff --git a/libsmartcols/scols-filter.5 b/libsmartcols/scols-filter.5 index b7cb826..34dce98 100644 --- a/libsmartcols/scols-filter.5 +++ b/libsmartcols/scols-filter.5 @@ -2,12 +2,12 @@ .\" Title: scols-filter .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-03-20 +.\" Date: 2024-05-06 .\" Manual: File formats and conventions -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "SCOLS\-FILTER" "5" "2024-03-20" "util\-linux 2.40" "File formats and conventions" +.TH "SCOLS\-FILTER" "5" "2024-05-06" "util\-linux 2.40.1" "File formats and conventions" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/libsmartcols/scols-filter.5.adoc b/libsmartcols/scols-filter.5.adoc index ec1d95c..1cb39d0 100644 --- a/libsmartcols/scols-filter.5.adoc +++ b/libsmartcols/scols-filter.5.adoc @@ -2,7 +2,7 @@ //// Copyright (C) 2023 Karel Zak <kzak@redhat.com> -This file may be copied under the terms of the GNU Public License. +This file may be copied under the terms of the GNU General Public License. //// = scols-filter(5) :doctype: manpage diff --git a/libsmartcols/src/calculate.c b/libsmartcols/src/calculate.c index 84198da..86e1b27 100644 --- a/libsmartcols/src/calculate.c +++ b/libsmartcols/src/calculate.c @@ -379,9 +379,14 @@ static int reduce_column(struct libscols_table *tb, /* columns are reduced in "bad first" way, be more * agresive for the the worst column */ reduce = 3; - if (cl->width - reduce < st->width_min) - reduce = cl->width - st->width_min; - cl->width -= reduce; + + if (cl->width < reduce) + reduce = cl->width; + + if (cl->width - reduce > st->width_min) + cl->width -= reduce; + else + cl->width = st->width_min; break; default: return -1; /* no more stages */ @@ -413,10 +418,8 @@ int __scols_calculate(struct libscols_table *tb, struct ul_buffer *buf) size_t colsepsz; int sorted = 0; - DBG(TAB, ul_debugobj(tb, "-----calculate-(termwidth=%zu)-----", tb->termwidth)); tb->is_dummy_print = 1; - colsepsz = scols_table_is_noencoding(tb) ? mbs_width(colsep(tb)) : mbs_safe_width(colsep(tb)); @@ -430,6 +433,11 @@ int __scols_calculate(struct libscols_table *tb, struct ul_buffer *buf) while (scols_table_next_column(tb, &itr, &cl) == 0) { int is_last; + memset(&cl->wstat, 0, sizeof(cl->wstat)); + cl->width = 0; + cl->width_treeart = 0; + scols_column_reset_wrap(cl); + if (scols_column_is_hidden(cl)) continue; diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c index 5700bac..586a485 100644 --- a/libsmartcols/src/column.c +++ b/libsmartcols/src/column.c @@ -470,7 +470,7 @@ char *scols_wrapnl_nextchunk(const struct libscols_column *cl __attribute__((unu * This is built-in function for scols_column_set_wrapfunc(). This function * walk string separated by \0. * - * For example for data "AAA\0BBB\0CCC" the next chunk is "BBB". + * For example for data "AAA\0BBB\0CCC\0" the next chunk is "BBB". * * Returns: next chunk * diff --git a/libsmartcols/src/print.c b/libsmartcols/src/print.c index 88ab5a2..ab279e3 100644 --- a/libsmartcols/src/print.c +++ b/libsmartcols/src/print.c @@ -764,11 +764,11 @@ notree: } } +done: /* reset wrapping after greatest chunk calculation */ if (cal && scols_column_is_wrap(cl)) scols_column_reset_wrap(cl); -done: DBG(COL, ul_debugobj(cl, "__cursor_to_buffer rc=%d", rc)); return rc; } @@ -802,8 +802,12 @@ static int print_line(struct libscols_table *tb, rc = __cursor_to_buffer(tb, buf, 0); if (!rc) rc = print_data(tb, buf); - if (!rc && scols_column_has_pending_wrap(cl)) - pending = 1; + if (!rc) { + if (scols_column_has_pending_wrap(cl)) + pending = 1; + else + scols_column_reset_wrap(cl); + } scols_table_reset_cursor(tb); } fputs_color_line_close(tb); @@ -827,10 +831,12 @@ static int print_line(struct libscols_table *tb, rc = __cursor_to_buffer(tb, buf, 0); if (!rc) rc = print_pending_data(tb, buf); - if (!rc && scols_column_has_pending_wrap(cl)) - pending = 1; - if (!rc && !pending) - scols_column_reset_wrap(cl); + if (!rc) { + if (scols_column_has_pending_wrap(cl)) + pending = 1; + else + scols_column_reset_wrap(cl); + } } else print_empty_cell(tb, cl, ln, NULL, ul_buffer_get_bufsiz(buf)); scols_table_reset_cursor(tb); diff --git a/libuuid/man/uuid.3 b/libuuid/man/uuid.3 index 0b6d8bd..78a33fa 100644 --- a/libuuid/man/uuid.3 +++ b/libuuid/man/uuid.3 @@ -4,10 +4,10 @@ .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-01-31 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID" "3" "2024-01-31" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/libuuid/man/uuid_clear.3 b/libuuid/man/uuid_clear.3 index 0ba899c..706bb76 100644 --- a/libuuid/man/uuid_clear.3 +++ b/libuuid/man/uuid_clear.3 @@ -4,10 +4,10 @@ .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-01-31 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID_CLEAR" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID_CLEAR" "3" "2024-01-31" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/libuuid/man/uuid_compare.3 b/libuuid/man/uuid_compare.3 index 2d37b5e..2359225 100644 --- a/libuuid/man/uuid_compare.3 +++ b/libuuid/man/uuid_compare.3 @@ -2,12 +2,12 @@ .\" Title: uuid_compare .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-01-31 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID_COMPARE" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID_COMPARE" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -33,7 +33,7 @@ uuid_compare \- compare whether two UUIDs are the same .sp \fB#include <uuid.h>\fP .sp -\fBint uuid_compare(uuid_t \fIuu1\fP, uuid_t \fIuu2\fP)\fP +\fBint uuid_compare(const uuid_t \fIuu1\fP, const uuid_t \fIuu2\fP)\fP .SH "DESCRIPTION" .sp The \fBuuid_compare\fP() function compares the two supplied uuid variables \fIuu1\fP and \fIuu2\fP to each other. diff --git a/libuuid/man/uuid_compare.3.adoc b/libuuid/man/uuid_compare.3.adoc index 1d32475..6001167 100644 --- a/libuuid/man/uuid_compare.3.adoc +++ b/libuuid/man/uuid_compare.3.adoc @@ -46,7 +46,7 @@ uuid_compare - compare whether two UUIDs are the same *#include <uuid.h>* -*int uuid_compare(uuid_t __uu1__, uuid_t __uu2__)* +*int uuid_compare(const uuid_t __uu1__, const uuid_t __uu2__)* == DESCRIPTION diff --git a/libuuid/man/uuid_copy.3 b/libuuid/man/uuid_copy.3 index ce2834f..96d3d2d 100644 --- a/libuuid/man/uuid_copy.3 +++ b/libuuid/man/uuid_copy.3 @@ -2,12 +2,12 @@ .\" Title: uuid_copy .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-01-31 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID_COPY" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID_COPY" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -33,7 +33,7 @@ uuid_copy \- copy a UUID value .sp \fB#include <uuid.h>\fP .sp -\fBvoid uuid_copy(uuid_t \fIdst\fP, uuid_t \fIsrc\fP);\fP +\fBvoid uuid_copy(uuid_t \fIdst\fP, const uuid_t \fIsrc\fP);\fP .SH "DESCRIPTION" .sp The \fBuuid_copy\fP() function copies the UUID variable \fIsrc\fP to \fIdst\fP. diff --git a/libuuid/man/uuid_copy.3.adoc b/libuuid/man/uuid_copy.3.adoc index fee40d6..31c963d 100644 --- a/libuuid/man/uuid_copy.3.adoc +++ b/libuuid/man/uuid_copy.3.adoc @@ -46,7 +46,7 @@ uuid_copy - copy a UUID value *#include <uuid.h>* -*void uuid_copy(uuid_t __dst__, uuid_t __src__);* +*void uuid_copy(uuid_t __dst__, const uuid_t __src__);* == DESCRIPTION diff --git a/libuuid/man/uuid_generate.3 b/libuuid/man/uuid_generate.3 index cb88247..3f97d30 100644 --- a/libuuid/man/uuid_generate.3 +++ b/libuuid/man/uuid_generate.3 @@ -4,10 +4,10 @@ .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-01-31 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID_GENERATE" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID_GENERATE" "3" "2024-01-31" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/libuuid/man/uuid_is_null.3 b/libuuid/man/uuid_is_null.3 index dc61071..00b5473 100644 --- a/libuuid/man/uuid_is_null.3 +++ b/libuuid/man/uuid_is_null.3 @@ -2,12 +2,12 @@ .\" Title: uuid_is_null .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-01-31 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID_IS_NULL" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID_IS_NULL" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -33,7 +33,7 @@ uuid_is_null \- compare the value of the UUID to the NULL value .sp \fB#include <uuid.h>\fP .sp -\fBint uuid_is_null(uuid_t \fIuu\fP);\fP +\fBint uuid_is_null(const uuid_t \fIuu\fP);\fP .SH "DESCRIPTION" .sp The \fBuuid_is_null\fP() function compares the value of the supplied UUID variable \fIuu\fP to the NULL value. If the value is equal to the NULL UUID, 1 is returned, otherwise 0 is returned. diff --git a/libuuid/man/uuid_is_null.3.adoc b/libuuid/man/uuid_is_null.3.adoc index 6fed1d8..23f2bf8 100644 --- a/libuuid/man/uuid_is_null.3.adoc +++ b/libuuid/man/uuid_is_null.3.adoc @@ -46,7 +46,7 @@ uuid_is_null - compare the value of the UUID to the NULL value *#include <uuid.h>* -*int uuid_is_null(uuid_t __uu__);* +*int uuid_is_null(const uuid_t __uu__);* == DESCRIPTION diff --git a/libuuid/man/uuid_parse.3 b/libuuid/man/uuid_parse.3 index 0a58da9..2e2ae04 100644 --- a/libuuid/man/uuid_parse.3 +++ b/libuuid/man/uuid_parse.3 @@ -2,12 +2,12 @@ .\" Title: uuid_parse .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-01-31 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID_PARSE" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID_PARSE" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -33,9 +33,9 @@ uuid_parse \- convert an input UUID string into binary representation .sp \fB#include <uuid.h>\fP .sp -\fBint uuid_parse(char *\fIin\fP, uuid_t \fIuu\fP);\fP +\fBint uuid_parse(const char *\fIin\fP, uuid_t \fIuu\fP);\fP .br -\fBint uuid_parse_range(char *\fIin_start\fP, char *\fIin_end\fP, uuid_t \fIuu\fP);\fP +\fBint uuid_parse_range(const char *\fIin_start\fP, const char *\fIin_end\fP, uuid_t \fIuu\fP);\fP .SH "DESCRIPTION" .sp The \fBuuid_parse\fP() function converts the UUID string given by \fIin\fP into the binary representation. The input UUID is a string of the form 1b4e28ba\-2fa1\-11d2\-883f\-b9a761bde3fb (in \fBprintf\fP(3) format "%08x\-%04x\-%04x\-%04x\-%012x", 36 bytes plus the trailing \*(Aq\(rs0\*(Aq). diff --git a/libuuid/man/uuid_parse.3.adoc b/libuuid/man/uuid_parse.3.adoc index 8129aae..230023f 100644 --- a/libuuid/man/uuid_parse.3.adoc +++ b/libuuid/man/uuid_parse.3.adoc @@ -46,8 +46,8 @@ uuid_parse - convert an input UUID string into binary representation *#include <uuid.h>* -*int uuid_parse(char *__in__, uuid_t __uu__);* + -*int uuid_parse_range(char *__in_start__, char *__in_end__, uuid_t __uu__);* +*int uuid_parse(const char *__in__, uuid_t __uu__);* + +*int uuid_parse_range(const char *__in_start__, const char *__in_end__, uuid_t __uu__);* == DESCRIPTION diff --git a/libuuid/man/uuid_time.3 b/libuuid/man/uuid_time.3 index 18c9f4f..15f1720 100644 --- a/libuuid/man/uuid_time.3 +++ b/libuuid/man/uuid_time.3 @@ -2,12 +2,12 @@ .\" Title: uuid_time .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-01-31 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID_TIME" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID_TIME" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -33,7 +33,7 @@ uuid_time \- extract the time at which the UUID was created .sp \fB#include <uuid.h>\fP .sp -\fBtime_t uuid_time(uuid_t \fIuu\fP, struct timeval *\fIret_tv\fP)\fP +\fBtime_t uuid_time(const uuid_t \fIuu\fP, struct timeval *\fIret_tv\fP)\fP .SH "DESCRIPTION" .sp The \fBuuid_time\fP() function extracts the time at which the supplied time\-based UUID \fIuu\fP was created. Note that the UUID creation time is only encoded within certain types of UUIDs. This function can only reasonably expect to extract the creation time for UUIDs created with the \fBuuid_generate_time\fP(3) and \fBuuid_generate_time_safe\fP(3) functions. It may or may not work with UUIDs created by other mechanisms. diff --git a/libuuid/man/uuid_time.3.adoc b/libuuid/man/uuid_time.3.adoc index 5497583..5e579e2 100644 --- a/libuuid/man/uuid_time.3.adoc +++ b/libuuid/man/uuid_time.3.adoc @@ -46,7 +46,7 @@ uuid_time - extract the time at which the UUID was created *#include <uuid.h>* -*time_t uuid_time(uuid_t __uu__, struct timeval *__ret_tv__)* +*time_t uuid_time(const uuid_t __uu__, struct timeval *__ret_tv__)* == DESCRIPTION diff --git a/libuuid/man/uuid_unparse.3 b/libuuid/man/uuid_unparse.3 index 3b86df4..4cf9db6 100644 --- a/libuuid/man/uuid_unparse.3 +++ b/libuuid/man/uuid_unparse.3 @@ -2,12 +2,12 @@ .\" Title: uuid_unparse .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2024-01-31 +.\" Date: 2024-05-01 .\" Manual: Programmer's Manual -.\" Source: util-linux 2.40 +.\" Source: util-linux 2.40.1 .\" Language: English .\" -.TH "UUID_UNPARSE" "3" "2024-01-31" "util\-linux 2.40" "Programmer\*(Aqs Manual" +.TH "UUID_UNPARSE" "3" "2024-05-01" "util\-linux 2.40.1" "Programmer\*(Aqs Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -33,11 +33,11 @@ uuid_unparse \- convert a UUID from binary representation to a string .sp \fB#include <uuid.h>\fP .sp -\fBvoid uuid_unparse(uuid_t \fIuu\fP, char *\fIout\fP);\fP +\fBvoid uuid_unparse(const uuid_t \fIuu\fP, char *\fIout\fP);\fP .br -\fBvoid uuid_unparse_upper(uuid_t \fIuu\fP, char *\fIout\fP);\fP +\fBvoid uuid_unparse_upper(const uuid_t \fIuu\fP, char *\fIout\fP);\fP .br -\fBvoid uuid_unparse_lower(uuid_t \fIuu\fP, char *\fIout\fP);\fP +\fBvoid uuid_unparse_lower(const uuid_t \fIuu\fP, char *\fIout\fP);\fP .SH "DESCRIPTION" .sp The \fBuuid_unparse\fP() function converts the supplied UUID \fIuu\fP from the binary representation into a 36\-byte string (plus trailing \*(Aq\(rs0\*(Aq) of the form 1b4e28ba\-2fa1\-11d2\-883f\-0016d3cca427 and stores this value in the character string pointed to by \fIout\fP. The case of the hex digits returned by \fBuuid_unparse\fP() may be upper or lower case, and is dependent on the system\-dependent local default. diff --git a/libuuid/man/uuid_unparse.3.adoc b/libuuid/man/uuid_unparse.3.adoc index a14dc8c..20e8cfb 100644 --- a/libuuid/man/uuid_unparse.3.adoc +++ b/libuuid/man/uuid_unparse.3.adoc @@ -46,9 +46,9 @@ uuid_unparse - convert a UUID from binary representation to a string *#include <uuid.h>* -*void uuid_unparse(uuid_t __uu__, char *__out__);* + -*void uuid_unparse_upper(uuid_t __uu__, char *__out__);* + -*void uuid_unparse_lower(uuid_t __uu__, char *__out__);* +*void uuid_unparse(const uuid_t __uu__, char *__out__);* + +*void uuid_unparse_upper(const uuid_t __uu__, char *__out__);* + +*void uuid_unparse_lower(const uuid_t __uu__, char *__out__);* == DESCRIPTION diff --git a/libuuid/meson.build b/libuuid/meson.build index a801b4e..b67b3d5 100644 --- a/libuuid/meson.build +++ b/libuuid/meson.build @@ -20,6 +20,14 @@ unparse_c = files('src/unparse.c') libuuid_sym = 'src/libuuid.sym' libuuid_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libuuid_sym) +libuuid_link_depends = [] +libuuid_link_args = [] + +if cc.has_link_argument('-Wl,--version-script=@0@'.format(libuuid_sym_path)) + libuuid_link_depends += [libuuid_sym] + libuuid_link_args += ['-Wl,--version-script=@0@'.format(libuuid_sym_path)] +endif + lib_uuid = both_libraries( 'uuid', list_h, @@ -31,9 +39,9 @@ lib_uuid = both_libraries( md5_c, sha1_c, include_directories : [dir_include, dir_libuuid], - link_depends : libuuid_sym, + link_depends : libuuid_link_depends, version : libuuid_version, - link_args : ['-Wl,--version-script=@0@'.format(libuuid_sym_path)], + link_args : libuuid_link_args, dependencies : [socket_libs, build_libuuid ? [] : disabler()], install : build_libuuid) |