head 1.3; access; symbols netbsd-11-0-RC5:1.1.2.1 netbsd-11-0-RC4:1.1.2.1 netbsd-11-0-RC3:1.1.2.1 netbsd-11-0-RC2:1.1.2.1 netbsd-11-0-RC1:1.1.2.1 perseant-exfatfs:1.1.0.4 perseant-exfatfs-base-20250801:1.1 netbsd-11:1.1.0.2 netbsd-11-base:1.1; locks; strict; comment @# @; 1.3 date 2026.05.30.10.09.47; author roy; state Exp; branches; next 1.2; commitid WFDBNIGFUEZq4PHG; 1.2 date 2025.12.14.16.28.05; author kre; state Exp; branches; next 1.1; commitid YWH43jhLDrF3AomG; 1.1 date 2024.11.21.19.37.46; author riastradh; state Exp; branches 1.1.2.1 1.1.4.1; next ; commitid VF1Qif97GcHn6yyF; 1.1.2.1 date 2025.12.20.13.51.18; author martin; state Exp; branches; next ; commitid R9VG5krXLlrkw9nG; 1.1.4.1 date 2024.11.21.19.37.46; author perseant; state dead; branches; next 1.1.4.2; commitid 23j6GFaDws3O875G; 1.1.4.2 date 2025.08.02.05.54.59; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.3 log @pidfile: Add functionality for use in sandboxing pidfile_fd() returns the file descriptor of the locked pidfile so it can be limited in sandboxes like Capsicum. pidfile_unremoveable() will avoid unlink(2) being called at program exit to avoid tripping any sandboxes like Pledge which may restrict it or it's just not reachable anymore if the program is in a chroot(2). pidfile_path() returns the path of the locked pidfile so it can be removed by a process than can reach it if pidfile_unremoveable() has been called. pidfile_unlock() just releases the resources held by the locked pidfile. This is lighter weight than pidfile_clean() as it avoids a lseek and read. @ text @__login50 __login_getpwclass50 __loginx50 __parsedate50 __pdparse __pw_copy50 __pw_copyx50 __pw_getpwconf50 __pw_scan50 __setusercontext50 disklabel_dkcksum disklabel_scan easprintf ecalloc efopen emalloc erealloc ereallocarr esetfunc estrdup estrlcat estrlcpy estrndup estrtoi estrtou evasprintf flags_to_string forkpty freemntopts get_media_mode get_media_mode_string get_media_option_string get_media_options get_media_subtype get_media_subtype_string get_media_type_string getbootfile getbyteorder getdiskcookedname getdiskrawname getfsspecname getfstypename getlabeloffset getlabelsector getlabelusesmbr getmaxpartitions getmnt_silent getmntoptnum getmntopts getmntoptstr getrawpartition ifm_mode_descriptions ifm_option_descriptions ifm_subtype_descriptions ifm_type_descriptions kinfo_getvmmap login login_close login_getcapbool login_getcapnum login_getcapsize login_getcapstr login_getcaptime login_getclass login_getpwclass login_tty loginx logout logoutx logwtmp logwtmpx lookup_media_word opendisk opendisk1 openpty parsedate pidfile pidfile_clean pidfile_fd pidfile_lock pidfile_path pidfile_read pidfile_unlock pidfile_unremoveable pidlock proc_compare pw_abort pw_copy pw_copyx pw_edit pw_error pw_getconf pw_getprefix pw_getpwconf pw_init pw_lock pw_mkdb pw_prompt pw_scan pw_setprefix raise_default_signal secure_path setclasscontext setusercontext setuserenv setuserpath snprintb snprintb_m sockaddr_snprintf string_to_flags strpct strpct_r strpct_round strspct strspct_r ttyaction ttylock ttymsg ttyunlock @ 1.2 log @PR lib/59811 allow any rounding in strpct(3). Add str[s]pct_r (same as str[s]pct with an addition "how to round" param) and strpct_round to set the rounding used by the older str[s]pct functions. The default remains rounding down (toward zero) for compatibility. See the PR (and the updated man page) for the details. For df(1) use "round away from zero" mode, as POSIX requires. XXX pullup -11 @ text @d79 1 d81 1 d83 2 @ 1.1 log @libutil: Add expected symbols list. PR lib/58838: shared libraries in base should all have expsym lists @ text @d108 2 d111 1 @ 1.1.2.1 log @Pull up following revision(s) (requested by kre in ticket #134): lib/libutil/util.expsym: revision 1.2 lib/libutil/shlib_version: revision 1.55 distrib/sets/lists/base/shl.mi: revision 1.1018 lib/libutil/strpct.c: revision 1.7 lib/libutil/strpct.3: revision 1.8 distrib/sets/lists/debug/shl.mi: revision 1.379 tests/bin/df/t_df.sh: revision 1.4 bin/df/df.c: revision 1.105 include/util.h: revision 1.71 PR lib/59811 allow any rounding in strpct(3). Add str[s]pct_r (same as str[s]pct with an addition "how to round" param) and strpct_round to set the rounding used by the older str[s]pct functions. The default remains rounding down (toward zero) for compatibility. See the PR (and the updated man page) for the details. For df(1) use "round away from zero" mode, as POSIX requires. Adjust expected df output percentages (PR lib/59811 related) df now rounds percentages up, as POSIX specifies, rather than down, as it used to. Adjust the expected output (add 1 to many of the entries in the percentage column) to compensate for this change. @ text @a107 2 strpct_r strpct_round a108 1 strspct_r @ 1.1.4.1 log @file util.expsym was added on branch perseant-exfatfs on 2025-08-02 05:54:59 +0000 @ text @d1 112 @ 1.1.4.2 log @Sync with HEAD @ text @a0 112 __login50 __login_getpwclass50 __loginx50 __parsedate50 __pdparse __pw_copy50 __pw_copyx50 __pw_getpwconf50 __pw_scan50 __setusercontext50 disklabel_dkcksum disklabel_scan easprintf ecalloc efopen emalloc erealloc ereallocarr esetfunc estrdup estrlcat estrlcpy estrndup estrtoi estrtou evasprintf flags_to_string forkpty freemntopts get_media_mode get_media_mode_string get_media_option_string get_media_options get_media_subtype get_media_subtype_string get_media_type_string getbootfile getbyteorder getdiskcookedname getdiskrawname getfsspecname getfstypename getlabeloffset getlabelsector getlabelusesmbr getmaxpartitions getmnt_silent getmntoptnum getmntopts getmntoptstr getrawpartition ifm_mode_descriptions ifm_option_descriptions ifm_subtype_descriptions ifm_type_descriptions kinfo_getvmmap login login_close login_getcapbool login_getcapnum login_getcapsize login_getcapstr login_getcaptime login_getclass login_getpwclass login_tty loginx logout logoutx logwtmp logwtmpx lookup_media_word opendisk opendisk1 openpty parsedate pidfile pidfile_clean pidfile_lock pidfile_read pidlock proc_compare pw_abort pw_copy pw_copyx pw_edit pw_error pw_getconf pw_getprefix pw_getpwconf pw_init pw_lock pw_mkdb pw_prompt pw_scan pw_setprefix raise_default_signal secure_path setclasscontext setusercontext setuserenv setuserpath snprintb snprintb_m sockaddr_snprintf string_to_flags strpct strspct ttyaction ttylock ttymsg ttyunlock @