]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Merge branch 'udf' of https://github.com/pali/util-linux
authorKarel Zak <kzak@redhat.com>
Wed, 23 Aug 2023 08:08:39 +0000 (10:08 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 23 Aug 2023 08:08:39 +0000 (10:08 +0200)
* 'udf' of https://github.com/pali/util-linux:
  Fix detection of UDF filesystem

12 files changed:
AUTHORS
libblkid/src/superblocks/bcache.c
po-man/cs.po
po-man/de.po
po-man/es.po
po-man/fr.po
po-man/pt_BR.po
po-man/sr.po
po-man/uk.po
po-man/util-linux-man.pot
schedutils/uclampset.1.adoc
schedutils/uclampset.c

diff --git a/AUTHORS b/AUTHORS
index ae3229af9dc4f62bebfbc5b3e7e0817c109c219a..fcfd76c153d8a72c598d69e558eb990256938c53 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -73,7 +73,7 @@ AUTHORS (merged projects & commands):
                        Miquel van Smoorenburg
       switch_root:     Peter Jones <pjones@redhat.com>
                        Jeremy Katz <katzj@redhat.com>
-      uclampse:        Qais Yousef <qais.yousef@arm.com>
+      uclampse:        Qais Yousef <qyousef@layalina.io>
       unshare:         Mikhail Gusarov <dottedmag@dottedmag.net>
       utmpdump:        [merged from sysvinit]
                        Danek Duvall <duvall@alumni.princeton.edu>
@@ -730,7 +730,7 @@ CONTRIBUTORS:
       Portisch <hugo.portisch@yahoo.de>
       Po-Yu Chuang <ratbert@faraday-tech.com>
       Prarit Bhargava <prarit@redhat.com>
-      Qais Yousef <qais.yousef@arm.com>
+      Qais Yousef <qyousef@layalina.io>
       Quentin Rameau <quinq@fifth.space>
       Radka Skvarilova <rskvaril@redhat.com>
       Rafael Aquini <aquini@redhat.com>
index 1a0c124d374f0c4fa222f0b3d198d93c1619d604..2b0f6fc688101b92c6708b9a1f59833d05f79530 100644 (file)
@@ -103,6 +103,15 @@ union bcachefs_sb_csum {
        uint8_t raw[16];
 } __attribute__((packed));
 
+struct bcachefs_sb_layout {
+       uint8_t         magic[16];
+       uint8_t         layout_type;
+       uint8_t         sb_max_size_bits;
+       uint8_t         nr_superblocks;
+       uint8_t         pad[5];
+       uint64_t        sb_offset[61];
+} __attribute__((packed));
+
 struct bcachefs_super_block {
        union bcachefs_sb_csum  csum;
        uint16_t        version;
@@ -124,7 +133,7 @@ struct bcachefs_super_block {
        uint64_t        flags[8];
        uint64_t        features[2];
        uint64_t        compat[2];
-       uint8_t         layout[512];
+       struct bcachefs_sb_layout layout;
        struct bcachefs_sb_field _start[];
 }  __attribute__((packed));
 
@@ -144,7 +153,7 @@ struct bcachefs_super_block {
 /* granularity of offset and length fields within superblock */
 #define BCACHEFS_SECTOR_SIZE   512
 /* maximum superblock size */
-#define BCACHEFS_SB_MAX_SIZE   4096
+#define BCACHEFS_SB_MAX_SIZE   0x100000
 /* fields offset within super block */
 #define BCACHEFS_SB_FIELDS_OFF offsetof(struct bcachefs_super_block, _start)
 /* tag value for members field */
@@ -316,6 +325,9 @@ static int probe_bcachefs(blkid_probe pr, const struct blkid_idmag *mag)
                return BLKID_PROBE_NONE;
 
        sb_size = BCACHEFS_SB_FIELDS_OFF + BYTES(bcs);
+       if (sb_size > BCACHEFS_SECTOR_SIZE << bcs->layout.sb_max_size_bits)
+               return BLKID_PROBE_NONE;
+
        if (sb_size > BCACHEFS_SB_MAX_SIZE)
                return BLKID_PROBE_NONE;
 
index 42fc973301ce6a98867f311d7310f31ebcacbf8c..7eaf91703298e2b652978390dff55c3b003775ed 100644 (file)
@@ -21212,7 +21212,7 @@ msgstr ""
 #
 #
 #. uclampset(1) manpage
-#. Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+#. Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 #. Copyright (C) 2020-2021 Arm Ltd
 #. This is free documentation; you can redistribute it and/or
 #. modify it under the terms of the GNU General Public License,
@@ -21424,7 +21424,7 @@ msgstr ""
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:125
-msgid "mailto:qais.yousef@arm.com[Qais Yousef]"
+msgid "mailto:qyousef@layalina.io[Qais Yousef]"
 msgstr ""
 
 #. type: Plain text
index cdfa32b285775b56417636b00927b39b1657bd97..6a9d93ecb4432b6a6f6bb840a3e1552efe37b233 100644 (file)
@@ -24530,7 +24530,7 @@ msgstr ""
 #
 #
 #. uclampset(1) manpage
-#. Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+#. Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 #. Copyright (C) 2020-2021 Arm Ltd
 #. This is free documentation; you can redistribute it and/or
 #. modify it under the terms of the GNU General Public License,
@@ -24780,8 +24780,8 @@ msgstr ""
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:125
-msgid "mailto:qais.yousef@arm.com[Qais Yousef]"
-msgstr "mailto:qais.yousef@arm.com[Qais Yousef]"
+msgid "mailto:qyousef@layalina.io[Qais Yousef]"
+msgstr "mailto:qyousef@layalina.io[Qais Yousef]"
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:134
index 81584d9d0005be9285d1c9ce355211d9cc57cd69..304006016e6ac708cc707a3be5eb09c1af7ae9db 100644 (file)
@@ -21945,7 +21945,7 @@ msgstr ""
 #
 #
 #. uclampset(1) manpage
-#. Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+#. Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 #. Copyright (C) 2020-2021 Arm Ltd
 #. This is free documentation; you can redistribute it and/or
 #. modify it under the terms of the GNU General Public License,
@@ -22156,8 +22156,8 @@ msgstr ""
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:125
-msgid "mailto:qais.yousef@arm.com[Qais Yousef]"
-msgstr "mailto:qais.yousef@arm.com[Qais Yousef]"
+msgid "mailto:qyousef@layalina.io[Qais Yousef]"
+msgstr "mailto:qyousef@layalina.io[Qais Yousef]"
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:134
index 35b65f4c111b304c7beec3a2fa6c7183e0e5a3a6..fa0aae8cb3c77d732fde19aea60051194b0980d6 100644 (file)
@@ -24466,7 +24466,7 @@ msgstr ""
 #
 #
 #. uclampset(1) manpage
-#. Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+#. Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 #. Copyright (C) 2020-2021 Arm Ltd
 #. This is free documentation; you can redistribute it and/or
 #. modify it under the terms of the GNU General Public License,
@@ -24687,8 +24687,8 @@ msgstr ""
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:125
-msgid "mailto:qais.yousef@arm.com[Qais Yousef]"
-msgstr "mailto:qais.yousef@arm.com[Qais Yousef]"
+msgid "mailto:qyousef@layalina.io[Qais Yousef]"
+msgstr "mailto:qyousef@layalina.io[Qais Yousef]"
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:134
index 08126255d2a5d6ff6c076e257847d9fbda390123..aad3fd242653591c402be271b1f0d7c84db53725 100644 (file)
@@ -22370,7 +22370,7 @@ msgstr ""
 #
 #
 #. uclampset(1) manpage
-#. Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+#. Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 #. Copyright (C) 2020-2021 Arm Ltd
 #. This is free documentation; you can redistribute it and/or
 #. modify it under the terms of the GNU General Public License,
@@ -22587,7 +22587,7 @@ msgstr ""
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:125
-msgid "mailto:qais.yousef@arm.com[Qais Yousef]"
+msgid "mailto:qyousef@layalina.io[Qais Yousef]"
 msgstr ""
 
 #. type: Plain text
index aa9954e147ca0edf01bcbc7eab3fb3003fd7d7d4..e8b2c34b3923fc1d26ca85c5d116ca8fa48e032b 100644 (file)
@@ -24017,7 +24017,7 @@ msgstr "Видите *sched*(7) за описивање шеме заказив
 #
 #
 #. uclampset(1) manpage
-#. Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+#. Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 #. Copyright (C) 2020-2021 Arm Ltd
 #. This is free documentation; you can redistribute it and/or
 #. modify it under the terms of the GNU General Public License,
@@ -24259,8 +24259,8 @@ msgstr ""
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:125
-msgid "mailto:qais.yousef@arm.com[Qais Yousef]"
-msgstr "mailto:qais.yousef@arm.com[Qais Yousef]"
+msgid "mailto:qyousef@layalina.io[Qais Yousef]"
+msgstr "mailto:qyousef@layalina.io[Qais Yousef]"
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:134
index e33a127b8827081391536e31660b3693f068109a..9484c685d05e5e15198f30b92690870c211c1f70 100644 (file)
@@ -24220,7 +24220,7 @@ msgstr "Див. *sched*(7), щоб ознайомитися зі схемою п
 #
 #
 #. uclampset(1) manpage
-#. Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+#. Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 #. Copyright (C) 2020-2021 Arm Ltd
 #. This is free documentation; you can redistribute it and/or
 #. modify it under the terms of the GNU General Public License,
@@ -24437,8 +24437,8 @@ msgstr ""
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:125
-msgid "mailto:qais.yousef@arm.com[Qais Yousef]"
-msgstr "mailto:qais.yousef@arm.com[Qais Yousef]"
+msgid "mailto:qyousef@layalina.io[Qais Yousef]"
+msgstr "mailto:qyousef@layalina.io[Qais Yousef]"
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:134
index 95a2814d4507f87a491b674d019963905903d98a..6554c5a27cffc0f0dca13cbdadec896308ed113a 100644 (file)
@@ -20938,7 +20938,7 @@ msgstr ""
 
 #. uclampset(1) manpage
 #
-#. Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+#. Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 #. Copyright (C) 2020-2021 Arm Ltd
 #
 #. This is free documentation; you can redistribute it and/or
@@ -21158,7 +21158,7 @@ msgstr ""
 
 #. type: Plain text
 #: ../schedutils/uclampset.1.adoc:125
-msgid "mailto:qais.yousef@arm.com[Qais Yousef]"
+msgid "mailto:qyousef@layalina.io[Qais Yousef]"
 msgstr ""
 
 #. type: Plain text
index 62295d3da01932625572ee97ed071b8014d4b9f2..955881907e0ab4a05c874af44769e25fbabe4431 100644 (file)
@@ -2,7 +2,7 @@
 ////
 uclampset(1) manpage
 
-Copyright (C) 2020-2021 Qais Yousef <qais.yousef@arm.com>
+Copyright (C) 2020-2021 Qais Yousef <qyousef@layalina.io>
 Copyright (C) 2020-2021 Arm Ltd
 
 This is free documentation; you can redistribute it and/or
@@ -60,6 +60,10 @@ By setting a task's _uclamp_max_ below 1024, this will effectively cap the task
 
 The full utilization range is: [0:1024]. The special value -1 is used to reset to system's default.
 
+Consult latest kernel documentation for more details:
+
+       https://kernel.org/doc/html/latest/scheduler/sched-util-clamp.html
+
 == OPTIONS
 
 *-m*::
@@ -121,7 +125,7 @@ Consult your kernel docs for the exact expected behavior on that kernel.
 
 == AUTHORS
 
-mailto:qais.yousef@arm.com[Qais Yousef]
+mailto:qyousef@layalina.io[Qais Yousef]
 
 == SEE ALSO
 
index 0de806abcfcf7914509963bf054b2764ab0195b1..011fac4ae4f8c4615a5020ae7ee96fd17372c78e 100644 (file)
@@ -31,7 +31,7 @@
 #include "sched_attr.h"
 #include "strutils.h"
 
-#define NOT_SET                -2U
+#define NOT_SET                0xdeadbeef
 
 struct uclampset {
        unsigned int util_min;
@@ -211,14 +211,6 @@ static void set_uclamp_system(struct uclampset *ctl)
        write_uclamp_sysfs(_PATH_PROC_UCLAMP_MAX, ctl->util_max);
 }
 
-static void validate_util(int val)
-{
-       if (val > 1024 || val < -1) {
-               errno = EINVAL;
-               err(EXIT_FAILURE, _("%d out of range"), val);
-       }
-}
-
 int main(int argc, char **argv)
 {
        struct uclampset _ctl = {
@@ -268,12 +260,10 @@ int main(int argc, char **argv)
                case 'm':
                        ctl->util_min = strtos32_or_err(optarg, _("invalid util_min argument"));
                        ctl->util_min_set = 1;
-                       validate_util(ctl->util_min);
                        break;
                case 'M':
                        ctl->util_max = strtos32_or_err(optarg, _("invalid util_max argument"));
                        ctl->util_max_set = 1;
-                       validate_util(ctl->util_max);
                        break;
                case 'V':
                        print_version(EXIT_SUCCESS);