]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #28032 from poettering/mumumµ
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Jun 2023 12:00:10 +0000 (14:00 +0200)
committerGitHub <noreply@github.com>
Wed, 14 Jun 2023 12:00:10 +0000 (14:00 +0200)
deal with µ unicode ambiguities

34 files changed:
catalog/systemd.catalog.in
man/kernel-command-line.xml
man/org.freedesktop.systemd1.xml
man/sd_bus_get_fd.xml
man/sd_bus_wait.xml
man/sd_event_add_time.xml
man/sd_event_now.xml
man/sd_login_monitor_new.xml
man/sd_notify.xml
man/sd_watchdog_enabled.xml
man/systemctl.xml
man/systemd-coredump.xml
man/systemd.resource-control.xml
man/systemd.service.xml
man/systemd.socket.xml
man/systemd.time.xml
man/sysupdate.d.xml
src/basic/procfs-util.c
src/basic/time-util.c
src/core/socket.c
src/coredump/coredump.c
src/journal-remote/journal-remote-main.c
src/journal-remote/journal-remote.c
src/journal-remote/microhttpd-util.h
src/libsystemd/sd-netlink/sd-netlink.c
src/login/logind-dbus.c
src/shared/calendarspec.c
src/shared/efi-loader.c
src/systemd/sd-daemon.h
src/test/test-env-file.c
src/test/test-id128.c
src/test/test-process-util.c
src/test/test-time-util.c
src/timesync/timesyncd.c

index d3d03dafe7162767e5f3efed81cdb7f41d5efd35..913d4987ac712bc7aa6a51a3d920c9f887c7ab3c 100644 (file)
@@ -563,4 +563,4 @@ resources back to the OS kernel, making them available for other components of
 the OS.
 
 @TRIMMED_BYTES@ of memory were returned to the OS, which took @TRIMMED_USEC@
-micro-seconds (µs).
+micro-seconds (μs).
index 479b482a308b4f91e004e660f888172ef4ff432c..eef6db4a5c5a4456040838e7701b6b0a17e87942 100644 (file)
       <varlistentry>
         <term><varname>systemd.clock-usec=</varname></term>
 
-        <listitem><para>Takes a decimal, numeric timestamp in µs since January 1st 1970, 00:00am, to set the
+        <listitem><para>Takes a decimal, numeric timestamp in μs since January 1st 1970, 00:00am, to set the
         system clock to. The system time is set to the specified timestamp early during boot. It is not
         propagated to the hardware clock (RTC).</para></listitem>
       </varlistentry>
index fc9a79d79626c4f0bdb47bfbcb97bee8f55c116e..67ccf5f8036cebbfe83dd14cee7508491e5bbafe 100644 (file)
@@ -37,7 +37,7 @@
     unit and job objects or directly convert a unit name or job identifier to a bus path of the corresponding
     D-Bus object.</para>
 
-    <para>Properties exposing time values are usually encoded in microseconds (µs) on the bus, even if
+    <para>Properties exposing time values are usually encoded in microseconds (μs) on the bus, even if
     their corresponding settings in the unit files are in seconds.</para>
 
     <para>PID 1 uses <ulink url="https://www.freedesktop.org/software/polkit/docs/latest/">polkit</ulink> to
index a738f85bdec42410e41c1e91d5a399f47916f2a6..114b920c6c138f51a25e2d53b833267eb58f8815 100644 (file)
@@ -66,7 +66,7 @@
     <constant>POLLIN</constant>, <constant>POLLOUT</constant>, … events, or negative on error.
     </para>
 
-    <para><function>sd_bus_get_timeout()</function> returns the <emphasis>absolute</emphasis> time-out in µs,
+    <para><function>sd_bus_get_timeout()</function> returns the <emphasis>absolute</emphasis> time-out in μs,
     from which the relative time-out to pass to <function>poll()</function> (or a similar call) can be
     derived, when waiting for events on the specified bus connection. The returned timeout may be zero, in
     which case a subsequent I/O polling call should be invoked in non-blocking mode. The returned timeout may
