From owner-freebsd-stable@FreeBSD.ORG Tue Oct 16 19:38:46 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C017216A41B; Tue, 16 Oct 2007 19:38:46 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mx1.freebsd.org (Postfix) with ESMTP id 46FFF13C48E; Tue, 16 Oct 2007 19:38:45 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id l9GJciR9046057; Wed, 17 Oct 2007 05:38:44 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id l9GJchcM046056; Wed, 17 Oct 2007 05:38:43 +1000 (EST) (envelope-from peter) Date: Wed, 17 Oct 2007 05:38:43 +1000 From: Peter Jeremy To: Igor Sysoev Message-ID: <20071016193843.GD1184@turion.vk2pj.dyndns.org> References: <20071015141714.GL24828@rambler-co.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8S1fMsFYqgBC+BN/" Content-Disposition: inline In-Reply-To: <20071015141714.GL24828@rambler-co.ru> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Subject: Re: 2G+ sysv shm segments X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 19:38:46 -0000 --8S1fMsFYqgBC+BN/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-Oct-15 18:17:14 +0400, Igor Sysoev wrote: >more than 2G. The attached patches against 6.x and 7.x allow to create 2G+ >segments. Useful, thanks. >--- src/sys/sys/shm.h 2007-09-12 23:33:39.000000000 +0400 >+++ src/sys/sys/shm.h 2007-10-15 17:42:38.000000000 +0400 >@@ -77,7 +77,7 @@ >=20 > struct shmid_ds { > struct ipc_perm shm_perm; /* operation permission structure */ >- int shm_segsz; /* size of segment in bytes */ >+ size_t shm_segsz; /* size of segment in bytes */ =2E.. >--- src/usr.bin/ipcs/ipcs.c 2007-09-12 23:32:25.000000000 +0400 >+++ src/usr.bin/ipcs/ipcs.c 2007-10-15 17:29:06.000000000 +0400 >@@ -439,7 +439,7 @@ > kshmptr->u.shm_nattch); >=20 > if (option & BIGGEST) >- printf(" %12d", >+ printf(" %12ld", > kshmptr->u.shm_segsz); Note that size_t is always 'unsigned' and translates to 'int' rather than 'long' on i386 so this printf will report a warning. I suggest printf(" %12lu", (unsigned long)kshmptr->u.shm_segsz); or similar. --=20 Peter Jeremy --8S1fMsFYqgBC+BN/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHFRND/opHv/APuIcRAqy2AKCRekE1krJFNjtgAlhfr/JbdB1uWQCgmo9K ZHAgQqDVfpN2rWj8jZucB28= =00Gt -----END PGP SIGNATURE----- --8S1fMsFYqgBC+BN/--