From nobody Sun May 12 04:57:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VcVjD16Gtz5KHWP; Sun, 12 May 2024 04:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VcVjD0G7dz4NGm; Sun, 12 May 2024 04:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715489840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tgYoz1+kkuxmzBKp8o8uCeCxC7rGhSYu7rk53mMOIQ0=; b=QgbKZn0McNj/LrLqacptgqwggKtkG3wXzLp0lN2yBpQZw9+Nsy1J2SanI6FhdZ2KBPta9A KTIQSdRbn2FLAKGw/d/pnoyXWCJ1EPgDXj6dnmEIApJ478BbuCRQ7gnE4wh3wFU17irNJG N4DlTlsVpjYp/6vmN0NpR1M6fNLxxxwt7Wl5Z/oeB7GMWwNcq4vbUnMSCLFCqa83b2xdX/ Xewb+2f+idnsmzufOeL53lBxt/Gg8qx3YkpPg54LICi+B0LS5WtCSFoXlJuiqVHWCdfR8O C8jmstu7vW+q/2f3KdaMX/WhiwmjGv7bC8knut8haOn/WyitreqnTmRUXqk97Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715489840; a=rsa-sha256; cv=none; b=TaavcnVGWv+P71vvT72OLRQLFW5wb/JEDfk0vviPgBk6pAhEHVpNMYrSqHxHq4KeTo32OD 9xH+0I+c4VjkhpQmX1PxhEDrTIOPC7cySu6p7g9PD8OPYHQyJjwQPJJRmoqMgbgU0+IUX8 3F8wyV2zToSyaMPvsKSrtqqSfQc3u5FqkCSG7lGxclvn0rLA2yekxfXjE/ES5aUklJGhUr CO6INRjEsGPtopjgEkj0VLp5+laITjM8aYgc97uHEp6rFjAMEi3LWvbra9c5dWfB1OeZRo MelyO4eIwAiKoF/eglRvHDVVcMj/MqG5KIYOjoTg8RYAca52pKLqciw9XM9w9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715489840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tgYoz1+kkuxmzBKp8o8uCeCxC7rGhSYu7rk53mMOIQ0=; b=jiiVKO7uvKOulCtBU2iAIx8zwBYRWEFkX5R6DDDQ2azEUfw9V66APQkq2Nh+uO0UOlCQdE ZoP0LmRi8y+m95kWh/yG4Be2c2cIMXeksKmToaIyHEtahfJBsmsmWa5xThWn8lKoiIEY24 L1q2gxTLQ8dEwTlq5BPngNrHPhr8WXfpDdluynzekmv+5pCYoswPIFaiReBAlPdKXcm3rm Wu7oycle/aOJlDZI64Esierk+2h5tPIqzdnnFGXI06U3klTygTmxSjUT4ZcUY5yfW6NDgD kT98leotWFiswY/YVsTlvPnWdZ+3HGZLuUExw12wmP4yIoKjsDzyFgL1cOSVfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VcVjC6yhqzqxB; Sun, 12 May 2024 04:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44C4vJ6i090875; Sun, 12 May 2024 04:57:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44C4vJHL090872; Sun, 12 May 2024 04:57:19 GMT (envelope-from git) Date: Sun, 12 May 2024 04:57:19 GMT Message-Id: <202405120457.44C4vJHL090872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ee2e36686e84 - main - linprocfs: Really fix time_t type issue List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee2e36686e846d412deac23344185f4b8a8c0285 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ee2e36686e846d412deac23344185f4b8a8c0285 commit ee2e36686e846d412deac23344185f4b8a8c0285 Author: Warner Losh AuthorDate: 2024-05-12 04:53:15 +0000 Commit: Warner Losh CommitDate: 2024-05-12 04:53:15 +0000 linprocfs: Really fix time_t type issue The cast to (long) is wrong on all the other 32-bit platforms. (long long) is the correct type on all platforms. Also, use a z modifier for size_t which also fails on 32-bit platforms. Fixes: 02f481a30b82 Sponsored by: Netflix --- sys/compat/linprocfs/linprocfs.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index aa5af0b3c1c1..dd04adc054db 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2133,7 +2133,7 @@ again: for (id = 0; id < msgmni; id++) if (msqids[id].u.msg_qbytes != 0) sbuf_printf(sb, - "%10d %10lu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %10ld %10ld %10ld\n", + "%10d %10lu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %10lld %10lld %10lld\n", (int) msqids[id].u.msg_perm.key, IXSEQ_TO_IPCID(id, msqids[id].u.msg_perm), msqids[id].u.msg_perm.mode, @@ -2145,9 +2145,9 @@ again: msqids[id].u.msg_perm.gid, msqids[id].u.msg_perm.cuid, msqids[id].u.msg_perm.cgid, - (long)msqids[id].u.msg_stime, - (long)msqids[id].u.msg_rtime, - (long)msqids[id].u.msg_ctime); + (long long)msqids[id].u.msg_stime, + (long long)msqids[id].u.msg_rtime, + (long long)msqids[id].u.msg_ctime); free(msqids, M_TEMP); return (0); @@ -2190,7 +2190,7 @@ again: for (id = 0; id < semmni; id++) if ((semids[id].u.sem_perm.mode & SEM_ALLOC) != 0) sbuf_printf(sb, - "%10d %10lu %4o %10u %5u %5u %5u %5u %10ld %10ld\n", + "%10d %10lu %4o %10u %5u %5u %5u %5u %10lld %10lld\n", (int) semids[id].u.sem_perm.key, IXSEQ_TO_IPCID(id, semids[id].u.sem_perm), semids[id].u.sem_perm.mode, @@ -2199,8 +2199,8 @@ again: semids[id].u.sem_perm.gid, semids[id].u.sem_perm.cuid, semids[id].u.sem_perm.cgid, - (long)semids[id].u.sem_otime, - (long)semids[id].u.sem_ctime); + (long long)semids[id].u.sem_otime, + (long long)semids[id].u.sem_ctime); free(semids, M_TEMP); return (0); @@ -2244,7 +2244,7 @@ again: for (id = 0; id < shmmni; id++) if ((shmids[id].u.shm_perm.mode & SHMSEG_ALLOCATED) != 0) sbuf_printf(sb, - "%10d %10lu %4o %21lu %5u %5u %5u %5u %5u %5u %5u %10ld %10ld %10ld %21d %21d\n", + "%10d %10lu %4o %21zu %5u %5u %5u %5u %5u %5u %5u %10lld %10lld %10lld %21d %21d\n", (int) shmids[id].u.shm_perm.key, IXSEQ_TO_IPCID(id, shmids[id].u.shm_perm), shmids[id].u.shm_perm.mode, @@ -2256,9 +2256,9 @@ again: shmids[id].u.shm_perm.gid, shmids[id].u.shm_perm.cuid, shmids[id].u.shm_perm.cgid, - (long)shmids[id].u.shm_atime, - (long)shmids[id].u.shm_dtime, - (long)shmids[id].u.shm_ctime, + (long long)shmids[id].u.shm_atime, + (long long)shmids[id].u.shm_dtime, + (long long)shmids[id].u.shm_ctime, 0, 0); /* XXX rss & swp are not supported */ free(shmids, M_TEMP);