index eaad91f52e8d30953ef8cf6654a00e23bd5ecd40..3c24a6f0a915c40e77b6f6b156ca864876b6d832 100644 (file)
@@ -47,7 +47,7 @@
     indicating that no work is pending on the connection. Internally, this call invokes <citerefentry
     project='man-pages'><refentrytitle>ppoll</refentrytitle><manvolnum>2</manvolnum></citerefentry>, to wait for I/O on
     the bus connection. If the <parameter>timeout_usec</parameter> parameter is specified, the call will block at most
-    for the specified amount of time in µs. Pass <constant>UINT64_MAX</constant> to permit it to sleep
+    for the specified amount of time in μs. Pass <constant>UINT64_MAX</constant> to permit it to sleep
     indefinitely.</para>
 
     <para>After each invocation of <function>sd_bus_wait()</function> the <function>sd_bus_process()</function> call
index 6031fee1b38b0cdd71a4cec3b4d52aa741d1ccb1..864cf9b268b8d64965c0c75eb3d3433c89c76915 100644 (file)
     <constant>CLOCK_REALTIME_ALARM</constant>, or <constant>CLOCK_BOOTTIME_ALARM</constant>. See
     <citerefentry><refentrytitle>timerfd_create</refentrytitle><manvolnum>2</manvolnum></citerefentry> for details
     regarding the various types of clocks. The <parameter>usec</parameter> parameter specifies the earliest time, in
-    microseconds (µs), relative to the clock's epoch, when the timer shall be triggered. If a time already in the past
+    microseconds (μs), relative to the clock's epoch, when the timer shall be triggered. If a time already in the past
     is specified (including <constant>0</constant>), this timer source "fires" immediately and is ready to be
     dispatched. If the parameter is specified as <constant>UINT64_MAX</constant> the timer event will never elapse,
     which may be used as an alternative to explicitly disabling a timer event source with
     <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
-    <parameter>accuracy</parameter> parameter specifies an additional accuracy value in µs specifying how much the
-    timer event may be delayed. Use <constant>0</constant> to select the default accuracy (250ms). Use 1µs for maximum
-    accuracy. Consider specifying 60000000µs (1min) or larger for long-running events that may be delayed
+    <parameter>accuracy</parameter> parameter specifies an additional accuracy value in μs specifying how much the
+    timer event may be delayed. Use <constant>0</constant> to select the default accuracy (250ms). Use 1μs for maximum
+    accuracy. Consider specifying 60000000μs (1min) or larger for long-running events that may be delayed
     substantially. Picking higher accuracy values allows the system to coalesce timer events more aggressively,
     improving power efficiency.</para>
 
     <para><function>sd_event_source_get_time()</function> retrieves the configured time value of an event
     source created previously with <function>sd_event_add_time()</function> or
     <function>sd_event_add_time_relative()</function>. It takes the event source object and a pointer to a
-    variable to store the time in, relative to the selected clock's epoch, in µs. The returned value is
+    variable to store the time in, relative to the selected clock's epoch, in μs. The returned value is
     relative to the epoch, even if the event source was created with a relative time via
     <function>sd_event_add_time_relative()</function>.</para>
 
     <para><function>sd_event_source_set_time()</function> changes the time of an event source created
     previously with <function>sd_event_add_time()</function> or
     <function>sd_event_add_time_relative()</function>. It takes the event source object and a time relative
-    to the selected clock's epoch, in µs.</para>
+    to the selected clock's epoch, in μs.</para>
 
     <para><function>sd_event_source_set_time_relative()</function> is similar to
     <function>sd_event_source_set_time()</function>, but takes a time relative to the current time of the
     retrieves the configured accuracy value of an event source
     created previously with <function>sd_event_add_time()</function>. It
     takes the event source object and a pointer to a variable to store
-    the accuracy in. The accuracy is specified in µs.</para>
+    the accuracy in. The accuracy is specified in μs.</para>
 
     <para><function>sd_event_source_set_time_accuracy()</function>
     changes the configured accuracy of a timer event source created
     previously with <function>sd_event_add_time()</function>. It takes
-    the event source object and accuracy, in µs.</para>
+    the event source object and accuracy, in μs.</para>
 
     <para><function>sd_event_source_get_time_clock()</function>
     retrieves the configured clock of an event source created
index 70e980ab7b3ea0646287d89246d3bfc14567da3a..45037d13b25468022f6c2e0e783cf3d4056eaeeb 100644 (file)
@@ -53,7 +53,7 @@
     <citerefentry project='man-pages'><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
     for more information on the various clocks. The retrieved
     timestamp is stored in the <parameter>usec</parameter> parameter,
