]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib: (pidutils.c) use uint64_t instead of ino_t for seamless cross-compatibility
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 4 Dec 2025 18:37:57 +0000 (13:37 -0500)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 4 Dec 2025 18:45:03 +0000 (13:45 -0500)
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
include/pidutils.h
lib/pidutils.c

index 9d3257dfdf30193cf31ed9e3d8574d5e792a46c0..b2c575c190b60bd8a580f17066c00a1a3b28701b 100644 (file)
@@ -9,6 +9,6 @@
 
 #include <sys/types.h>
 
-extern int ul_parse_pid_str(char *pidstr, pid_t *pid_num, ino_t *pfd_ino);
+extern int ul_parse_pid_str(char *pidstr, pid_t *pid_num, uint64_t *pfd_ino);
 
-#endif /* UTIL_LINUX_PIDUTILS_H */
\ No newline at end of file
+#endif /* UTIL_LINUX_PIDUTILS_H */
index 56f3b8578896c4114b9265dfbd2539951e047ece..a7567eb3fd4c995e49dd32b90fcfafb71a3f8dd1 100644 (file)
@@ -23,7 +23,7 @@
  * Return: On success, 0 is returned.
  *         On failure, a negative errno number will be returned.
  */
-int ul_parse_pid_str(char *pidstr, pid_t *pid_num, ino_t *pfd_ino)
+int ul_parse_pid_str(char *pidstr, pid_t *pid_num, uint64_t *pfd_ino)
 {
        int rc;
        char *end = NULL;
@@ -40,7 +40,7 @@ int ul_parse_pid_str(char *pidstr, pid_t *pid_num, ino_t *pfd_ino)
        if (*end == ':' && pfd_ino) {
                rc = ul_strtou64(++end, pfd_ino, 10);
                if (rc != 0)
-                       return -ERANGE; 
+                       return -ERANGE;
                *end = '\0';
        }
        if (errno != 0 || ((end && *end != '\0') || pidstr >= end))