-    in µs since the clock's epoch. If this function is invoked before
+    in μs since the clock's epoch. If this function is invoked before
     the first event loop iteration, the current time is returned, as
     reported by <function>clock_gettime()</function>. To distinguish
     this case from a regular invocation the return value will be
index 8118121281c391c29c9a6edcb419cc6dd5a1cf0c..3fbda1c93e9bc1a967e624b755e37c401d93d24b 100644 (file)
     is no timeout to wait for this will fill in <constant>(uint64_t)
     -1</constant> instead. Note that <function>poll()</function> takes
     a relative timeout in milliseconds rather than an absolute timeout
-    in microseconds. To convert the absolute 'µs' timeout into
+    in microseconds. To convert the absolute 'μs' timeout into
     relative 'ms', use code like the following:</para>
 
     <programlisting>uint64_t t;
index 89f1729b13f0d835f7783a7d789cbc81c1f1691e..a286beaf45792981983d66ad383d76c26a7814ca 100644 (file)
         <term>MONOTONIC_USEC=…</term>
 
         <listitem><para>A field carrying the monotonic timestamp (as per
-        <constant>CLOCK_MONOTONIC</constant>) formatted in decimal in µs, when the notification message was
+        <constant>CLOCK_MONOTONIC</constant>) formatted in decimal in μs, when the notification message was
         generated by the client. This is typically used in combination with <literal>RELOADING=1</literal>,
         to allow the service manager to properly synchronize reload cycles. See
         <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
index b4a59f2ad10e6d864474ced35cf34d5bf04a91cb..352b3606d78633b9979ace5e977be305b75d4c47 100644 (file)
@@ -65,7 +65,7 @@
 
     <para>If the <parameter>usec</parameter> parameter is non-<constant>NULL</constant>,
     <function>sd_watchdog_enabled()</function> will write the timeout
-    in µs for the watchdog logic to it.</para>
+    in μs for the watchdog logic to it.</para>
 
     <para>To enable service supervision with the watchdog logic, use
     <varname>WatchdogSec=</varname> in service files. See
 
         <listitem><para>Set by the system manager for supervised
         process for which watchdog support is enabled, and contains
-        the watchdog timeout in µs. See above for
+        the watchdog timeout in μs. See above for
         details.</para></listitem>
       </varlistentry>
     </variablelist>
index 537d0aa1571be314015728b722654ebad0c810b8..2d2434bbd066f44af337fa3ebc95b4ec23245a97 100644 (file)
@@ -2464,7 +2464,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
           <variablelist>
             <varlistentry>
               <term><option>us</option></term>
-              <term><option>µs</option></term>
+              <term><option>μs</option></term>
               <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS.UUUUUU TZ</literal></para></listitem>
             </varlistentry>
           </variablelist>
@@ -2479,7 +2479,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
           <variablelist>
             <varlistentry>
               <term><option>us+utc</option></term>
-              <term><option>µs+utc</option></term>
+              <term><option>μs+utc</option></term>
               <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS.UUUUUU UTC</literal></para></listitem>
             </varlistentry>
           </variablelist>
index c92a250ca22fc8bb12dc849b460b0e0faac8aede..4c98c6771a723113811eab6d92f6c74f069b6255 100644 (file)
@@ -192,7 +192,7 @@ COREDUMP_FILENAME=/var/lib/systemd/coredump/core.Web….552351.….zst
 
       <varlistentry>
         <term><varname>COREDUMP_TIMESTAMP=</varname></term>
-        <listitem><para>The time of the crash as reported by the kernel (in µs since the epoch).</para>
+        <listitem><para>The time of the crash as reported by the kernel (in μs since the epoch).</para>
         </listitem>
       </varlistentry>
 
index 610c11feb32a7e363938f4c99dc5cb706460d153..7836834efe01d33b816496fafc3d45b8cc23d892 100644 (file)
@@ -1362,7 +1362,7 @@ DeviceAllow=/dev/loop-control
         <varname>DefaultMemoryPressureThresholdSec=</varname> setting in
         <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
         (which in turn defaults to 200ms). The specified value expects a time unit such as
-        <literal>ms</literal> or <literal>µs</literal>, see
+        <literal>ms</literal> or <literal>μs</literal>, see
         <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
         details on the permitted syntax.</para></listitem>
       </varlistentry>
index 646e1f21f067988439d0601625585286bc9d10d2..a183a9eedfb23d12caa233f55e57b0a873f706a0 100644 (file)
             <literal>MONOTONIC_USEC=</literal> set to the current monotonic time
             (i.e. <constant>CLOCK_MONOTONIC</constant> in
             <citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>)
-            in µs, formatted as decimal string. Once reloading is complete another notification message must
+            in μs, formatted as decimal string. Once reloading is complete another notification message must
             be sent, containing <literal>READY=1</literal>. Using this service type and implementing this
             reload protocol is an efficient alternative to providing an <varname>ExecReload=</varname>
             command for reloading of the service's configuration.</para></listitem>
index ec145c3710f518eaf00c5ff43690abae50edc775..7716e2898c5cda411ea35d12ec9825e04f6e20af 100644 (file)
       <varlistentry>
         <term><varname>Timestamping=</varname></term>
         <listitem><para>Takes one of <literal>off</literal>, <literal>us</literal> (alias:
-        <literal>usec</literal>, <literal>µs</literal>) or <literal>ns</literal> (alias:
+        <literal>usec</literal>, <literal>μs</literal>) or <literal>ns</literal> (alias:
         <literal>nsec</literal>). This controls the <constant>SO_TIMESTAMP</constant> or
         <constant>SO_TIMESTAMPNS</constant> socket options, and enables whether ingress network traffic shall
         carry timestamping metadata. Defaults to <option>off</option>.</para></listitem>
index 07100b12b7ca06d5405bcaede699b4bdcdc912c3..6888f2226f6b279ceec2dfce82abf374e9497724 100644 (file)
@@ -47,7 +47,7 @@
     understood:</para>
 
     <itemizedlist>
-      <listitem><para>usec, us, µs</para></listitem>
+      <listitem><para>usec, us, μs</para></listitem>
       <listitem><para>msec, ms</para></listitem>
       <listitem><para>seconds, second, sec, s</para></listitem>
       <listitem><para>minutes, minute, min, m</para></listitem>
index 260c260f9886ac1209c2902a7acef66322ae77fa..1987e649ae6f6d18a465bdaa22e551dcc6315420 100644 (file)
           <row>
             <entry><literal>@t</literal></entry>
             <entry>File modification time</entry>
-            <entry>Formatted decimal integer, µs since UNIX epoch Jan 1st 1970</entry>
+            <entry>Formatted decimal integer, μs since UNIX epoch Jan 1st 1970</entry>
             <entry>Only relevant if target resource type chosen as <constant>regular-file</constant></entry>
           </row>
 
index bcba5a5208a6da62f4a4647ae1808c6b30d9041e..d7cfcd9105bf4ed27b964fe9295b4f035c48ac33 100644 (file)
@@ -165,7 +165,7 @@ int procfs_cpu_get_usage(nsec_t *ret) {
                 (uint64_t) irq_ticks + (uint64_t) softirq_ticks +
                 (uint64_t) guest_ticks + (uint64_t) guest_nice_ticks;
 
-        /* Let's reduce this fraction before we apply it to avoid overflows when converting this to µsec */
+        /* Let's reduce this fraction before we apply it to avoid overflows when converting this to μsec */
         gcd = calc_gcd64(NSEC_PER_SEC, ticks_per_second);
 
         a = (uint64_t) NSEC_PER_SEC / gcd;
index f124e6f016203ea0eb541c5d79b3ff78313b49bf..b3ade93122a3ec28c3d816afe9a88a3e80f2fb9b 100644 (file)
@@ -327,7 +327,7 @@ char *format_timestamp_style(
                 if (l < (size_t) (1 + 1 + 1))
                         return NULL; /* not enough space for even the shortest of forms */
 
-                return snprintf_ok(buf, l, "@" USEC_FMT, t / USEC_PER_SEC);  /* round down µs → s */
+                return snprintf_ok(buf, l, "@" USEC_FMT, t / USEC_PER_SEC);  /* round down μs → s */
         }
 
         utc = IN_SET(style, TIMESTAMP_UTC, TIMESTAMP_US_UTC, TIMESTAMP_DATE);
@@ -1046,7 +1046,8 @@ static const char* extract_multiplier(const char *p, usec_t *ret) {
                 { "y",       USEC_PER_YEAR   },
                 { "usec",    1ULL            },
                 { "us",      1ULL            },
-                { "µs",      1ULL            },
+                { "μs",      1ULL            }, /* U+03bc (aka GREEK SMALL LETTER MU) */
+                { "µs",      1ULL            }, /* U+b5 (aka MICRO SIGN) */
         };
 
         assert(p);
@@ -1224,7 +1225,8 @@ static const char* extract_nsec_multiplier(const char *p, nsec_t *ret) {
                 { "y",       NSEC_PER_YEAR   },
                 { "usec",    NSEC_PER_USEC   },
                 { "us",      NSEC_PER_USEC   },
-                { "µs",      NSEC_PER_USEC   },
+                { "μs",      NSEC_PER_USEC   }, /* U+03bc (aka GREEK LETTER MU) */
+                { "µs",      NSEC_PER_USEC   }, /* U+b5 (aka MICRO SIGN) */
                 { "nsec",    1ULL            },
                 { "ns",      1ULL            },
                 { "",        1ULL            }, /* default is nsec */
@@ -1701,9 +1703,9 @@ TimestampStyle timestamp_style_from_string(const char *s) {
         t = (TimestampStyle) string_table_lookup(timestamp_style_table, ELEMENTSOF(timestamp_style_table), s);
         if (t >= 0)
                 return t;
-        if (streq_ptr(s, "µs"))
+        if (STRPTR_IN_SET(s, "µs", "μs")) /* acccept both µ symbols in unicode, i.e. micro symbol + greek small letter mu. */
                 return TIMESTAMP_US;
-        if (streq_ptr(s, "µs+utc"))
+        if (STRPTR_IN_SET(s, "µs+utc", "μs+utc"))
                 return TIMESTAMP_US_UTC;
         return t;
 }
index 8e7797139bfe09b6aae0e4a6886bb3d6ee41964f..e4c1f5a793f903ef80987ca0f8c2da85a1ea601d 100644 (file)
@@ -3519,7 +3519,7 @@ SocketTimestamping socket_timestamping_from_string_harder(const char *p) {
          * too. */
         if (streq(p, "nsec"))
                 return SOCKET_TIMESTAMPING_NS;
-        if (STR_IN_SET(p, "usec", "µs"))
+        if (STR_IN_SET(p, "usec", "µs", "μs")) /* Accept both small greek letter mu + micro sign unicode codepoints */
                 return SOCKET_TIMESTAMPING_US;
 
         r = parse_boolean(p);
index 0fe19894e53025e66702e2ba3be46ce801caa03a..847ac531dfb018274b442a21c6745672fd8a83cd 100644 (file)
@@ -91,7 +91,7 @@ enum {
         META_ARGV_UID,          /* %u: as seen in the initial user namespace */
         META_ARGV_GID,          /* %g: as seen in the initial user namespace */
         META_ARGV_SIGNAL,       /* %s: number of signal causing dump */
-        META_ARGV_TIMESTAMP,    /* %t: time of dump, expressed as seconds since the Epoch (we expand this to µs granularity) */
+        META_ARGV_TIMESTAMP,    /* %t: time of dump, expressed as seconds since the Epoch (we expand this to μs granularity) */
         META_ARGV_RLIMIT,       /* %c: core file size soft resource limit */
         META_ARGV_HOSTNAME,     /* %h: hostname */
         _META_ARGV_MAX,
@@ -1205,7 +1205,7 @@ static int gather_pid_metadata_from_argv(
                 case META_ARGV_TIMESTAMP:
                         /* The journal fields contain the timestamp padded with six
                          * zeroes, so that the kernel-supplied 1s granularity timestamps
-                         * becomes 1µs granularity, i.e. the granularity systemd usually
+                         * becomes 1μs granularity, i.e. the granularity systemd usually
                          * operates in. */
                         t = free_timestamp = strjoin(argv[i], "000000");
                         if (!t)
index c5ecc2b844b6d174926707be0c71789d8710c482..db94644ceba4b068aa53179ccc6f397a7b115ae3 100644 (file)
@@ -436,7 +436,7 @@ static int setup_microhttpd_server(RemoteServer *s,
                                      MHD_OPTION_ARRAY, opts,
                                      MHD_OPTION_END);
         if (!d->daemon) {
-                log_error("Failed to start µhttp daemon");
+                log_error("Failed to start μhttp daemon");
                 r = -EINVAL;
                 goto error;
         }
@@ -446,14 +446,14 @@ static int setup_microhttpd_server(RemoteServer *s,
 
         info = MHD_get_daemon_info(d->daemon, MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY);
         if (!info) {
-                log_error("µhttp returned NULL daemon info");
+                log_error("μhttp returned NULL daemon info");
                 r = -EOPNOTSUPP;
                 goto error;
         }
 
         epoll_fd = info->listen_fd;
         if (epoll_fd < 0) {
-                log_error("µhttp epoll fd is invalid");
+                log_error("μhttp epoll fd is invalid");
                 r = -EUCLEAN;
                 goto error;
         }
index 6e993863bfbfdc5fc1aa49cf93d20be71b3783f3..8b64bc78e9ffb4a30b2d0428aeb1afab92010488 100644 (file)
@@ -149,7 +149,7 @@ int journal_remote_get_writer(RemoteServer *s, const char *host, Writer **writer
  **********************************************************************
  **********************************************************************/
 
-/* This should go away as soon as µhttpd allows state to be passed around. */
+/* This should go away as soon as μhttpd allows state to be passed around. */
 RemoteServer *journal_remote_server_global;
 
 static int dispatch_raw_source_event(sd_event_source *event,
index df183354694117d1bf4a533539424469bed5093c..140e7f62235d9ee9b434ddd401d1eed1827ad13b 100644 (file)
  * enum elements with the same name. Hence let's check for the *old* name,
  * and define the new name by the value of the old name. */
 
-/* Renamed in µhttpd 0.9.51 */
+/* Renamed in μhttpd 0.9.51 */
 #ifndef MHD_USE_PIPE_FOR_SHUTDOWN
 #  define MHD_USE_ITC MHD_USE_PIPE_FOR_SHUTDOWN
 #endif
 
-/* Renamed in µhttpd 0.9.52 */
+/* Renamed in μhttpd 0.9.52 */
 #ifndef MHD_USE_EPOLL_LINUX_ONLY
 #  define MHD_USE_EPOLL MHD_USE_EPOLL_LINUX_ONLY
 #endif
 
-/* Renamed in µhttpd 0.9.52 */
+/* Renamed in μhttpd 0.9.52 */
 #ifndef MHD_USE_SSL
 #  define MHD_USE_TLS MHD_USE_SSL
 #endif
 
-/* Renamed in µhttpd 0.9.53 */
+/* Renamed in μhttpd 0.9.53 */
 #ifndef MHD_USE_POLL_INTERNALLY
 #  define MHD_USE_POLL_INTERNAL_THREAD MHD_USE_POLL_INTERNALLY
 #endif
@@ -38,7 +38,7 @@
 #  define MHD_HTTP_NOT_ACCEPTABLE MHD_HTTP_METHOD_NOT_ACCEPTABLE
 #endif
 
-/* Renamed in µhttpd 0.9.74 (8c644fc1f4d498ea489add8d40a68f5d3e5899fa) */
+/* Renamed in μhttpd 0.9.74 (8c644fc1f4d498ea489add8d40a68f5d3e5899fa) */
 #ifndef MHD_HTTP_CONTENT_TOO_LARGE
 #  ifdef MHD_HTTP_PAYLOAD_TOO_LARGE
 #    define MHD_HTTP_CONTENT_TOO_LARGE MHD_HTTP_PAYLOAD_TOO_LARGE /* 0.9.53 or newer */
index 132f63e57decbd021e48037ccfce2d3829cedc2d..9d1df723813c85dd5e4763d6445c5aaba08ff527 100644 (file)
@@ -45,13 +45,13 @@ static int netlink_new(sd_netlink **ret) {
                  * while the socket sticks around we might get confused by replies from earlier runs coming
                  * in late — which is pretty likely if we'd start our sequence numbers always from 1. Hence,
                  * let's start with a value based on the system clock. This should make collisions much less
-                 * likely (though still theoretically possible). We use a 32 bit µs counter starting at boot
+                 * likely (though still theoretically possible). We use a 32 bit μs counter starting at boot
                  * for this (and explicitly exclude the zero, see above). This counter will wrap around after
                  * a bit more than 1h, but that's hopefully OK as the kernel shouldn't take that long to
                  * reply to our requests.
                  *
                  * We only pick the initial start value this way. For each message we simply increase the
-                 * sequence number by 1. This means we could enqueue 1 netlink message per µs without risking
+                 * sequence number by 1. This means we could enqueue 1 netlink message per μs without risking
                  * collisions, which should be OK.
                  *
                  * Note this means the serials will be in the range 1…UINT32_MAX here.
index e1e9b723c8c0129b7c472bc95b98fc7196400c6d..79531d2cc491091e84d490d0c7ad59fb983f4168 100644 (file)
@@ -2871,7 +2871,7 @@ static int method_set_reboot_to_boot_loader_menu(
                 } else {
                         char buf[DECIMAL_STR_MAX(uint64_t) + 1];
 
-                        xsprintf(buf, "%" PRIu64, x); /* µs granularity */
+                        xsprintf(buf, "%" PRIu64, x); /* μs granularity */
 
                         r = write_string_file_atomic_label("/run/systemd/reboot-to-boot-loader-menu", buf);
                         if (r < 0)
index f17d97a2c101226ed3d956d69f4894127e33d070..2665930209776325009e9cdb32aef15ff378f69e 100644 (file)
@@ -649,7 +649,7 @@ static int prepend_component(const char **p, bool usec, unsigned nesting, Calend
                 if (repeat == 0)
                         return -ERANGE;
         } else {
-                /* If no repeat value is specified for the µs component, then let's explicitly refuse ranges
+                /* If no repeat value is specified for the μs component, then let's explicitly refuse ranges
                  * below 1s because our default repeat granularity is beyond that. */
 
                 /* Overflow check */
index f77f8351cf95dff4f1f5307ce3a7f5b7eee45ca1..e3ec91b8771e2ed57979d97dcaa12f4e2dfc1441 100644 (file)
@@ -309,7 +309,7 @@ int efi_loader_get_config_timeout_one_shot(usec_t *ret) {
                 return -ERANGE;
 
         cache_stat = new_stat;
-        *ret = cache = sec * USEC_PER_SEC; /* return in µs */
+        *ret = cache = sec * USEC_PER_SEC; /* return in μs */
         return 0;
 }
 
index 2d095f72df4cf269c27597423f64c91849776bcd..595b6f3374504ad19a6c0400711c681a0bbe7606 100644 (file)
@@ -298,7 +298,7 @@ int sd_pid_notifyf_with_fds(pid_t pid, int unset_environment, const int *fds, si
 /*
   Returns > 0 if synchronization with systemd succeeded.  Returns < 0
   on error. Returns 0 if $NOTIFY_SOCKET was not set. Note that the
-  timeout parameter of this function call takes the timeout in µs, and
+  timeout parameter of this function call takes the timeout in μs, and
   will be passed to ppoll(2), hence the behaviour will be similar to
   ppoll(2). This function can be called after sending a status message
   to systemd, if one needs to synchronize against reception of the
@@ -330,7 +330,7 @@ int sd_booted(void);
   Returns > 0 if the service manager expects watchdog keep-alive
   events to be sent regularly via sd_notify(0, "WATCHDOG=1"). Returns
   0 if it does not expect this. If the usec argument is non-NULL
-  returns the watchdog timeout in µs after which the service manager
+  returns the watchdog timeout in μs after which the service manager
   will act on a process that has not sent a watchdog keep alive
   message. This function is useful to implement services that
   recognize automatically if they are being run under supervision of
index c8ec0e2278aa449d86c756d197e272cd5e623ba5..cc20031ed7ef23174f6d2c05c776c61e9266fd41 100644 (file)
@@ -22,7 +22,7 @@
         "e  \\\n"                               \
         "f  \n"                                 \
         "g=g\\ \n"                              \
-        "h= ąęół\\ śćńźżµ \n"                   \
+        "h= ąęół\\ śćńźżμ \n"                   \
         "i=i\\"
 
 #define env_file_2                              \
@@ -68,7 +68,7 @@ TEST(load_env_file_1) {
         assert_se(streq(data[1], "b=bc"));
         assert_se(streq(data[2], "d=de  f"));
         assert_se(streq(data[3], "g=g "));
-        assert_se(streq(data[4], "h=ąęół śćńźżµ"));
+        assert_se(streq(data[4], "h=ąęół śćńźżμ"));
         assert_se(streq(data[5], "i=i"));
         assert_se(data[6] == NULL);
 }
index 80f762bc8966a28528d57f7a3486b8af04cf7884..4a39d06ef88a73501b7149598be20e58eab9e5a9 100644 (file)
@@ -214,7 +214,7 @@ TEST(benchmark_sd_id128_get_machine_app_specific) {
 
         q = now(CLOCK_MONOTONIC) - t;
 
-        log_info("%lf µs each\n", (double) q / iterations);
+        log_info("%lf μs each\n", (double) q / iterations);
 }
 
 TEST(id128_at) {
index b90b8921926e3c15e06333454e8a8794c20caaeb..e915207e8c777d7fc3ef36ef3d103395d00a20d9 100644 (file)
@@ -614,7 +614,7 @@ TEST(getpid_measure) {
                 (void) getpid();
         q = now(CLOCK_MONOTONIC) - t;
 
-        log_info(" glibc getpid(): %lf µs each\n", (double) q / iterations);
+        log_info(" glibc getpid(): %lf μs each\n", (double) q / iterations);
 
         iterations *= 50; /* _cached() is about 50 times faster, so we need more iterations */
 
@@ -623,7 +623,7 @@ TEST(getpid_measure) {
                 (void) getpid_cached();
         q = now(CLOCK_MONOTONIC) - t;
 
-        log_info("getpid_cached(): %lf µs each\n", (double) q / iterations);
+        log_info("getpid_cached(): %lf μs each\n", (double) q / iterations);
 }
 
 TEST(safe_fork) {
index 235c6cf164255de3d931d0b15a3901008a3a6132..a67bfc87342be4f1af7e231ac93364750f55fc55 100644 (file)
@@ -35,7 +35,9 @@ TEST(parse_sec) {
         assert_se(u == 700 * USEC_PER_MSEC);
         assert_se(parse_sec("23us", &u) >= 0);
         assert_se(u == 23);
-        assert_se(parse_sec("23µs", &u) >= 0);
+        assert_se(parse_sec("23μs", &u) >= 0); /* greek small letter mu */
+        assert_se(u == 23);
+        assert_se(parse_sec("23µs", &u) >= 0); /* micro symbol */
         assert_se(u == 23);
         assert_se(parse_sec("infinity", &u) >= 0);
         assert_se(u == USEC_INFINITY);
index 416b536aed5079b3398707f38eca2f839518c3c4..1d8ebecc91d92dae036b4538e5b62fa8d16cd20b 100644 (file)
@@ -32,15 +32,15 @@ static int advance_tstamp(int fd, const struct stat *st) {
          * different timestamp accuracy: traditional fat has 2s granularity, and even ext2 and friends expose
          * different granularity depending on selected inode size during formatting! Hence, to ensure the
          * timestamp definitely is increased, here's what we'll do: we'll first try to increase the timestamp
-         * by 1µs, write that and read it back. If it was updated, great. But if it was not, we'll instead
-         * increase the timestamp by 10µs, and do the same, then 100µs, then 1ms, and so on, until it works,
+         * by 1μs, write that and read it back. If it was updated, great. But if it was not, we'll instead
+         * increase the timestamp by 10μs, and do the same, then 100μs, then 1ms, and so on, until it works,
          * or we reach 10s. If it still didn't work then, the fs is just broken and we give up. */
 
         usec_t target = MAX3(now(CLOCK_REALTIME),
                              TIME_EPOCH * USEC_PER_SEC,
                              timespec_load(&st->st_mtim));
 
-        for (usec_t a = 1; a <= 10 * USEC_PER_SEC; a *= 10) { /* 1µs, 10µs, 100µs, 1ms, … 10s */
+        for (usec_t a = 1; a <= 10 * USEC_PER_SEC; a *= 10) { /* 1μs, 10μs, 100μs, 1ms, … 10s */
                 struct timespec ts[2];
                 struct stat new_st;